Planet Drupal

Subscribe to Planet Drupal feed - aggregated feeds in category Planet Drupal
Updated: 2 days 1 hour ago

Code Positive: Drupal - Making Websites Flexy!

15 May 2017 - 12:45am

Drupal’s strength lies in its versatility, or, as we happen to mention a few times in this article..... its flexibility.



Categories: Drupal

Blair Wadman: Step by step guide to creating an admin form in Drupal 8

12 May 2017 - 9:32am

Creating an admin form is often one of the first things you'll need to do in a custom Drupal module. An admin interface enables you to make a module's settings configurable by a site editor or administrator so they can change them on the fly.

Categories: Drupal

Valuebound: Drupal Coding Standards and Best Practices

12 May 2017 - 6:16am

The work of a code is not just to execute a command but to make sure that it can be edited, updated and debugged.

When you first write a code in a language you prefer to write in your comfort level. However, a good code should always adhere to the standards of coding to ensure readability. And maintainability.

There are some particular areas where the members of a team might often have different preferences but will need to agree on something. It's a tough debate about the advantages and disadvantages any system over another. But being consist on a lot of these things have a large impact and advantage rather than being inconsistent: all of the members can read the code and that ensures one part  can be used…

Categories: Drupal

Third & Grove: Webinar: How Quicken is Disrupting Digital with Magento and Drupal

12 May 2017 - 6:00am
Webinar: How Quicken is Disrupting Digital with Magento and Drupal antonella Fri, 05/12/2017 - 09:00
Categories: Drupal

Promet Source: We're heading to Texas Camp, ya'll! Will you be there?

12 May 2017 - 4:33am
We're packing our bags and heading south - way south for what is sure to be a weekend jam packed with BBQ, two steppin', and of course all things Drupal. 
Categories: Drupal

heykarthikwithu: Why DevOps is important? How this can be done in Drupal?

12 May 2017 - 12:01am
Why DevOps is important? How this can be done in Drupal?

Why DevOps is important?
How this can be done in Drupal?
This video will give you a brief idea about the 2 questions..!

heykarthikwithu Fri, 05/12/2017 - 12:31
Categories: Drupal

Aten Design Group: Fixing Invalid Translations for Drupal 8 Content Moderation

11 May 2017 - 11:44am

I recently migrated content from a Drupal 7 site to a new Drupal 8 install using core’s Migrate, Migrate Drupal and Migrate Drupal UI modules. A few months after the initial migration, I decided to enable core Content Moderation for use with one of my migrated content types. No beuno.

Just saving any content for which I had enabled Content Moderation resulted in this tasteless error:

The website encountered an unexpected error. Please try again later.

Clicking over to Recent log messages at /admin/reports/dblog revealed the following exception:

Invalid translation language (und) specified.

It was being thrown from two different places when I attempted to save a node.

The details for each in order were:

Drupal\Core\Entity\EntityStorageException: Invalid translation language (und) specified. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 770 of /Applications/MAMP/htdocs/project/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). InvalidArgumentException: Invalid translation language (und) specified. in Drupal\Core\Entity\ContentEntityBase->addTranslation() (line 823 of /Applications/MAMP/htdocs/project/core/lib/Drupal/Core/Entity/ContentEntityBase.php).

Several quick searches didn’t turn up anything exactly applicable, but I did find a pretty useful summary of a similar issue that put me on the right track.

Basically, my content migrated from a Drupal 7 site was set with a legacy langcode of und. If I just load a node and output its language attribute using the Devel module’s dpm() function, you can see what’s amiss:

use Drupal\node\Entity\Node;   $node = Node::load(<My NID>); dpm($node->language()->getId()); // returns 'und', which was causing a problem

It’s the language specification of und that was preventing me from saving the content with Content Moderation enabled. Changing the language over to the site default, EN in my case, just took a minute with the following code.

use Drupal\node\Entity\Node;   $node = Node::load(<My NID>); $langcode = \Drupal::languageManager()->getDefaultLanguage()->getId(); $node->set('langcode', $langcode); $node->save(); dpm($node->language()->getId()); // now this returns 'en', which is good!

Now you can see that the language attribute is reflecting an appropriate value, which in my case meant I was able to save the node like normal with Content Moderation enabled. Fixed!

All that remained was doing the same operation for every node in the database. For my project there were only a couple of thousand nodes, so I just used the code below (I ran this at devel/php but you could do it in a module or wherever is easiest).

use Drupal\node\Entity\Node; $langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();   $result = db_query("SELECT nid FROM node WHERE langcode = 'und' LIMIT 100"); foreach ($result as $record) { $node = Node::load($record->nid); $node->set('langcode', $langcode); $node->save(); }

I limited my query to 100 nodes to avoid a timeout, then just executed the code several times until all my nodes were updated. If you have tons of nodes that need updating, you might consider writing a hook_cron or using batch operations.

Warning: The site I was working on wasn't multilingual. The code above sets every node with a language specification of und to the site default, which may not be what you want for a multilingual site.

That’s it! It seems simpler in retrospect but took me awhile to understand what was going on. I also created an issue on so hopefully this bug will get addressed eventually.

Categories: Drupal

Acquia Developer Center Blog: Welcome to Cog: A New Drupal 8 Base Theme

11 May 2017 - 8:05am

Cog is a Drupal 8 base theme created and maintained by the Acquia Professional Service Front-end team.

Many great Drupal base themes already exist, so what does Cog bring to the table?

Tags: acquia drupal planet
Categories: Drupal

MD Systems blog: Improvements and changes in Commerce 2.x

11 May 2017 - 7:51am
The new version of Drupal Commerce has been rewritten from scratch, learning from what worked well and what was causing problems in Commerce 1.x. In this blog post, we will focus on explaining some of the key differences we have seen so far and how they affect developers and users.
Categories: Drupal Blog: AGILEDROP: Agiledrop going to the nearest Drupal Camp

10 May 2017 - 9:57pm
After a long travel to Baltimore, where two of our team members (Commercial and Operations director to be precise) attended DrupalCon Baltimore, we will have a much shorter distance to overcome this time. In fact, we'll be going to the nearest Drupal Camp possible. That's in Zagreb, where our development team will attend Drupal Heart Camp Zagreb. Since we are located in Ljubljana, Slovenia, our nearest destination would be our coast, where there was once a Drupal Camp Alpe-Adria. But since the Camp is not taking place there anymore – we discussed that with one of its organizers Janez Urevc… READ MORE
Categories: Drupal

FFW Agency: A Week of Learning & Growth at DrupalCon Baltimore

10 May 2017 - 12:40pm
A Week of Learning & Growth at DrupalCon Baltimore leigh.anderson Wed, 05/10/2017 - 19:40

It’s hard to believe that another DrupalCon has come and gone — it feels like just yesterday when we were mourning the passing of Drupal 6 in New Orleans and unveiling our new branding in Los Angeles. DrupalCon Baltimore was a success for us, and we wanted to share some of our memories from the event.

Our Week at DrupalCon

It was an honor to introduce Dries on Tuesday morning at DrupalCon. We were grateful that we had the opportunity to discuss two projects that are near and dear to our hearts: The Open Y Drupal distribution, and Drupal Global Training Days.

We were also thrilled to have so many visitors drop by our booth. It was great seeing so many old friends and making new ones, and we’d like to say congratulations again to our raffle winners: Mark (pictured below) & Dennis, who won Apple Watches, and Patrick, who won an Amazon Echo.

FFW Session Recordings

We had a great time sharing our knowledge in trainings, sessions, and BOFs. If you didn’t catch the FFW crew in action, you can watch recordings of our sessions here:

  1. Anti-Crash Course: How to Avoid Drupal’s Most Common Pitfalls
  2. Using Drupal to Power the YMCA
  3. Scaling and Sharing: Building Custom Drupal Distributions for Federated Organizations
  4. Less Is More: What Modules, Features or API's Should We Cut From Core?
  5. Docksal: Better than VMs
Farewell, Baltimore; Hello, Vienna!

As always, we stayed for the community. We were heartened to see so many people working together to grow the project, navigate new territory, and have thoughtful conversations about the future of the Drupal software and the community’s governance. We’re looking forward to the continued discussions about the community’s structure and future; if you’d like to participate, you can find future meeting information here.

It was a pleasure to sponsor such a great event. We’re looking forward to seeing who we meet and what great conversations we have across the pond at DrupalCon Vienna this September.

DrupalCon group shot credit to Michael Cannon on Flickr.

Categories: Drupal

Valuebound: Getting Started With Drupal Commerce 2.x - Part 2

10 May 2017 - 10:36am

In the previous article, Getting Started With Drupal Commerce 2.x (Part - I) we have set up the Drupal commerce module 2.x and build the store. The next step to finish the basic commerce 2.x setup is to create Products.

Let’s have a detailed summary of e-commerce products creation in commerce 2.x.

1. Products :

Here we should note the main difference of Drupal Commerce 2.x (for Drupal 8) from Drupal Commerce 1.x (for Drupal 7). In Commerce 2.x, we now have such entities as Product and Product Variation. The product replaces product display of Commerce 1.x (node type, which has been linked to the…

Categories: Drupal Set Required and Optional Address Inputs for Address Field in Drupal 8

10 May 2017 - 10:34am

This one is dedicated to all my fellow Drupalers. There’s no better exercise for a brain than reading ancient chinese poetry taming Drupal 8. When I’m bored, I turn to Drupal!

Recently I got my Drupal 8 Address module updated and it turned out that from now on street address ...

Read now

Categories: Drupal Drupal 6 security update for Webform Multifile

10 May 2017 - 10:05am

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Moderately Critical security release for the Webform Multifile module to fix an Access Bypass vulnerability.

This module enables you to upload multiple files at once in a Webform, but it didn't sufficiently check access to file deletion URLs.

This vulnerability is mitigated by the fact that an attacker must have a role with the permission to edit all or their own webform submissions.

See the security advisory for Drupal 7 for more information.

Here you can download the Drupal 6 patch.

If you have a Drupal 6 site using the Webform Multifile module, we recommend you update immediately.

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on

Categories: Drupal

Drupal Association blog: Drupal Association April 26, 2017 Board Meeting Update

10 May 2017 - 6:52am

After board meetings, I publish a blog post to provide an overview of the meeting along with the board packet, meeting minutes, and a video of the meeting. Since we just had a board meeting at DrupalCon Baltimore, I want to share details about that meeting as well as pull the lens back to give the community more insight into board meetings and our 2017 schedule. I hope this additional information gives better insight into the Drupal Association’s board activities.

Drupal Association Board Meetings

The Drupal Association board has two different meeting types: Executive Session and Board Meeting. They take place throughout the year to create The Drupal Association’s strategic direction, ensure financial health, engage with the community, and more. This post goes into more details about each meeting type.  

Executive Session

The executive session is usually a two-day meeting that includes board members and the executive director. At times, it can also be a shorter virtual meeting. Topics typically include an Executive and Financial update, financial approvals, committee work, and strategic planning for the Association.

There are four executive sessions a year. All meetings are private to create a safe space for brainstorming strategic direction and discussing confidential matters such as the executive director’s performance and compensation. For this reason, meeting minutes are not shared publicly. However, we will let the community know when we are meeting and what is on the agenda.

The 2017 executive session schedule is: 23 & 24 February, 22 & 23 April, 26 June,  23 & 24 September, and 29 November. The February, April, and September sessions are two day meetings while June and November are two hour virtual meetings. As needed, the board may schedule additional executive sessions to handle business that is time sensitive and best done via a meeting.

The 23 & 24 February executive session agenda covered the following:

  • Executive and Financial Update

  • Getting grounded in DrupalCon Europe survey data (Michael Schmid was present since he was part of the task force)

  • Discuss the future of DrupalCon Europe focusing on sustainability and delivering meaningful value

  • Thank you and goodbye to community-elected board member, Addison Berry.

The 23 & 24 April executive session agenda included the following items:

  • Executive and Financial Update

  • Approve Q3 2016 financial statements

  • Welcome Ryan Szrama - new community-elected board member

  • Understanding community governance needs and identifying community governance gaps

  • Meet and greet with Drupal Association staff / Congratulations on upcoming DrupalCon

Board Meetings

The Drupal Association holds four board meetings each year so the community can observe the board proceedings and participate in a Question and Answer session. Typically, board meetings include operational updates from staff, committee updates, and question and answer time for both the board and the community.

On 26 April, 2017, the Drupal Association held its first board meeting of the year. The board materials and meeting minutes can be found here. All board members were in attendance except Annie Miller, Steve Francia, and Donna Benjamin. Also in attendance were myself, Drupal Association Staff, and about 30 community members.

Dries Buytaert kicked off the board meeting and I reviewed the board packet, which included the meeting’s agenda as well as a scorecard for the key operational projects that staff work on. Next, staff gave operational updates. Tim Lehnen, Director of Engineering, gave an update on Project Application Process, Contribution Credits, and the Infrastructure RFP. Next, Carrie Lacina, Director of Revenue, shared an update on the industry pages. This was followed by Rebecca Pilcher, Marketing & Communications Manager, who gave insight into the new DrupalCon branding.

Lastly, I gave an update related to recent community challenges. I explained that a key way to understand the community’s needs and help them talk about a new community governance model is by hosting mediated Community Discussions. Whitney Hess, the mediator, introduced herself to the board and gave a brief update of the themes she heard in the recent Community Discussions onsite at DrupalCon.

The Board had 10 minutes to ask questions which covered topics such as branding and the infrastructure RFP. While the community had 10 minutes to ask questions, the meeting was extended, giving the community 30 minutes to ask questions. Their questions touched on DrupalCon branding and Project Application Process. There were also several questions related to the learnings gained by the recent community challenges.

You can watch the video of the board meeting here as well as read the meeting minutes and board packet. All materials are found here. The next board meeting will take place on 26 June, 2017 at 12:00 EDT/17:00 BST. It will be a virtual meeting via Zoom. You can go here for login information.

Categories: Drupal

Berliners blog: Revert configuration from file based to database based

10 May 2017 - 6:19am

The D8 project I'm currently working on used the file-system based workflow for configuration management. As our deployment workflow improved and got slightly more complex, we started to run into issues with file permissions during deployments and wanted to revert back to the database based workflow that is the default for a new D8 installation.

Unfortunately, though there are a lot of resources on the web that explain how to go from the database to the file system approach, I couldn't find anything explaining how to revert back to the database based configuration workflow. All there is, is this kind of information:

You should do this before installing Drupal, as it is complex to revert back to database-based configuration management setup once you switch to file-based.

So I did some digging and came up with this:

Step 1: Backup

Make a backup of your database and your codebase including all configuration files and your settings and services yaml files. The following actions have the potential to break your site. Do everything on a non-production site, preferabbly hosted on your local machine so that recovery is easy.

Step 2: Export your current configuration

Run this drush command to export your configuration:

drush cex syncStep 3: Revert your settings and services

Put the following in your services.yml:

services: class: Drupal\Core\Config\CachedStorage arguments: ['', '@cache.config'] class: Drupal\Core\Config\DatabaseStorage arguments: ['@database', 'config'] public: false tags: - { name: backend_overridable }

And comment out the config storage setting in your settings.php:

// $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage'); Step 4: Clear caches

Clear your caches using these drush commands:

drush ev "drupal_flush_all_caches();" drush cr Step 5: Re-import your configuration

Run this drush commands to import your configuration:

drush cim sync

This step failed for me at first, due to interdependency between different configuration sets. In my case there had been changes to fields that where attached to some custom ECK entities, and the configuration import wanted to import these before the definition of the actual entity. I was able to work around that by moving the conflicting field configuration out of my configuration sync directory, run the import, moved the files back into the sync directory and run the import again. But you might need to tinkle a bit more with that if you have a complex setup.


Running these 5 steps allowed me to move the site back to use the database based configuration workflow. Let's see if that also helps us with our deployment problems.

Category: Drupal Planet8.xTags: configdevsystem
Categories: Drupal

Drop Guard: What's keeping us busy this spring

10 May 2017 - 5:00am
What's keeping us busy this spring

We, at Drop Guard, never stop thinking what else can we do to help Drupalistas around the world to get aboard of the continuous update process ship (as we call it) as soon as possible. More and more threats are being discovered every day, and it's absolutely imperative to stay alerted all around the clock either with help of automation platforms like Drop Guard or doing things your own way.

Drupal Planet Drop Guard features
Categories: Drupal

OSTraining: What Are Experimental Modules in Drupal?

10 May 2017 - 3:22am

Drupal 8 introduced an interesting new approach called "experimental modules".

These experimental modules are included in the Drupal core, and have inspired several questions from OSTraining members. What are these experimental modules, and is it safe to use then?

Yes, experimental modules are shipped with the Drupal 8 core, but they are not yet fully supported. Here's the official explanation:

Experimental modules allow core contributors to iterate quickly on functionality that may be supported in an upcoming minor release and receive feedback, without needing to conform to the rigorous requirements for production versions of Drupal core. Like other features, new experimental modules can only be added in minor releases, but unlike other features, they may change between patch releases while they are still experimental.
Categories: Drupal

Palantir: The Lowdown on DrupalCon Baltimore

9 May 2017 - 2:33pm
The Lowdown on DrupalCon Baltimore brandt Tue, 05/09/2017 - 16:33 Alex Brandt May 10, 2017

Our favorite parts of DrupalCon Baltimore.

In this post we will cover...
  • Our favorite events from DrupalCon

  • Links to Palantir sessions

Stay connected with the latest news on web strategy, design, and development.

Sign up for our newsletter.

DrupalCon is always a positive experience for the Palantir team, largely because of the Drupal community itself. Our week in Baltimore was filled with engaged conversations, thoughtful sessions, and much appreciated down time with friends we don’t get to see often enough.

DrupalCon by the Numbers
  • Palantiri in attendance: 14
  • Palantiri sessions: 3
  • Client meetings: 7
  • Coffees consumed: at least 2 dozen
  • Newsletter sign-ups: 240
  • Podcasts recorded: 2
  • Late nights: 2 many

“It was a wonderful first DrupalCon experience because of a great community that is so supportive and accepting of newcomers, regardless of their level of Drupal knowledge.” - Annie Schow

Highlights by Day

Monday: We ate all the crabs.
Following the opening reception in the exhibit hall, we ate dinner as a team at Riptide by the Bay In historic Fells Point. An impressive amount of crabs were consumed.

Tuesday: #PMTheMusical!
We witnessed another standing ovation for Joe Allen-Black and Allison Manley and their performance of Project Management: The Musical! There were quite a few crowd favorites, and Joe and Allison were both happy to share their final performance of this presentation in front of an energetic DrupalCon crowd.

Wednesday: Inclusion Initiative
We partnered with another Chicago-based agency, Digital Bridge, to coordinate a Drupal training session for five students local to Baltimore who were unfamiliar with Drupal. We’re looking forward to expanding the program in the future. Keep an eye out for more details on that later this month!

Thursday: #ContentBeforeCode, #DevTeamCollab and Trivia Night
If you missed them at MidCamp, Megh Plunkett, Michelle Jackson, and Bec White did round two of their sessions on Thursday (recordings linked above). Michelle and Bec’s session will also be available via a webinar later this summer, so stay tuned for your chance to sign up in case you missed it at DrupalCon.

Palantir also hosted Trivia Night at Baltimore Soundstage. We’re not sure the wait staff knew what was happening as over 400 people were tasked with answering some fairly obtuse and nerdy questions about this mysterious Drupal thing, but they kept everyone hydrated so we could enjoy the fun. Jeff Eaton killed yet again as the emcee for the evening. 

Friday: Exploring Baltimore
As people shuffled to the airport, a few Palantiri were able to squeeze in a last minute trip to the Baltimore National Aquarium. Thankfully not one Palantir was lost to sharks.

Thanks for a great week Baltimore. We’ll see you next time, DrupalCon!

We want to make your project a success.

Let's Chat.
Categories: Drupal

Acquia Developer Center Blog: Managing Drupal Sites with Composer

9 May 2017 - 11:56am

Talking through the growing pains of using Drupal with Composer dependency management at DrupalCon Baltimore. Drupal gets better when companies, organizations, and individuals build or fix something they need and then share it with the rest of us. Open source technologies become better, stronger, and smarter when others take it upon themselves to make a positive difference contributing their knowledge, time, and energy to it. Acquia is proud to play a part, alongside thousands of others, in making tomorrow’s Drupal better than today’s. One of the people making a difference is Jeff Geerling.

Tags: acquia drupal planetComposerdependency managementdrupalcon
Categories: Drupal