Skip to Content

Drupal

Matthew Saunders: Anatomy of a Drupalcamp - Tasks and Timing

Planet Drupal - 4 September 2014 - 2:50pm

This is the second post in my Making A Drupalcamp Happen series. I've been involved in camps for about 7 years and recently was the main project manager for Colorado. The first post was around tools, coordination and management. This post is really focused on tasks and when they need to be done to not go crazy.

There are certain things that need to happen every year. The earlier you can sort them out, the easier things will be as you approach the deadline of your event. So, I've listed some tasks below along with some rough timing and notes on some of the items. This is by no means an exhaustive list and the timing might be a little off on tasks, but I think it does give a sense of task, scope, and order.

drupaldrupalcampevent planningtasks
Categories: Drupal

Acquia: Help Adam and Angie build the Drupal Module Upgrader!

Planet Drupal - 4 September 2014 - 2:01pm

This week: Meet Adam "phenaproxima" Hoenich! Learn what the Drupal Module Upgrader can do for you! And what you can do for it! Come to Webchick's BoF at DrupalCon Amsterdam! Contribute!

Categories: Drupal

Mediacurrent: Death to Field Arrays!

Planet Drupal - 4 September 2014 - 1:44pm

Calling all Drupal Devs: Write better code with EntityMetadataWrapper! Have you ever...

Categories: Drupal

KnackForge: Adding custom menu tabs and menu items to navbar

Planet Drupal - 4 September 2014 - 11:47am

Mobile Friendly Navigation Toolbar, shortly known as navbar, is a back-port of toolbar in Drupal 8. The problem it tries to solve is pretty obvious from it's name.

Navbar is an often used module in our Drupal projects. In our recent project we were asked to develop a bunch of menus to quickly access admin pages as and when needed. Unlike Shortcuts, we want this appear dynamically like notification.

For instance, if there are any new comments awaiting approval, the menu should show up and a few more items similar to this. Thought, Navbar could be leveraged for this requirements.

This mighty developer friendly module makes this possible for any module by implementing hook_navbar(). Similar to hook_menu(), an array of menu items to be returned but in renderable array format. If you need an example, function navbar_navbar() is a good place to get started.

The menu it offers can be seen as,

  1. The navbar tab by its name acting as menu item (e.g. Home)
  2. The navbar tab on click expands to show menu item(s) it has got underneath (e.g. Shortcuts) depends on the way navbar item defined in the hook_navbar().

Example code for #1,

Categories: Drupal

Blair Wadman: Why you should not always use Drupal Features for settings, and what you can use instead

Planet Drupal - 4 September 2014 - 11:05am

The Drupal Features module covers a lot of our needs with automating the deployment of database settings for Drupal 7. It allows you to export configuration to code and nicely wrap it up as a module. This means you easily deploy your changes to the live site (or a staging site) without having to repeat the configuration changes. It also means you can apply the changes to a different site.

But using Features is not always the best approach. Even if you can export something using Features, it doesn't mean you always should. Read on to find out when it is not appropriate to use Features and what you can use instead.

Tags: Drupal Module DevelopmentDrupal DeploymentFeaturesPlanet Drupal
Categories: Drupal

Bluespark Labs: The Business Value of DevOps in Drupal Survey

Planet Drupal - 4 September 2014 - 10:19am

tl;dr:

We will be presenting a session on the business value of DevOps at Drupalcon Amsterdam and would greatly appreciate your response to this (very) brief survey on Drupal and DevOps from a business perspective.

The wordy version:

At the upcoming Drupalcon in Amsterdam, Adrian Rollett and I will be presenting work we did to derive the true business value of the DevOps activities within Bluespark through real life analysis. This will be a particularly useful session for those who either plan on, or are in the process of introducing devops within their organization and need some concrete arguments to help them with the process.

To measure the success of DevOps implementations within Bluespark, we developed a framework that allows us to quantify various aspects of our processes into specific business gains. We then inspected a number of different projects, analyzing a range of issues such as time logs, number of times a specific activity took place, etc. As a result we were able to quantify the efficiencies gained by implementing automated testing, continuous integration and other DevOps principles. We will be presenting this framework and the results obtained in Amsterdam.

In addition, we are seeking to get a sense of the current adoption of DevOps in the Drupal world from a business perspective. We have created a very brief survey to gather this information. This is a complementary effort to the very excellent and more technically-oriented survey that is planned (http://www.krisbuytaert.be/blog/upcoming-conferences) for a different Drupalcon session. We will of course be sharing the insights we gather with the entire community.

Many thanks in advance for your responses, and we hope to see you in Amsterdam!

Click here to fill in the survey

Tags: DrupalconDevOpsDrupal Planet
Categories: Drupal

Lullabot: Drupal as a Services Platform

Planet Drupal - 4 September 2014 - 9:29am

The next issue of Drupal Watchdog features articles about Drupal as a Services Platform. Several authors in the issue and the executive editor will be sharing various perspectives on web services in Drupal and in the wider world. With hostess Amber Himes Matz and her guests Peta Hoyes, Scott Hooker, Lin Clark, and Larry Garfield.

Categories: Drupal

Liran Tal's Enginx: “Oh you lazy cron!” – learning on Drupal cron issues

Planet Drupal - 4 September 2014 - 9:19am

We’re still working with Drupal 6 at work, and we’re triggering our notifications and other cron related tasks through a small script that crontab is running, and with the help of drush at the command line. The following problem and description of the scenario we had applies to Drupal 7 too as these are pretty much close with regards to implementation.

Drupal’s cron job will most often run smoothly and without any issues, it will appear to “just work”. The reason for that is that behind the scenes, anything related to creating scheduled tasks in Drupal will have to implement hook_cron, and simply enough, not a lot of modules will be doing that. So when you first setup your Drupal application and get it to run, you’ll wrap up any issues with cron and from there it’s smooth sailing… Or not! There are practices you should be aware of when you program modules in Drupal that are not related to cron, yet can still mess it up.

So back to the story, at some point we noticed our notifications aren’t being sent out in our development environment, and because cron is responsible for running the notifications, then that’s the immediate suspect. Problem is, debugging cron isn’t that easy, mainly because Drupal will just fire off those hooks and you’ve got no idea where the culprit code is.

Search for the problem begins by checking quickly all the modules that implement hook_cron, primarily your very own and recently added modules are the prime suspects. If that yields no results, as did in my case you’re going to have to broaden the search and a good way to quickly figure out where this happens is by inspecting Drupal’s module.inc to catch the cron hook. One way of doing that is through a debugger, another quick and easy way is by using Drupal’s own watchdog (or PHP’s own errorlog) function to capture this data:


function module_invoke_all() {
$return = array();
foreach (module_implements($hook) as $module) {
$function = $module .'_'. $hook;
if ($hook == 'cron') watchdog('cron', "hit $module cron"); // add line to log in db log

}

}

Inspecting the information there from the change or through the debugger we’ll be able to see which cron hook last ran successfully.

I will spare the rest of the debugging process but the research led to Drupal’s own implementation of hook_cron which further led to module calls of node_invoke and node_invoke_nodeapi where it was then failing. At that point, all custom, and recent changes to anything the codebase related to hook_nodeapi revealed the culprit:


function my_module_nodeapi($op...) {

switch ($op) {

case ‘view’:
drupal_goto(”);

break;

}

}
This makes perfect sense. Nodes get loaded through the node_load() and the rest of Drupal’s hooks for the sake of handling the notifications, which in turn calls nodeapi hook all around, and having a drupal_goto() doesn’t really help drush when its running from the command line.

Lesson learned.

(adsbygoogle = window.adsbygoogle || []).push({});

The post “Oh you lazy cron!” – learning on Drupal cron issues appeared first on Liran Tal's Enginx.

Categories: Drupal

SQL user sync

New Drupal Modules - 4 September 2014 - 8:49am

This module allow to keep in sync two Drupal instances, and must be installed on both web sites.

The way it works is to update a table, on the slave website, with the user data, when a user is updated or created on the master web site.

Once the update is done, a url is fired via cURL on the slave website. This function read the data from the table, updated by the master, and create or update a user based on the email address.

To test/use this module you need:

Categories: Drupal

ECK Services Extend

New Drupal Modules - 4 September 2014 - 8:12am

this module will extend ECK services, let it support more feature.

Coming soon...

Categories: Drupal

Code Karate: Drupal 7 Node Class Module

Planet Drupal - 4 September 2014 - 6:39am
Episode Number: 166

In this episode you will learn how the Drupal 7 Node Class module works with the basic page content type. The simplicity of the Node Class module provides an easy way for site builders and themers to add a CSS class directly to the wrapper on the node. Using this module allows for various different layouts and styles to be called based on defined CSS rules.

Tags: DrupalContent TypesDrupal 7Layout ToolsDrupal PlanetCSS
Categories: Drupal

Drupal core announcements: Drupal core updates for September 4, 2014

Planet Drupal - 4 September 2014 - 2:59am
What's new with Drupal 8?

It has been a month since the last update on Drupal core development. In the meantime we met and worked hard together at TCDrupal and Drupalaton at the start of August triaging outstanding critical issues and resolving some. Also we collaborated on making Drupal's frontend better at Frontend United at the end of the month.

We've been doing such a great job taking care of the beta blocker issues that we are currently down to only one beta blocker as of this writing. What does this mean? Once we are down to no beta blockers left, a final alpha release is published. If there are no more beta blockers identified during a two-week window, the first beta release is published. Then we'll focus on resolving the hundred or so remaining critical issues to get to release candidates (once all of them are resolved).

Right now, help with the remaining beta blocker as well beta deadline and beta target issues is most welcome. Beta target issues may get in anytime later, but beta deadlines may not unless re-evaluated for inclusion regardless.

The best opportunity to get to work with Drupal developers in person is the 9 (nine) days of sprint opportunities coming up at the end of September at and around DrupalCon Amsterdam. It is the best way to learn Drupal 8 hands-on and help on the way.

Where's Drupal 8 at in terms of release?

Last week, we fixed 8 critical issues and 12 major issues, and opened 4 criticals and 7 majors. That puts us overall at 104 release-blocking critical issues and 644 major issues.

Where can I help? Top criticals to hit this week

Each week, we check with core maintainers and contributors for the "extra critical" criticals that are blocking other work. These issues are often tough problems with a long history. If you're familiar with the problem-space of one of these issues and have the time to dig in, help drive it forward by reviewing, improving, and testing its patch, and by making sure the issue's summary is up to date and any API changes are documented with a draft change record, we could use your help!

More ways to help
  • Pick a critical issue or beta deadline issue, take the time to thoroughly read the issue (including doing some background reading if necessary to understand the problem space), and then update the issue summary for the issue. Include a summary of the current status and remaining tasks for the issue, and identify any API changes the issue would introduce. Consider whether the change would require a change record or updates to existing change records. Consider what the implications of not resolving the issue would be, or of resolving it after the first beta or after release.
  • We also need help writing help text for core modules like Field UI, Image, Taxonomy and Toolbar. This is an easy way to learn the Drupal Core contribution process and start contributing to Drupal Core.

As always, if you're new to contributing to core, check out Core contribution mentoring hours. Twice per week, you can log into IRC and helpful Drupal core mentors will get you set up with answers to any of your questions, plus provide some useful issues to work on.

You can also help by sponsoring individual Drupal core development.

Notable Commits

Some of the best of git log --since "August 4, 2014" --pretty=oneline (277 commits in total):

  • Issue 1510544 by swentel, Bojhan, Gábor Hojtsy, merlinofchaos, Cottser, Wim Leers, plopesc, aspilicious, sannejanssen, larowlan, tim.plunkett, nod_: Fixed Show previews in front-end theme, able to select different view modes. This was a long time coming. Finally, your node preview will not appear on the backend!
  • Issue 2248767 by effulgentsia, beejeebus, alexpott: Use fast, local cache back-end (APCu, if available) for low-write caches (bootstrap, discovery, and config). Improves performance for some critical data a great deal.
  • Issue 2224761 by Gábor Hojtsy, alexpott, pfrenssen, effulgentsia, xjm, mlncn: Add a generic way to add third party configuration on configuration entities and implement for field configuration. Resolved a beta blocker by adding a facility for configuration entities to support third party settings. To be used for node types and other things as needed as well. Provides a simple solution when a full-on plugin architecture as in views is not suitable, but extension mechanisms are needed for configuration.
  • Issue 1966436 by naveenvalecha, cesarmiquel, Berdir, mr.york, jlbellido, segi, vasi1186, Leksat, Gábor Hojtsy, Schnitzel, grisendo, Aron Novak, likin, penyaskito, vijaycs85, kfritsche, fago: Fixed Default *content* entity languages are not set for entities created with the API. Now made Drupal properly create entities in the right language regardless of through the UI or API (eg. when adding a tag or uploading a file). Also makes entities created from the creation of the site be in the right language always.
  • Issue 2295469 by Cottser, dawehner | effulgentsia: Add support for static permission definitions with *.permissions.yml. Makes it possible to simply define permissions in a simple YAML file making this system consistent with several other in Drupal 8.
  • Issue 2271529 by attiks, alexpott, Lowell, YesCT, Jelle_S | mdrummond: Move breakpoint settings to theme and module *.breakpoints.yml files at root level. Improves developer experience providing breakpoints.
  • Issue 2317085 by pfrenssen | rteijeiro: Added the possibility to create a REST export when creating a new view. Makes it much easier to create simple web service views of Drupal content.
  • Issue 2250119 by ParisLiakos, Devin Carlson: Run updates in a full environment. Now that updates are not supposed to operate in API-incompatible environments, their implementation was unified with any other Drupal environment.

You can also always check the Change records for Drupal core for the full list of Drupal 8 API changes from Drupal 7.

Drupal 8 security

With the API stabilizing we are focusing on security again. In our last issue we already reported on Twig autoescape now being on, sometimes resulting in unwanted HTML strings appearing on the page because of double escape bugs. Please check the meta issue if you see these.

  • The router service is now access aware so there is no need now to separately access check the routes returned from it.
  • Building on this, now menu links, shortcuts and link fields use a unified path validator service..
Drupal 8 Around the Interwebs Drupal 8 in "Real Life" Whew! That's a wrap!

Do you follow Drupal Planet with devotion, or keep a close eye on the Drupal event calendar, or git pull origin 8.0.x every morning without fail before your coffee? We're looking for more contributors to help compile these posts. You could either take a few hours once every six weeks or so to put together a whole post, or help with one section more regularly. Read more about how you can volunteer to help with these posts!

Categories: Drupal

tanay.co.in: Telize - Simple IP-based Redirection Module for Drupal Sites

Planet Drupal - 4 September 2014 - 12:54am

Was working with a customer who required simple IP-based redirection for Drupal Sites.

Was analyzing the various existing options:

  • Smart IP : Looks good. But sets sessions which break Varnish Caching. Most Drupal sites run from behind Varnish Reverse Proxy and using Smart IP would mean either forgoing varnish caching or having to add complex VCL rules.

  • Geo-Redirect : Again, would not work well with Varnish. The first redirection will be cached on Varnish and all subsequent users from different countries might be redirected to the cached redirection. Requires additional GeoIP.dat file to be downloaded and this should be updated frequently.

  • Using MaxMind API : Most hosts like Acquia allow the Maxmind API to be integrated on the balancers so that Varnish maintains country code in the cache (preventing the same redirection to be cached). The country code is added to the headers in both request and response. This is the ideal way to implement GeoIP for any enterprise site. But it requires dedicated load balancers, and there is no plug-and-play module to utilize the API requiring custom development.

  • And a plethora of other modules that break varnish in similar ways..

What I wanted:

  • Simple country-based redirection

  • Should not break caching / varnish

  • Should not require GeoIP datafiles to be downloaded and maintained

  • Should be simple and light-weight

  • Good-to-have, though not mandatory : Zero or Low subscription cost

A hour-long search resulted in nothing significantly useful for Drupal.

Finally found this API : http://www.telize.com/ . Sounded promising.

  • The API powering the site is opensource

  • There is no rate limit of any sort at the moment, and the service is free for everyone to use.

  • Used GeoLite data created by MaxMind

The API was exciting but still it was not something that could be plug-n-play’ed on Drupal.

Built this module - https://www.drupal.org/project/telize

  • Simple Country-based redirection

  • Redirection happens at front-end through JS. Works on top of Varnish

  • Does not set any session cookies. Won’t break your Varnish

  • No subscription required

  • No additional files/libraries required

Try it out of you have simple GeoIP redirection requirements.

 
Categories: Drupal

REST API

New Drupal Modules - 3 September 2014 - 2:12pm

Provides tools and an API for developers to leverage to rapidly build out RESTful services. More to follow

Categories: Drupal

osCaddie - Google Cloud Storage

New Drupal Modules - 3 September 2014 - 1:53pm
Overview
Categories: Drupal

Visiting China and Japan

Dries Buytaert - 3 September 2014 - 10:55am
Topic: Drupal

After spending the summer in Boston, I'm ready to fly across the world ... literally, as I'm leaving on a two week trip to China and Japan later this week. I'm very excited about it as I've never had the opportunity to see either of these countries.

I will arrive in Beijing on Saturday, September 6th, for the Young Global Leaders Annual Summit. A private path from where I'll be staying leads to a non-restored section of the epic Great Wall of China. Exploring this truly untouched piece of Chinese history still in its original landscape should be a special experience! Stay tuned for photos.

Following my time in Beijing, I'll transfer to Tianjin to attend Summer Davos. In addition to that, we're organizing a meetup with the local Drupal community - https://groups.drupal.org/node/434658. If you are in the area on September 10th, please stop by for a drink. I'd love to meet you and learn about the state of Drupal in China.

I'll end my two week trip in Tokyo, Japan. My time will be split between meeting the local Drupal community - https://groups.drupal.org/node/440198, understanding the adoption rate of Drupal in the Japanese market, and attending private meetings with digital agencies, Acquia partners and others to learn about the state of the web and digital in Japan.

Xièxiè and dōmo arigatō to those that have helped plan these events and gather the Drupal community for some fun evenings!

If you aren't able to make either Drupal meetup, feel free to leave your thoughts in the comments.

Categories: Drupal

Dries Buytaert: Visiting China and Japan

Planet Drupal - 3 September 2014 - 10:55am
Topic: Drupal

After spending the summer in Boston, I'm ready to fly across the world ... literally, as I'm leaving on a two week trip to China and Japan later this week. I'm very excited about it as I've never had the opportunity to see either of these countries.

I will arrive in Beijing on Saturday, September 6th, for the Young Global Leaders Annual Summit. A private path from where I'll be staying, Commune by the Great Wall, leads to a non-restored section of the epic Great Wall of China. Exploring this truly untouched piece of Chinese history still in its original landscape should be a special experience! Stay tuned for photos.

Following my time in Beijing, I'll transfer to Tianjin to attend Summer Davos. In addition to that, we're organizing a meetup with the local Drupal community - https://groups.drupal.org/node/434658. If you are in the area on September 10th, please stop by for a drink. I'd love to meet you and learn about the State of Drupal in China.

I'll end my two week trip in Tokyo, Japan. My time will be split between meeting the local Drupal community - https://groups.drupal.org/node/440198, understanding the adoption rate of Drupal in the Japanese market, and attending private meetings with digital agencies, Acquia partners and others to learn about the state of the web and digital in Japan.

Xièxiè and dōmo arigatō to those that have helped plan these events and gather the Drupal community for some fun evenings!

If you aren't able to make either Drupal meetup, feel free to leave your thoughts in the comments.

Categories: Drupal

Cruiskeen Consulting: Yet Another Drupal News Source

Planet Drupal - 3 September 2014 - 9:55am

The world is full of Drupal news sources - Planet Drupal, Drupal Fire, Groups.Drupal.Org, and many many more.  So of course we've decided to build another one. 

Why?  Because we can. And because we've been spending a lot of time playing around with Rebelmouse.  So - aggregating content from all over the planet, we bring you Drop News

Categories: Drupal

Phase2: Better Development Through Emotional Intelligence

Planet Drupal - 3 September 2014 - 9:11am

I am unabashedly an engineer. I obsess over the pursuit of finding the most efficient solution to any problem.

In the realm of open source software, this approach has served me well. We read, reverse-engineer, fork, improve, and share. I want my process to be faster, more flexible, and maintainable for the long haul.

As I’ve investigated different methodologies, one characteristic I constantly underestimate is the team dynamic. I tend to pigeon-hole my mind into thinking that the solution to a problem is the most important goal.

Hey look! There’s a problem! I must find a solution for it.

  • What if complex problems can’t be solved by me?
  • What if, when I suggest a tool or a programming philosophy, it masks the need to dive deeply into other factors?

The more I researched my approach, I came across a concept that is vital to team effectiveness when solving complex problems: emotional intelligence.

Emotional Intelligence, sometimes referred to as EQ (emotional intelligence quotient) to complement IQ (intelligence quotient), is the ability to be aware of, express, control, reason, and interpret emotions appropriately.

Within a team, many, many, many studies have shown that EQ, more than IQ, is the key to solving complex problems.

The team dynamic is engrained with the DNA of open-source projects. Any Drupal issue queue or Packagist library commit log supports that.

The better question I ask myself, however, is:

  • Are the teams I work on the most emotionally intelligent?
  • If not, what am I doing to improve that metric?

Peeling back this onion revealed the societal constructs that affected how I view an effective team.

Typically, I look to the most technical people I know for answers. In some cases, I follow the stereotypical engineer playbook of positing a hypothesis, demanding evidence, and playfully browbeating a decision.

Put another way, how many times have I jokingly used the phrase ” Are You  doing it wrong?” and is that the most effective solution?

As the research suggested, this emotionally oblivious approach was philosophically incongruent with proven science!

  • How could I call myself an engineer?!?!
  • How could I obsess about the pursuit of efficiency and solution, when my own attitude was blunting my team’s effectiveness?

I needed to do better.

I needed to find something, rooted in math and science, that helped me understand how to refactor my way of thinking.

I then learned about perspective and heuristic techniques. Perspective is how one looks at a problem. Heuristic is the mental shortcut one uses to arrive at a solution. Both are shaped by experience and knowledge, but the nuance in process from a variety of individuals is key.

Dr. Scott Page elaborates :

The diversity of an agent’s problem-solving approach, as embedded in her perspective-heuristic pair, relative to the other problem solvers is an important predictor of her value and may be more relevant than her ability to solve the problem on her own. Thus, even if we were to accept the claim that IQ tests, Scholastic Aptitude Test scores, and college grades predict individual problem-solving ability, they may not be as important in determining a person’s potential contribution as a problem solver as would be measures of how differently that person thinks.

It opened my eyes to how I’ve been going about solving complex problems all wrong.

In the context of a complicated problem, there is a higher likelihood of finding a global optimum (the best solution) when you have a diverse set of team members with local optimum (their best solution). Put simply, I needed to engage more (not less) with people who were different than me.

In essence, given the right conditions, diversity trumps ability!

What’s interesting about this research, however, is the fact that communication among members with different perspectives is very difficult.

In fact, as Dr. Page continues:

Problem solvers with nearly identical perspectives but diverse heuristics should communicate with one another easily. But problem solvers with diverse perspectives may have trouble understanding solutions identified by other agents.

Thus, we’ve come full circle to why EQ is so important.

If team members are not in-tune with each other, the benefits gained from their diversity can be lost. It is vital, therefore, in my unabashed obsession to being an engineer, that I not only need to improve my EQ, but surround myself with colleagues who have a high EQ and learn from them.

So what are the characteristics of high EQ individuals? Statistically, who has high EQ?

Some of our thought leaders here at Phase2 have answered that question.

If you’re interested in learning more, find me as I share my ideas on a building a more inclusive community at various conferences and camps!

Categories: Drupal

Michael J. Ross: Drupal 8 Core's Own Directory

Planet Drupal - 3 September 2014 - 8:08am

By

This article was published in the print magazine Drupal Watchdog, Volume 4 Issue 1, 2014-05, on page 21, by Tag1 Publishing. The magazine was distributed at Drupalcon Austin, 2014-06-02.

Prior to Drupal 8, the core directories (includes, misc, modules, profiles, scripts, and themes) were located in the installation's root directory. Drupal 8 consolidates them into a new "core" subdirectory, which tidies up the root directory and should make it easier to track changes to core versus contrib or custom files. There are still three root subdirectories for modules, profiles, and themes, which can be used for custom and contrib projects. Each directory initially contains only a README.txt file explaining the repurposing and how developers can still use the pre-D8 "sites/all" scheme.


Figure 1. Drupal 8 root directories and files

Copyright © 2014 Michael J. Ross. All rights reserved.

Categories: Drupal
Syndicate content


Google+
about seo