Planet Drupal

Subscribe to Planet Drupal feed - aggregated feeds in category Planet Drupal
Updated: 55 min 22 sec ago Cracking 'Acquia Certified Drupal Site Builder' Certification

Fri, 06/03/2015 - 06:08

I took the “Acquia Certified Drupal Site Builder” certification exam last weekend. Cleared the exam with a 90% score.


The blueprint of the exam with the usual details like Time Limit, Number of questions etc is available @



This exam is definitely the easiest among the 4 Acquia Certifications available currently. The others being - 1) Acquia Certified Developer 2) Acquia Certified Developer-Back end Specialist and 3) Acquia Certified Developer - Front End Specialist


This should be an easy kill for any Drupaler who has good experience building websites with Drupal core and the Contrib Modules available. However I do not remember facing specific questions about any contrib modules other than Views.


I believe the exam would be more comprehensive if it also tested on some more contrib module that are very extensively used in building Drupal Sites. Like Rules, Context, Webform, Pathauto, Panels etc


When it comes to preparing for the examination, you would need no preparation if you have built at least a couple of medium/large websites using Drupal, leveraging all of the functionalities available in Drupal core and Views.


If you were to quickly recep before jumping in for the exam, you could take this approach:


Install the latest version of Drupal. Add the module admin_menu. This will make all the admin pages of the site easily accessible. Start with Content, and proceed one by one till the Help tab, exploring all sub-navigation items one by one thoroughly understanding what functionality is achieved from each of these administration pages.


Ensure you understand thoroughly:

  • Content

  • Managing content. Publishing, Unpublishing.

  • Commenting system

  • Structure:

    • What are blocks? Why would you use them? Where would you place them? How are they created? What are the various blocks provided by various modules available in core?

    • What are content types and nodes? When would you create a new content type? Check the various configuration options available under each content type.

    • What are menus? How do you create them? How do you place them on the site?

    • What are Vocabularies? What are terms? When would you create a new vocabulary vs When would you create a new content type?

  • Themes:

    • Enabling and Disabling themes. Theme configuration.

  • People:

    • What are roles? What are permissions? How are users, permissions and roles related? How would you add a user to a role?

  • Modules:

    • What are contrib modules? How would you find the right one you need? How do you select from the various options available? How would you download a contrib module? How to install one? How to keep the module updated? How to remove the module? Disabling a module. Uninstalling a module.

  • Configuration:

    • What are text formats? What are filters? How are they related? Why would you need them? How do they help you in securing the site?

    • File System. Public and Private. What happens to the uploaded files? How to upload/attach files to content? What are image styles? Why would you need them? How do they help? How do create new image styles?

    • Under account settings, check out the various options related to user accounts. Adding fields to user profile. Configuring who can register on the site. Configuring the various emails sent out to the users at various stages of the registration process.

    • Under ‘Regional and Language’, check out how to configure the locale and timezone settings, the various date formats available and how to add new ones.

    • Configuring the core search, Indexing and Content Ranking Settings.

    • Managing aliases (without Pathauto) as well as basic automation of aliases using Pathauto

    • Configuring Site Information like Site Name, Slogan etc. Configuring Cron.

    • Take a look at the Aggregator module that comes with core. Make sure you are familiar with what the module is for and how to configure it to pull some feeds into your site.

    • Check out the development options available like Various caching options and how they affect the display of the site. What are the various logs accessible from within the Drupal site. The status report page. What is maintenance mode? Controlling display of various type of errors and notices displayed on the site.

  • Views:

    • Apart from being able to build fairly complex views, ensure you understand the following thoroughly:

    • Views Relationships

    • Contextual Filters

    • Views Attachments

    • Rewriting Field output

    • Configuring the format of display of fields

    • Views Cache Configuration

    • Adding Headers and Footers to Views

    • In short, ensure you thoroughly understand each of the options available on the views configuration.


Mainly, the blue print @ lists various scenarios, like “Given a scenario, identify when a contributed module would be needed." Ensure you are able to answer all of them before attempting the exam.


Unlike the other exams in the certification series, this exam would not require much time to complete. I managed to complete the exam with about ~30mins still remaining.


Who should take this:

For regular Developers, I would recommend that they take the Acquia Certified Developer exam or Backend Specialist exam first which would be a more powerful showcase of their deep Drupal skills.


This exam will be a good value addition if you belong to one of the below categories:

  • Jr Developers starting with Drupal and too early to take the Acquia Certified Developer or Backend Specialist exams

  • Freelancers building websites with Drupal and who are not much into Module Development yet. (The immediate one I had in mind was Miss Jayalakshmi Jayanth. She builds amazing stuff with Drupal though she has not ventured yet into custom module development. This certification will definitely be a good showcase of site building skills of such freelancers)

  • Project Managers and Engagement Managers managing Drupal Projects. Though not essential, I, as a customer would remain very peaceful if I am assure that the manager managing my project knows what is what of Drupal.


All you need to know about the exam is here :


You can schedule the exam by clicking on “Schedule a Test” on the above page.

Categories: Elsewhere

Darren Mothersele: Atomic Drupal Workshop

Fri, 06/03/2015 - 01:00

If you're a frustrated web developer spending more time battling with Drupal than enjoying its benefits then this may be the most important article you read today. I'm going to explain how I've hacked the Drupal site building process to make it easier and more fun.

I started exploring this process a couple of years ago. After years of Drupal experience, with it's ups and downs, something clicked. I thought I was in control before, but there would always be some part of a project where I felt like I was fighting with Drupal. I tried many different approaches, but once I found this methodology there was no looking back.

I've been developing this system for a couple of years, and in recent months I've started to see more people talking about it, conference sessions, and blog posts that talk about some of these ideas. None of this is unique, but I have pulled together various elements into a process, or system that anyone can use to simplify their Drupal site building.

In this article I hope to bring together a few key points that I think make the most difference to the success of a project.

My work in the past year has taken me into many agencies and I've worked with experienced Drupal developers, and with excellent developers but who were new to Drupal. On the one hand I've seen Drupal developers artificially constrained to produce "Drupaly" solutions because of perceived limitations of what's possible with Drupal, and on the other hand I've seen developers struggle to get Drupal to do what they want to do.

Perhaps you can relate to this story...

I went into an agency early last year to help with a late running project. There was nothing particularly unique about this website, other than it had some really nice design elements and was a stunning example of responsive design. But, hiding below the surface was a confusing Drupal implementation and a mess of spaghetti code.

Several developers had worked on the project, and it showed. Competing Drupal modules were being used to achieve the same thing in different parts of the site, the CSS used multiple grid systems, and the general lack of consistency meant the final stages of the project, bug fixing and cross device testing were proving difficult.

Requirements and designs had changed during the project, and so had the developers, which meant that rather than understand what had been done before, the developers hacked on extra bits of code, put in more and more CSS overrides to target specific elements to tweak the styles.

The result was a site that was proving impossible to get working across all devices, and as bugs were fixed, more were being introduced and discovered. Slight changes were having unexpected knock on effects across the whole site.

When I looked at the site, I congratulated them. They had produced a great prototype. They had gone a long way around to get there, but what they had done was understand the problem, and discover exactly what was required in a solution. This resulted in something that worked really well as a prototype. What they hadn't done was produce a production-ready site.

I helped them take a few steps back, which at the same time was a huge leap forward. With the knowledge they had gained we could work with Drupal to get the project completed, rather than battling against it.

What to learn from this?

Consistency is important, and prototyping helps to clarify what is required in a solution. Doing all the testing and bug fixing at the end of a project is hard, gets out of control, and causes missed deadlines.

Introducing Atomic Drupal

I've been looking at the emerging atomic design movement, component-based design, or style-guide driven development, and I've taken best practise from the cutting edge of web design and combined it with over 7 years experience of pushing Drupal to it's limits and past them.

Where I've ended up is a system for converting ideas into effective websites. A way of working with Drupal rather than against it, with the aim of shifting the focus of a project from development and bug fixing to solving new and interesting problems. Making the basics of site building easy and fun.

People I've introduced to this already have found they can now do more with Drupal and say yes to more of clients requirements, and work on more interesting projects.

Atomic Design

A component-based approach to the front end means creating more maintainable and flexible designs. There are a few tricks to getting this to work in Drupal, but the most important are: taking full control over Drupal's markup, and planning out a consistent approach to building the site.


An added benefit of taking a component-based approach is the decoupling of front-end design and development from the back-end CMS implementation. The biggest win is that you can build and test all your front-end code separately to the CMS build (you're not constrained to using Drupal's markup). This means you can test and validate your front-end code early on in the project, you can test across devices and browsers earlier in the process, and therefore not leave all your big fixing until the end of the project.


Get in touch if you're interested in learning more as I am running workshops on Atomic design with Drupal for agencies and individual developers. Check my training page to see upcoming dates for public courses (at the time of writing the next scheduled public workshop is 2nd April).

This workshop will cover how to take full control over Drupal's markup, resetting and removing Drupal's own markup and replacing it with your own. How to work with Atomic design and component based design principles in Drupal. Debunking the most common myths around Drupal front end code, and fixing the single biggest cause for late running projects and missed deadlines.

Categories: Elsewhere

Palantir: Meet us in the Middle

Thu, 05/03/2015 - 22:15

MidCamp is the Midwest's premier DrupalCamp, where developers, designers, strategists, UX professionals, project managers, and many others gather to share ideas on a variety of topics and technologies. We're excited about the camp for a lot of reasons: our CEO Tiffany Farriss has been asked to give the keynote, members of our team are leading a variety of sessions and providing training, and, of course, simply the opportunity to be in attendance.

Community is the key here. Local community. Technology is grand when it works, but the IRL connections you make with your peers trumps anything on an IRC channel or Google Hangout, so we're giddy with excitement to be social and geek out about the things we love. These kinds of conversations advance things for all of us professionally and personally.

As you might suspect, we're up to a lot of things at MidCamp (not to mention helping on an organizational level). In particular, we are absolutely committed both to the Drupal community at large, and on a local level so we've proudly sponsored the camp at a Gold Level this year.

What else? Plenty! We've outlined everything in a handy list for you:

Onsites and Project Kickoffs that Work

In this first of two training sessions. Project Managers Allison Manley and Chad Goodrum will show you how to best utilize the time you have with clients when starting a project. You don't want to miss this, as we'll provide real world examples along with plenty of tools and techniques so you'll leave with a deeper understanding of how to ensure that your projects start and stay strong. We'll also share some sample documents and resources that you can build on as well. Note that registration is required with a cost of $175 per seat, and all trainings include coffee, snacks, and lunch. Sign up early as space is limited.

Date: Thursday Mar 19
Time: 9am - 12pm
Room: SCE Illinois AB

Absolute Beginners Guide to Drupal

Next, Engineer Michelle Krejci and Build a Module founder Chris Shattuck present this learn-at-your-own-pace training, designed to introduce you to Drupal basics and give you a chance to explore the material from Build a Module that meets your needs. Note that registration is required at $49 per seat, and all trainings include coffee, snacks, and lunch. Sign up early as space is limited on this, too.

Date: Thursday Mar 19
Time: 1pm - 5pm

Economics of Drupal Contribution

Palantir CEO Tiffany Farriss is keynoting the camp with this talk where she will explore how other open source communities provide a strategic framework to their communities and how the Drupal Association could provide structural support to balance the needs of contributors and a successful project.

Date: Friday Mar 20
Time: 9am - 10:15am
Room: SCE Illinois AB

Don't Let the Pigeon Drive Your Project!

Palantir founder and CEO George DeMet presents a non-technical talk—inspired by values frequently explored in children's literature—on how building successful Web solutions for other people requires discipline, understanding, and empathy. He'll cover topics that include managing stakeholders, positive negotiation techniques, and keeping budget, timeline, and scope on track.

Date: Friday Mar 20
Time: 12:30pm - 1:30pm
Room: SCE Illinois C

On PhpSpec and Not-the-Drupal-Way: follow the black kitten through the Looking Glass

Engineer Michelle Krejci demos PhpSpec and shows how this tool can help you write better code and modernize your developer skills.

Date: Friday Mar 20
Time: 1:45pm - 2:45pm
Room: SCE Ft. Dearborn B

Off with Drupal's Head!

Web Designer Ashley Cyborski and Lead Engineer Steve Persch are part of a panel called Off with Drupal's Head! where they'll discuss a variety of techniques used to implement a “headless Drupal."

Date: Friday Mar 20
Time: 4:30pm - 5:30pm
Room: SCE Ft. Dearborn B

Rendering HTML with Drupal: Past, Present and Future

Steve Persch is also presenting on the mental models used in Drupal theming in recent history and in the future with Rendering HTML with Drupal: Past, Present, and Future.

Date: Saturday Mar 21
Time: 09:00 - 10:15
Room: SCE Illinois C

From Zero to Silex

Larry "Crell" Garfield explores Silex and explains what exactly this ready-made request/response pipeline is (and isn't). A small but functional application file will even be built during the session!

Date: Saturday Mar 21
Time: 3pm - 4pm
Room: SCE White Oak AB

How about you? Attending the camp? Any fun after-hours meetups you're attending? Please do let us know on Twitter @palantir, or by commenting below. Hope to see you there.

Categories: Elsewhere Drupal Blog: Inside HubDub, Part 2

Thu, 05/03/2015 - 18:02

Last week, we announced our new interactive video module for Drupal, HubDub. We followed that up with a more detailed under-the-hood look at how HubDub works. Now, I'd like to take a look at a key part of the technology that drives HubDub: jPlayer.

Why Video Overlays?

As a company that specializes both in video production and web development, incorporating video with our work is a natural extension to our web development efforts. One of the more frequently requested features is an HTML overlay that permits the viewer to submit a donation or feedback on the video in question. To that end, we have been developing a Drupal module, Hubdub (sorry Wordpress folks, there are no confirmed plans to create a corresponding plugin, yet), that displays videos as Drupal blocks, with the option of displaying overlays with arbitrary show/hide times. Its a useful project for us, as formerly, this sort of thing had been implemented on a case-by-case basis in template files or custom modules with little to no customization permitted.


For the front-end display, I am using jPlayer to render the video (with preference for HTML5 and Flash as the fallback). I selected jPlayer as a familiar and reliable video library that supports timeupdate events (very helpful for timing overlay displays).  In this current iteration of the module, we are not yet offering any jPlayer option controls on the backend, although that’s coming soon!  For the time being, it offers the bare minimum functionality: title, video URL (at this time this must be an mp4 file or RTMP stream), unlimited overlays with title, markup, and start/end time.

This current iteration does not yet provide full HTML5 cross-browser support. This requires the ability to provide fallback video formats for the video (example: mp4 is required, but webm and ogg files would be permitted to more broadly display video as an HTML5 video).  However, this will also be coming soon.

Finally, this version of the module does not support Youtube streaming, yet.  But, stay tuned.  Numerous new features are planned!

We're always eager to hear your feedback! Please post bug reports, feature requests, and support questions in the HubDub issue queue. Next in our HubDub series, Alexis will have some tips on styling video overlays.


Categories: Elsewhere

Mediacurrent: 5 simple things you can do to make your site more accessible

Thu, 05/03/2015 - 17:24

Web accessibility is about making websites accessible to people with disabilities.  Those disabilities include everything from blindness and varying degrees of vision impairment to a broken bone in a dominant hand to cognitive disabilities such as dyslexia.  Making websites usable by those with disabilities is not as difficult as you may have been led to believe. There are things that are considered just plain good practice in building a website that can make a site vastly more accessible to all.  Here are 5 things that can easily be accomplished with most sites:

Categories: Elsewhere

Pronovix: Recurring payments in Drupal

Thu, 05/03/2015 - 15:07

Drupal is a great platform for commerce. For simple tasks it’s very easy to get started with the Commerce Kickstart distribution, but there’s no consensus on what to use for more complex features. This means you might need to perform a long research to be able to choose a solution for more complex e-commerce tasks.

In a recent project we needed a solution for recurring payments, so I thought I’d share the results of our research.

Recurring payments

When your customers pay for your service or product periodically, you need recurring payments. Subscriptions are a good example.

For recurring payments you need to handle the following:

Categories: Elsewhere

InternetDevels: DrupalTour: the fourth point discovered

Thu, 05/03/2015 - 11:57

DrupalTour aims at spreading the word to different cities. But the point is not just in that! We are also just having fun :)

It is already a fourth DrupalTour and this time we were heading to Khmelnitsky. Every point of destination is more and more distant from Lutsk, so the crew of Drupal van has to get up early… This time we started our journey at 7:30 AM to arrive to Khmelnitsky at 11 AM.

Read more
Categories: Elsewhere

KnackForge: Caching in Drupal

Wed, 04/03/2015 - 23:20

Drupal comprises several layers of execution and it obviously consumes pretty much time to render content from dynamic PHP code. Caching is a key technique to maximize the performance of Drupal. Before adopting a caching mechanism in Drupal, one must consider the type of site and the type of users coming to the site. Not all sites could have same caching mechanism.


Caching techniques could be classified at various levels depending on type of data being cached and the user affected. Drupal can have broadly two kinds of users.

  1. Anonymous Users

Categories: Elsewhere

Lullabot: A Lullabot’s Guide to Successful Meetings

Wed, 04/03/2015 - 20:00

One of the core skills of our client services team is the ability to communicate clearly, efficiently, and humanely to each other and to our clients. It’s this communication that gets us through gnarly project roadblocks and beyond the purely technical solutions. Unfortunately, this can lead to the dreaded wave of “calls”, “syncs”, “touch-bases”, and “meetings” which eat up our calendar hours.

Categories: Elsewhere

Amazee Labs: #DCLondon 2015: “If I can do it, so can you”

Wed, 04/03/2015 - 17:49
#DCLondon 2015: “If I can do it, so can you”

For the third time, Drupalcamp London warmly welcomed passionate drupalistas who flew in from all over the world to do Drupal, talk Drupal and live even more Drupal. 

The rainy Saturday of February 28th was lighten up by the inspirational talk of Dr. Sue Black who shared her story of how she went from a young single parent with 3 little children to become a computer scientist, entrepreneur and social activist. “If I can do it, so can you” is the message to all of us. Her program #techmums is one of the possible steps towards a not only more equal world, but towards a better future for all of us. Drupal and its open, strong and supportive community is one of those steps as well.

Drupal 8 is coming and you can feel the excitement within the community. I can’t help myself but I am absolutely exited every time I think about the enthusiasm and effort the community puts into battling issues and creating beautiful solutions. In the session of Schnitzel we saw an amazing improvement in terms of multilingual. This is a huge promise not only for Drupal 8 based client projects, but also for people who want to get digital and learn technology with a little help of their own native language. Anyone who speaks a second language can contribute and support this initiative

It was a pleasure to learn more about frontend tools in the talk “Rocket surgery for brain scientists” of Tom Bamford. He even talked about accessibility.

In the presentation of Josef we learned how to upgrade the Drupal 7 modules that integrate with rules to Drupal 8. This module is very important from the UX perspective as it helps us to create and send customized mails notifing your users about events of a wide variety starting with the new comment added to a blog post and ending with the emails on successful purchase in your online shot. Integrating this module into Drupal 8 Core is a great step towards more scalable and user-friendly solutions.

IPaul Rowell talked about what we call editor user experiencein his session. This is also an important topic for us at Amazee Labs as we want to be friends with our content editors. It's always great to get fresh and new input on this topic and to compare different approaches.

For myself it was a special DrupalCamp as it was the very first time that I gave a presentation with the aim of sharing our way of applying the User Centered Design approach. I was more than happy to receive interesting questions, seeing smiling people and feeling like a part of the Drupal community.


Seeing familiar faces, creating an impact by sharing knowledge and sprinting, is enriching and gets me even more motivated – this is what this DrupalCamp was about. We are looking forward to attend DrupalCamp London in 2016. 

Categories: Elsewhere

Drupal core announcements: Drupal core updates for March 4th, 2015

Wed, 04/03/2015 - 17:48

Since the last Drupal Core Update, the Seventh Beta of Drupal 8.0 was released (and Drush 7.0.0-alpha9 was released to coincide with it), and Mink and Goutte were added to core to support behavioural testing!

Some other highlights of the month were:

How can I help get Drupal 8 done?

See Help get Drupal 8 released! for updated information on the current state of the release and more information on how you can help.

We're also looking for more contributors to help compile these posts. Contact mparker17 if you'd like to help!

Drupal 8 In Real Life
  • DrupalSouth Melbourne is happening March 5—7 at the Melbourne Convention and Exhibition Centre in Melbourne, Victoria, Australia, featuring sprinting and lots of speakers.
  • DrupalCamp Hyderabad will be on March 7th and 8th in Hyderabad, Telangana, India.
  • DrupalCamp China will be held on March 14th in the famous Pudong district of Shanghai, China, featuring a session on open-source e-commerce by Ryan Szrama, VP of Community Development at Commerce Guys.
  • European Drupal Days will be March 19—21 in Milan, Italy. The 19th will have sessions on Drupal 8 theming, the future of commerce in Drupal 8, #d8rules; the 20th will have workshops on continuous integration, Symfony, dependency injection and theming, and the 21st will be lots of sprinting!
  • MidCamp is coming up on March 19—22 at the University of Illinois in Chicago, Illinois, USA. There will be training, speakers, and lots of sprinting! Tickets are still available, but hurry before they're sold out!

Also, don't forget to vote for your Drupal Association Community Director — voting is open March 9th through 20th!

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. If you'd like to volunteer for helping to draft these posts, please follow the steps here!

Categories: Elsewhere

Amazee Labs: Drupal Elections: The Drupal Association Board and it’s responsibilities

Wed, 04/03/2015 - 17:18
Drupal Elections: The Drupal Association Board and it’s responsibilities

Voting for the Drupal Association Board’s Director At Large position opens this Monday, March 9th. My two main reasons for seeking this role, why I feel I am a qualified candidate, and a discussion on the responsibilities of this position are outlined in the following post.

My Main Reasons For Running

First, the “Director At Large” position is representing the whole Drupal Community inside the board. Therefore the person holding the board position should need to know and understand the community in all it’s facets. I believe I am one of those individuals who reaches across a wide spectrum of the community and can offer a higher representation. I help organize DrupalCons and Camps, speak at different Drupal events all over the world, give trainings, along with mentoring new users at sprints. I meet with other CxO’s and interested high level business associates to teach them how to contribute back to Drupal, and still maintain steady code contributions to core via the Drupal 8 Multilingual Initiative and contrib modules.

A Note Regarding Board Responsibilities

One really important piece of information I want to stop and make sure is understood, is what it REALLY means to be on a board of this nature. The Drupal Association Board is a strategic board, meaning the Board defines the strategic direction and policies of the Drupal Association. The execution of these goals is then in the hands of the Executive Director (Holly Ross) and her staff within the Drupal Association. My personal experience with this structure comes from being on the Board of Amazee Labs Zurich, where we define strategies and directions for the CEO. I feel I should explain and offer further definition of the role of a strategic board member. Often on a strategic board you are faced with wonderful ideas you would like to execute immediately or at times even execute yourself as the board. It is important to keep the responsibilities clear however, that you are there as a strategic guide and must let the company executives figure out how best to pursue and execute strategies.

This same distinction of responsibilities applies to the Drupal Association Board, and it’s candidates are signing onto a role within a structured system. The ‘Director at Large’ role gives an insight into the Drupal community’s general needs and stress points. The role does not include actions like the power to give direct orders to Drupal Association staff. While many may understand this distinction, it is important to make sure voters expectations are managed and candidates are reminded what they are stepping forward to take part in. This might sound overly structured (especially for a volunteer based community), but in the end the Drupal Association is a nonprofit with goals and budgets to follow. In fact budgets are more important than many realize. The Drupal Association Board is actually responsible for the financial oversight of the Drupal Association. What does this mean? It translates in legal terms to direct financial responsibility by all board members should the Association financially fault. That responsibility translates to a great deal of deep budgetary spreadsheet analysis conducted by members, both a very important and very tedious task. It’s like the issue queue: Someone has to review the code and mark it RTBC!

Thank you for taking the time to read where I stand on important issues and my public service announcement around what the responsibility of this candidacy truly means. I’m really looking forward to the upcoming vote beginning March 9th and ending March 20th. Until then, I strongly suggest everyone in the community check out all the passionate Drupal candidates keeping in mind not only their vision but experience in this type of role.

Should you have any further questions for me, I will be conducting a Reddit AMA this Thursday March the 5th starting at 5pm CET (11am ET).

Categories: Elsewhere

3C Web Services: How to accept payments of varying amounts with Drupal Commerce.

Wed, 04/03/2015 - 15:42


The websites we build often require accepting a payment for something that isn't a product. For example, service payments, down payments or donations. There are different ways to handle this with Drupal Commerce and here we’ll outline the method we've adopted for use and explain how to implement it yourself.


Categories: Elsewhere

Drupalize.Me: New Multisite Series plus Installing Drush with Composer

Wed, 04/03/2015 - 15:15

This week, we're kicking off a new series, Working with Drupal Multisite. We're also releasing a new video in our Drush series, Installing Drush with Composer.

Categories: Elsewhere

Victor Kane: Five Things I didn't know about

Wed, 04/03/2015 - 14:54

I want to share some exciting things I'm only just finding out about (the “Develop, Deploy, Rinse, Repeat” continuous delivery cloud platform for Drupal, Symfony and PHP based projects) that look as if they might have a lot to do with folks finding a straightforward way of enabling a truly Lean process applied to website and web application projects. We'll cover five things I didn't know about

  1. The Standard Platform Workflow is just what modern, serious PHP, Symfony and Drupal developers might expect and can easily be set up for all team members.

  2. The Standard Platform Architecture is container based and scales tremendously well for most use cases.

  3. They don't use Varnish! They use CDNs (content delivery networks)!

  4. There's an Enterprise Platform with its own truly scalable architecture and unique benefits

  5. A chance to get a first-hand report from someone actually using the Enterprise Platform.

read more

Categories: Elsewhere

Acquia: Working with and

Wed, 04/03/2015 - 10:01
Language Undefined

Tips and tricks for getting the most out of – Patrick Drotleff is a passionate contributor to the Drupal project whose work – including,, and the tongue-in-cheek BreakingHead card game – often centers around building tools that help others contribute to Drupal. Within minutes of Drupal 8 beta being announced at DrupalCon Amsterdam, I saw a tweet saying it was available to try out on Though I had used the service before, I wanted to know how it actually worked and Patrick was kind enough to agree to show it off here on jam's Drupal Camp.

Categories: Elsewhere The Drupal 8 plugin system - part 3

Wed, 04/03/2015 - 08:32

Checkout part 1 and part 2 for understanding the concept of plugins.
In this installment, we will be

  1. Implementing a new plugin from existing plugin types.
  2. Implementing a new plugin type using the annotation based discovery mechanism.

As an exercise, let's first construct an imaginary scenario where the user of your Drupal site wants choose what they want for breakfast from a list of breakfast menu items. To add a dash of variety, all the breakfast items in the code are of South Indian culinary. You can checkout the code and suit yourself, change the breakfast items etc.

For this exercise, checkout the module code first and enable it.

$ git clone

In order to select their breakfast item of choice, the user needs to be presented with a list of choices in their profile. The lame way is to create a list field in the user profile and add all the breakfast choices. This offers limited functionality and is not pluggable. We can do better than that. So, let's ahead and create a custom field called breakfast choice.

This functionality is there in the custom-field-no-plugin tag of the code you previously checked out. You can switch to that tag by:

$ git checkout -f custom-field-no-plugin

After you enable the breakfast module, go to the user profile and create a new field of type "breakfast choice". As the tag says, we haven't created any custom plugin type yet. But we do create a new plugin from the existing plugin types for our custom field. In fact, we create 3 new plugins(one each for the field type, field formatter and field widget). Our directory structure looks like this:

All the breakfast menu items come from a single location, your custom field widget, the BreakfastWidget.php file.

public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) { $value = isset($items[$delta]->value) ? $items[$delta]->value : ''; $options = array( 'idly' => 'Idly', 'dosa' => 'Dosa', 'uppuma' => 'Uppuma', ); $element = array( '#type' => 'select', '#options' => $options, '#default_value' => $value, '#multiple' => FALSE, ); return array('value' => $element); }

Though it works, this is not a good design for 2 reasons:

  1. You are hardcoding in the presentation layer. Widgets define the way you present the input element in a form. You can't define your data there.
  2. It is not pluggable. Other developers have to open BreakfastWidget.php to add new Breakfast items.
  3. It cannot be extended. What if I want to add additional properties to my breakfast items, like images, ingradients or price? I cannot do this in the current setup.

We will address problems 1 and 2 for now. i.e., we add the ability to create new breakfast items outside of the Breakfast Widget file. We make breakfast items "pluggable". Other modules can add new breakfast items it were a plugin, which is exactly what we do next.

To get the plugin version of the module, do:

$ git checkout -f plugin-default-annotation

Now, our directory structure looks like this:

The BreakfastPluginManager is, as the name says, a service used to manage various breakfast plugins across modules.
The plugin manager's constructor class deserves some explanation.

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) { $subdir = 'Plugin/Breakfast';

The $subdir tells the plugin manager where to look for Breakfast plugins in a module.

$plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin';

The $plugin_definition_annotation_name is the namespaced name of the annotation class which is used to annotate all Breakfast plugins. Plugin is the default annotation. We can define custom annotations as well, which will be the subject of the next installment in this series.

parent::__construct($subdir, $namespaces, $module_handler, $plugin_definition_annotation_name); $this->alterInfo('breakfast_info'); $this->setCacheBackend($cache_backend, 'breakfast_choice'); }

alterInfo tells us that this plugin definition can be altered by implementing hook_breakfast_info_alter.

Plugin definitions are cached, which is why we need to run drush cr(the equivalent of drush cc all in D8) every time we alter the plugin definitions. The setCacheBackend defines the cache backend for our plugin. In the current context, we are not customizing it too much.

Another major change is the new file It contains metadata about the breakfast plugin manager service which we discussed above.

services: plugin.manager.breakfast: class: Drupal\breakfast\BreakfastPluginManager arguments: ['@container.namespaces', '@cache.default', '@language_manager', '@module_handler']

One or more services can be defined in the services.yml file. Each entry contains a machine name of the service, the class that implements the service and dependencies(if any) can be passed as arguments. The @ prefix for the arguments indicates that the corresponding argument is in itself a service.

The field type we added earlier hasn't changed, but the widget has been revamped. We no longer hardcode any breakfast items. Instead, we dynamically pull all plugin instances of type Breakfast.

Here's how:

$options = array(); $breakfast_items = \Drupal::service('plugin.manager.breakfast')->getDefinitions(); foreach($breakfast_items as $plugin_id => $breakfast_item) { $options[$plugin_id] = $breakfast_item['label']; }

Any module can now define a new breakfast menu item and expect it to show up in the user profile's breakfast field dropdown. We've created 3 breakfast items in our module to illustrate this. Let's pick an example breakfast plugin, my favorite. Masala dosa.

Image courtesy

err, I meant:

/** * Adds Masala Dosa to your Breakfast menu. * * * @Plugin( * id = "masala_dosa", * label = @Translation("Masala Dosa") * ) */ class MasalaDosa extends PluginBase { // Nothing here yet. Just a placeholder class for a plugin }

Nothing fancy there. Just a placeholder class and some metadata in the @Plugin annotation.

Phew! It took more time to add a masala dosa plugin that to make a masala dosa. Each breakfast item being a unique plugin instance sounds a bit like an overkill. We will address this and problem #3 detailed above(plugins having different properties like picture) in the next post!

Categories: Elsewhere

Mark Ahrens: Backdrop Does a Disservice to Developers

Wed, 04/03/2015 - 05:00
I have been thinking awhile about why the Backdrop fork bothers me so much. At first I thought it would just be the fact that it will be splitting the community some or taking resources away from the Drupal project. But lots of projects I have worked with have been forked in the past, and it … Continue reading Backdrop Does a Disservice to Developers
Categories: Elsewhere

Drupal @ Penn State: Memory profiling in hooks

Tue, 03/03/2015 - 22:19
To start..

This tutorial involves hacking core. If you aren't comfortable with doing that, you're probably in the wrong place :).  I created a drop called Memory profiling in hooks which has all the code details in case you want to dig in yourself.  You'll need to modify includes/ and also have devel module enabled for this to work.

Categories: Elsewhere

Mediacurrent: Premature Optimization is (still) Bad

Tue, 03/03/2015 - 22:13
Knuth is a pretty smart person

A long time ago, in a galaxy right here, Donald Knuth wrote “premature optimization is the root of all evil”. This was in his 1974 paper “Structured Programming With Go To Statements”, yet this issue is still with us in various forms.

Categories: Elsewhere