InternetDevels: How Responsive Web Design Works — Presentation

Planet Drupal - Tue, 2015/09/29 - 12:09pm

If you already know the name of Ethan Marcotte and the term “responsive design”, you have chosen the right direction. If not - this direction is a fortiori necessary for you. Let’s take a look on the brief history of the responsive design.

Read more

InternetDevels: How to start with Symfony2 framework: tutorial for beginners

Planet Drupal - Tue, 2015/09/29 - 10:27am

If you want to begin studying Symfony web development, this
Symfony2 framework tutorial by our developer could be very
useful for you. However, if you want to hire a Symfony developer
for building an amazing website, you’re always welcome!

Read more

Chromatic: Programatically Creating and Storing WordPress Migrate Migrations in Drupal

Planet Drupal - Tue, 2015/09/29 - 5:17am

Migrations are never glamorous, but doing them right and verifying their integrity is essential to their success. The WordPress Migrate module gives you an easy turnkey solution to migrating content into Drupal from WordPress. It allows you to create each migration through an interactive admin form, allowing you to configure your migration entirely through the UI. This is great, but it does not make creating or storing the resulting migrations easy to manage across multiple environments, since the migrations are not defined in code like a typical Migrate class. Short of copying database tables or re-entering the configuration through the admin forms, developers are stuck with the migrations stored in a single database and thus it is not easy to move to other environments for testing or further development.

Copying data tables is almost always the wrong solution and manually re-entering all of the migrations would be way too time consuming, so our solution was to create the migrations programmatically. To do this, we hooked into the existing WordPress Migrate codebase and used its logic to build programmatically, what it builds from data input to its admin forms. Then we are able to define all of our migration sources in code and instantly create all of our migrations in a new environment, or recreate them after something fails during development.

As mentioned, this solution relies upon programmatically submitting admin forms, which is often not an ideal scenario. Additionally, there is the almost inevitable request to add additional customizations beyond what Wordpress Migrate supports out of the box. Sometimes this makes WordPress Migrate more of a hinderance than a help. So why not just create a custom Migrate class from the outset and avoid all of these issues? Here are some factors to consider:

  • Writing a custom Migrate class for your WordPress content always sounds more appealing until you run into problems and realize WordPress Migrate already solved those issues.
  • The WordPress Migrate module offers a lot of functionality, including file transfer, author migration, embedded video processing, internal link rewriting, comment migration, etc.
  • You might not need much custom code and just tweaking the WordPress Migrate functionality by extending one of its classes will easily do the trick.
  • You might not have the resources (time, knowledge, etc.) to write a custom Migrate class.
  • Running and testing the migrations on multiple environments might not be in your workflow, although I would argue it should be.
  • You might only have one or two WordPress sites to migrate content from, so manually re-creating them is not an issue.

If after weighing all of the factors, you decide using the WordPress Migrate module is in your best interest and manually recreating the migrations is not an option, then follow along as we walk you through our approach to creating and storing WordPress Migrate migrations programmatically.

Our Solution

First we need to define the list of source blogs. The keys of each item in this array can be added to as needed to override the default values we assign later.

* Define the WordPress blogs to be imported.
function example_wordpress_migrate_wordpress_blogs() {
  // Any key not set here will default to the values set in the
  // $blog_default_settings variable in the drush command.
  $blogs = array(
      'domain' => '',
      'domain' => '',
      'domain' => '',
  return $blogs;

Next we’ll create a custom drush command so that we can easily trigger the creation of our migrations from the command line.

* Implements hook_drush_command().
function example_wordpress_migrate_drush_command() {
  $items = array();
  // Creates WordPress migrations.
  $items['example-migrate-create-wordpress-migrations'] = array(
    'description' => 'Creates the WordPress migrations.',
    'aliases' => array('mcwm'),

  return $items;

Be sure to note the example_migrate_wordpress_password variable below, as you will need to ensure you set that in settings.php before creating the migrations. The WordPress Migrate code needs to be able to login to your site to download the source XML file, and a password is paramount to the success of that operation!

* Callback for WordPress migration creation drush command.
function drush_example_wordpress_migrate_create_wordpress_migrations() {
  // Reset the file_get_stream_wrappers static cache so the 'wordpress' stream
  // wrapper created by the wordpress_migrate module is available.
  $wrappers_storage = &drupal_static('file_get_stream_wrappers', NULL, TRUE);
  // The wordpress_migrate module's UI is a multi-step form that collects all
  // configuration needed to migrate a given blog. As this form's steps are
  // submitted and validated, an export file is downloaded for each blog and its
  // contents are migrated. There is no easy way to export these settings or use
  // code to provide that configuration and then trigger a migration, so the best
  // bet is simulate the submission of those form steps with the needed data.
  module_load_include('inc', 'migrate_ui', 'migrate_ui.wizard');
  // Get a list of blogs to migrate.
  $blogs = example_migrate_wordpress_blogs();
  $blog_default_settings = array(
    'source_select' => '1',
    'domain' => '',
    'username' => 'admin',
    'password' => variable_get('example_migrate_wordpress_password', ''),
    'wxr_file' => NULL,
    'do_migration' => 0,
    'default_author' => 'admin',
    'page_type' => '',
    'blog_post_type' => 'story',
    'path_action' => 1,
    'tag_field' => '',
    'category_field' => '',
    'attachment_field' => '',
    'text_format' => 'filtered_html',
    'text_format_comment' => 'filtered_html',
  // Import each of the blogs.
  foreach ($blogs as $blog_settings) {
    // Combine the default settings and the custom per blog settings.
    $blog_settings = array_merge($blog_default_settings, $blog_settings);
    // Skip the import if no username or password was found.
    if (empty($blog_settings['username']) || empty($blog_settings['password'])) {
      $message = t('The :site-name migration was not created since no username and/or password could be found. Verify that the example_migrate_wordpress_password variable has been set.');
      $replacements = array(
        ":site-name" => $blog_settings['domain'],
      drupal_set_message(t($message, $replacements), 'warning');
    // Set the form state values.
    $form_state['values'] = $blog_settings;
    // Store the values so we can use them again since $form_state is
    // a reference variable.
    $form_state_values = $form_state['values'];
    // Build the import form.
    $form = drupal_get_form('migrate_ui_wizard', 'WordPressMigrateWizard');
    $form = migrate_ui_wizard($form, $form_state, 'WordPressMigrateWizard');
    // Create a Migrate Wizard object.
    $form_state['wizard'] = new WordPressMigrateWizard();
    // Set the number of steps in the form.
    $form_steps = 6;
    // Go through all of the steps.
    foreach (range(1, $form_steps) as $step) {
      // Validate the form data.
      // Submit the form page.
      migrate_ui_wizard_next_submit($form, $form_state);
      // Put any values removed from the array back in for the next step.
      $form_state['values'] = array_merge($form_state_values, $form_state['values']);
    // Submit the form.
    drupal_form_submit('migrate_ui_wizard', $form_state);
    // Save the settings into the wizard object.
    // Notify the user that the migration was created successfully.
    $replacements = array(
      '@site-name' => $blog_settings['domain'],
    $message = t('The @site-name migration was successfully created.', $replacements);
    drupal_set_message($message, 'success');

With all of this in place, the source WordPress sites and the configuration needed to import them are now fully defined in code along with a custom Drush command to create the required migrations. No longer will each individual site need to be re-entered through the UI introducing opportunities for mistakes and wasted time.

Now when you are in a new environment or after you reset your migrations, you can simply run drush mcwm.

Following its successful completion, the following are done for you:

  • A new Migrate group is created for each individual blog.
  • The actual Migrate classes within each group that migrate, authors, content, terms, and attachments are created and configured as defined in the code.
  • The source WordPress XML file is downloaded for each site and stored in wordpress://.

Then simply run drush ms to verify everything was created successfully, and you are ready to migrate some content!

Now that you have the tools and knowledge to evaluate your unique migration needs, you can make a well informed decision if this approach is right for you. However, we think that more often than not, all of the incredible functionality you get pre-built with the WordPress Migrate module will outweigh the issues that arise from not being able to fully build and store your migrations in code, especially when you add the functionality outlined above that gets you the best of both worlds. So have your cake and eat it too, and define your migrations in code and utilize the WordPress Migrate module while you are at it!

If you decide to go this route, all of the code referenced here is available in this gist. Please note that this was all built for WordPress Migrate 7.x-2.3, so future updates to the module could break this functionality.


OSTraining: New Video Class: Speeding up Joomla

Planet Drupal - Tue, 2015/09/29 - 3:22am

If you run a Joomla site, then you really need this week's new video class from Rod Martin called "Speeding up Joomla".

Rod starts by showing that a normal Joomla site is not highly-optimized and then he takes you through 10 steps to improve your site speed.

First, you'll learn to use Google PageSpeed and YSlow to test your site. Then Rod shows you how to use caching, compresssion, .htaccess, CDNs and more. By the time you've finished this class, you'll have a blazing fast Joomla site!


Gbyte blog: How to use the Drupal 8 honeypot module efficiently

Planet Drupal - Tue, 2015/09/29 - 12:33am
The Honeypot module is a great captcha alternative, as it keeps spam bots from submitting content while also saving your site visitors from having to type in mundane character combinations. Configured properly it will prevent the majority of bots from submitting forms on your site including registration forms, contact forms, comment forms, content forms... any drupal forms.

BlackMesh: Cathy Theys is awarded the first Aaron Winborn Award

Planet Drupal - Mon, 2015/09/28 - 7:44pm

“Drupal” might as well be Cathy Theys’ middle name. The Drupal enthusiast attended her first DrupalCon in 2011 and the attraction was instant. Since then, she has spent countless hours contributing to Drupal. On Tuesday, September 22, 2015, Cathy’s Drupal dedication was recognized at DrupalCon Barcelona during the Opening Ceremony, as she received the first Aaron Winborn Award. This annual award is presented to individuals who demonstrate personal integrity, kindness, and a commitment to the Drupal community.

Through his contributions and general advocacy, Aaron Winborn introduced countless people to the Drupal community, sharing with them his technical knowledge and insight. Aaron unfortunately lost his battle to ALS this past spring, but to keep his inspiration alive, the Drupal Association created the Aaron Winborn Award to honor and celebrate his life and acknowledge those who continue his passion and commitment to the Drupal Community.

Cathy is well-known as a friend and mentor to all contributors to and advocates of the Drupal community. As a natural leader, she has organized sprints, empowered novices, and promoted all things Drupal. With a strong presence online and in-person at various events, Cathy is a strong believer in spreading knowledge and sharing ideas. Throughout the years, Cathy has exhibited incredible thoughtfulness, integrity, and a dedication to the Drupal Community – qualities and ideals Aaron himself embraced and represented.

Holly Ross, Executive Director of the Drupal Association, presented Cathy the Aaron Winborn award highlighting her efforts to get people involved in Drupal, even Holly herself.  Holly acknowledges her personal experience with Cathy saying, “I can personally attest to it, because she sat next to me in Amsterdam for an hour trying to help me memorize GIT commands.”

Cathy was both surprised and honored to win such heartfelt recognition. We are thrilled to have Cathy Theys as part of the BlackMesh team, and will support her as she continues to give back to the Drupal community.

Congratulations Cathy from all of us at BlackMesh!


View the recorded acceptance:


Code Enigma: Drupalcon Session: Looking for the value in Content Strategy

Planet Drupal - Mon, 2015/09/28 - 5:41pm
Drupalcon Session: Looking for the value in Content Strategy Language English Drupalcon Session: Looking for the value in Content Strategy Don't ask yourself: "Can I afford to include content strategy in my web project?"
The real question is "Can I afford NOT to include content strategy in my web project?"

At Drupalcon Europe, our content strategist Koen Platteeuw shared his views on what value content strategy brings to web projects. Here you can watch the recording of the session:



For more information on how Code Enigma can help organisations with their content governance or other content related requirements, check out our Content Strategy services


Why Should you invest in Content Strategy?Blog Editorial Workflows: Who's responsible for my web content?Blog Content Strategy Resource CentrePage Who drives Content Strategy?Blog

Annertech: Looking forward to DrupalCon Dublin 2016

Planet Drupal - Mon, 2015/09/28 - 5:22pm
Looking forward to DrupalCon Dublin 2016

I’m writing this while sitting on the plane on my way back to Dublin and thinking about events of the last week. As I’m sure you’re all aware by now, DrupalCon will be coming to Dublin next year. We’re completely ecstatic about playing host to DrupalCon and excited about what this might mean for Drupal and the Irish Drupal community.


Red Crackle: Adding fields and metadata to product

Planet Drupal - Mon, 2015/09/28 - 3:47pm
This is tutorial #3 in the Drupal Commerce tutorial series. In this post, you will learn how to add fields and other metadata to the Drupal Commerce Product. In this specific example, we'll add description and image fields. This information will be exposed on the product display page so that it appears next to Add to card button. We will also enable user reviews and ratings.

Drupalize.Me: Meet Project Manager Alice Jensen

Planet Drupal - Mon, 2015/09/28 - 3:14pm

We interview Alice Jensen about what it means to be a project manager and share advice from her experience. Copenhagen-based Project Manager (PM) Alice Jensen has been Drupaling since 2012. Her coworkers describe her with affection, using words such as "fearless", "calm", and "passionate". Read more about Alice's approach to her job as a project manager in this Drupalize.Me interview, part of our Drupal roles series.


Dries Buytaert: Acquia raises $55 million series G

Planet Drupal - Mon, 2015/09/28 - 2:59pm

Today, we're excited to announce that Acquia has closed a $55 million financing round, bringing total investment in the company to $188.6 million. Led by new investor Centerview Capital Technology, the round includes existing investors New Enterprise Associates (NEA) and Split Rock Partners.

We are in the middle of a big technological and economic shift, driven by the web, in how large organizations and industries operate. At Acquia, we have set out to build the best platform for helping organizations run their businesses online, help them invent new ways of doing business, and maximize their digital impact on the world. What Acquia does is not at all easy -- or cheap -- but we've made good strides towards that vision. We have become the backbone for many of the world's most influential digital experiences and continue to grow fast. In the process, we are charting new territory with a very unique business model rooted Drupal and Open Source.

A fundraise like this helps us scale our global operations, sales and marketing as well as the development of our solutions for building, delivering and optimizing digital experiences. It also gives us flexibility. I'm proud of what we have accomplished so far, and I'm excited about the big opportunity ahead of us.


ERPAL: How Drupalcon helped us to improve

Planet Drupal - Mon, 2015/09/28 - 10:14am

This Drupalcon in Barcelona was really special for us because we had so many touching points with the community and other businesses in the Drupal ecosystem. This Drupalcon really helped us to increase our Drupal8 knowledge but also our whole business. In this blog post I want to share how the community helped us to win more ideas to improve our business in the near future.

We went to Barcelona to get in personal contact with all the amazing people in the Drupal community. Talking to some contributors of ERPAL, we got lots of new ideas about how to make ERPAL Platform better, more flexible and focus on specific business use cases when building ERPAL for Drupal 8. Also we got some very valuable information on how to improve Drop Guard to automate the processing of Drupal updates with integration into individual development workflows.

Talking for example to Bojan of the commerce guys about how to make Drupal Commerce even more flexible and suitable for B2B projects in Drupal 8, we saw the power of personal connections of community members the bring new ideas to live. Thanks for the time he to listen to our ideas. While maintaining ERPAL Platform since the last year as a Drupal distribution to build flexible business applications, we realized that it is not that easy to build distributions for concrete use cases that provide users the same flexibility that they know and expect from Drupal itself. There was also a full session about our experience when building Drupal distributions. The discussions after this session showed us that there is big interest in the Drupal Community to build niche products using Drupal distributions. Nevertheless there are many challenges to tackle which have been covered in our talk at Drupalcon. See the full session recorded below.

The new architecture of Drupal 8 gives us the chance to re-architecture ERPAL Platform to be laveraged by the flexibility of Drupal commerce and provide even more flexible features to manage business processes than today. To make this project become a success in Drupal 8 we want to cooperate closer with other project maintainers and use our network of contributers and Drupal passionate people to create a Drupal 8 distribution that is a solid and flexible base to build SaaS businesses based on Drupal. What makes the Drupal community special is both, the open software that people develop and many people having an open mind to solve real world problems with Drupal.

As we got more then 100 new people interested in joining our beta test group for Drop Guard and some onboardings already took place at Drupalcon, we saw the many different ways people build, operate and maintain their Drupal sites. This gave us the chance to make Drop Guard accessible for much more people by supporting drush make files, composer and submodules. Talking to some members of the security team we got the confirmation that a system like Drop Guard, to make the Drupal update process much easier, faster and more relyable can have a huge positive impact on the security of the Drupal ecosystem. Nevertheless we realized that some people are afraid of automated updates as they have concerns that the functionality of their sites will break. That's why we also had some productive meetings with hosting platforms such as Acquia Cloud, and to discuss how an integration with hosting platforms and testing systems can reduce the risk of broken sites. I am looking forward to integrate Drop Guard with external services to let automated updates increase the security of the Drupal ecosystem.

Another thing we've learned is that the health of Drupal businesses depends on the release cycle of Drupal. Dries also mentioned this in his key note as many companies are waiting with their new project for the release of Drupal 8. What we realized is, that this Drupalcon had much less sponsors and less attendes compared to the last Drupalcon of Europe in Amsterdam 2014. This shows that Drupalcon is not only about community but also a lot about business. That's the reason why many Drupal shops try to get more independend of their project business by growing monthly recurring revenue. We realized that providing Drop Guard as a white label service for Drupal shops can help other business to start their way on the road of recurring revenue without huge investments. Selling update support is the most obvious service that produces recurring revenue and adds a real value to customers of Drupal development shops. You can watch the whole session about how to grow recurring revenue as a Drupal shop below.

Now we are excited to attend the next european Drupalcon in Dubline, hopefully to see Drupal 8 fully released at this time ;-)

If some of you couldn't attend Drupalcon and didn't have the chance to win a free Drop Guard procted site, you can attend our survey to join the free beta user group.


agoradesign: Add custom menu item attributes in Drupal 8

Planet Drupal - Sun, 2015/09/27 - 7:26pm
We're currently working on a Drupal 8 project, where we need the possibility of adding class attributes to menu items. In D7, one would probably choose the menu attributes module to accomplish this. But unfortunately, there is currently no D8 port available. In this quick tutorial I'll show you, how to create your own tiny module to solve this problem.

Web Omelette: gets a new face!

Planet Drupal - Sun, 2015/09/27 - 12:49pm

If you are a reader of you probably know it's been a while since any love has been given to this website. I decided recently to right this wrong and release a refreshed version. Lo and behold, the new version of Web Omelette!

I think it looks a bit fresher, crisper and should be a bit more performant as well. Additionally, I fixed some of the problems we had with copying code fragments by using the SyntaxHighlighter plugin for displaying code fences. This should also make them a bit more readable.

Moreover, you'll notice in the listing also external articles I've written for other websites. Feel free to check out those write-ups as well.

Please let me know if you encounter any bugs or issues with the website. I'd very much appreciate that.


J-P Stacey: My Drupalcon Barcelona notes

Planet Drupal - Sun, 2015/09/27 - 12:34pm

As with previous years, I maintained notes on a publicly available Google Doc during Drupalcon Barcelona. I've tidied them up below for future reference, and added links to the recorded sessions where possible.

NB: these are rough notes made during talks. Please take with a pinch of salt.

Read more of "My Drupalcon Barcelona notes"


clemens-tolboom pushed to develop at clemens-tolboom/drupal-8-rest-angularjs

On github - Sat, 2015/09/26 - 5:51pm
Sep 26, 2015 clemens-tolboom pushed to develop at clemens-tolboom/drupal-8-rest-angularjs

DrupalCon News: Thank you for coming to DrupalCon Barcelona

Planet Drupal - Sat, 2015/09/26 - 4:19pm

Thank you so much for attending DrupalCon Barcelona.  We had an amazing time and hope that you did too.  

After each Con, we ask that you please let us know how it went so we can see what we can improve for next time.  Please

Fill Out the Survey


clemens-tolboom pushed to feature/2403307-65-user-login at build2be/drupal

On github - Sat, 2015/09/26 - 3:07pm
Sep 26, 2015 clemens-tolboom pushed to feature/2403307-65-user-login at build2be/drupal
  • ce3f378 Issue #2571947 by nevergone: Remove !placeholder in language module
  • 5742806 Issue #2572019 by thewilkybarkid: Remove !placeholder in TourViewBuilder
  • 82 more commits » Watch Drupalcon Barcelona 2015 sprinting on

Planet Drupal - Sat, 2015/09/26 - 2:43pm
One little Drupal community secret: the main-event of a DrupalCon might be sprinting... A code sprint is getting developers for a set amount of time – usually one to two days – and just writing code. That's it. You're not teaching anything. Participants will learn from others as they go, but the...