Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough
May 11 2020
May 11

FOR IMMEDIATE RELEASE

PORTLAND, Ore., May 11, 2020—The CDC, NIH, and Medecins Sans Frontieres/Doctors Without Borders—among many others—depend on the power of Drupal, the largest independent open source content management system, to keep their websites dynamic and secure. But the cancellation of the Drupal Association’s annual keystone fundraising event—originally scheduled for May 2020—put the nonprofit’s finances in jeopardy.

 
COVID-19 has delivered a particularly hard economic hit to non-profits, and the Drupal Association (DA) is no exception,” says Heather Rocker, executive director of the DA. “When we made the decision to cancel DrupalCon North America 2020 for the safety of our attendees, the next question was how to recover those funds so we could continue operations for our community of millions around the world.”

 
Enter #DrupalCares, a global fundraiser conceived with the hopes of bridging the significant funding gap left as a result of the pandemic. While the campaign had a strong start, what really put the fundraising into overdrive was the #DrupalCares match challenge, a $100,000 matching grant for individual contributions funded by Drupal creator Dries Buytaert and his wife Vanessa. Then a coalition of Drupal businesses came together to match those contributions again—bringing the potential impact up to $300,000. These contributions, together with the contributions from Drupal service providers and end-users, accelerated the campaign dramatically.
 
As of today, May 11, 2020, #DrupalCares has raised $500,000, meeting its 60-day goal in just over 30 days.  Nearly 150 businesses and organizations, along with over 2,000 individual donors and members donated, to reach the goal in record time.  
 
"I'm in awe of how quickly the Drupal community rallied to raise funds for the Drupal Association,” said Dries Buytaert, founder of Drupal. “With this fundraising campaign behind us, the Drupal Association can refocus on key initiatives such as the Drupal 9 launch next month.

“DrupalCon has been an important reason for Drupal's success,” said Buytaert. “Even though we'll be gathering virtually this summer, I'm very excited that DrupalCon will live on. I'd like to thank everyone who helped us reach our goals—the Drupal community is stronger than ever."
 
While the nonprofit Drupal Association was impacted by COVID-19, the Drupal ecosystem remains strong. As Buytaert wrote in March, open source software seems to be recession-proof.
 
“Open Source has grown to be more secure, more flexible, and more stable than ever before,” said Buytaert. “Today, the benefits of Open Source are even more compelling than during past recessions.”
 
Open source contribution also provides an excellent opportunity for individuals to expand their skills—or even re-skill—during this time of record unemployment. Drupal has demonstrated once again that the power of community and the open source model make projects like Drupal the best possible investment in uncertain times.
 
In addition to the #DrupalCares campaign, the majority of original DrupalCon 2020 sponsors allowed the Association to retain their sponsorship dollars as the event prepares to shift to its first-ever virtual DrupalCon Global 2020.  
  
“Like so many organizations, we had to pivot quickly on a major keystone event, but we also had to pivot quickly on a product launch, as we were planning to introduce Drupal 9, our first major software upgrade in almost five years, at DrupalCon,” says Rocker. “DrupalCon was originally scheduled to host approximately 3,000 attendees in May 2020 in Minneapolis, so we didn’t have time for a ‘wait and see’ approach. I’m grateful to a solid, creative Association staff and the extended leadership of our Drupal community who are willing to do whatever it takes to make this event a success.”
 
“Additionally, Drupal 9 is scheduled to launch on schedule in early June, which is a testament to how dedicated this community is to continuing to be trailblazers—even now, when a delay caused by these world events would have been no surprise,” said Rocker.
 
The #DrupalCares fundraising campaign remains active through May 31, 2020. To learn more about Drupal or make a donation, visit www.Drupal.org.
 
About Drupal and the Drupal Association
Drupal is the open source content management software behind millions of websites and applications, boasting a community of 46,000-plus developers and more than 1.3 million users on Drupal.org. The Drupal Association is the non-profit organization dedicated to accelerating the Drupal software project, fostering the community, and supporting its growth.
 
###
 
For more information contact Heather Rocker,  [email protected]

May 11 2020
May 11

Update: To be clear, you do not need to sign up for an account for the free materials. The tutorials and exercises will be free to everyone starting on Monday, lasting through Friday.

May’s DrupalCon Minneapolis has morphed into July’s DrupalCon Global! Hurrah! Heather Rocker, Executive Director of the Drupal Association, recently used two perfect words to describe the Drupal community: flexible and adaptable. Extraordinary times require nothing less and with the Drupal Association’s adaptive and flexible response to the pandemic, it might just mean that more of the world’s 3 million Drupal users get access to the ideas, celebration, and kinship that DrupalCon embodies.

My teammates Joe, Amber, and Ashley were set to give a beginner-level theming workshop at DrupalCon Minneapolis in May. It’s a course they’ve worked hard to craft as an excellent resource for learning how to make custom Drupal themes, and they’ve taught it in person at many workshops over the years. Sadly, this year they won’t be able to do this in Minneapolis, but we do have the workshop material online in the form of our Hands-On Theming course. To make this even more accessible and to mark the original DrupalCon Minneapolis week, during May 18-22, we’ll make our entire Hands-On Theming course free for anyone wanting to learn.

#DrupalCares logo
We encourage you to make a donation of any size to the Drupal Association in lieu of payment to us, if that is something you can do. Small but mighty, the association supports Drupal.org projects and has the massive task of scheduling (and rescheduling) DrupalCon.

Come back next week to learn Drupal theming for free, support the Drupal Association if you can, and have a great “DrupalCon” week.

May 11 2020
May 11
Aaron Deutsch (contributed by proud mom, Kristen Pol)
Image Credit: Aaron Deutsch (contributed by proud mom, Kristen Pol)

Excited! Humbled! Appreciative! Energized! Thankful! Those are just a few of the emotions our team is feeling today as I had the honor of announcing that you helped us meet our #DrupalCares emergency funding goal. Today, we launched a press release to recognize the contributions of the Drupal Community and demonstrate to the world that the Drupal is strong.

We proudly announce that #DrupalCares has raised $500,000, meeting its 60-day goal in just over 30 days. Nearly 150 businesses and organizations, along with over 2,000 individual donors and members, donated to reach the goal in record time. Drupal has demonstrated once again that the power of community and the open source model make projects like Drupal the best possible investment in uncertain times.

While the campaign had a strong start, what really put the fundraising into overdrive was the #DrupalCares match challenge, a $100,000 matching grant for individual contributions funded by Drupal creator Dries Buytaert and his wife Vanessa. Then a coalition of Drupal businesses came together to match those contributions again—bringing the potential impact up to $300,000. These contributions, together with the contributions from Drupal service providers and end-users, accelerated the campaign dramatically.

"I'm in awe of how quickly the Drupal community rallied to raise funds for the Drupal Association,” said Dries Buytaert, founder of Drupal. “With this fundraising campaign behind us, the Drupal Association can refocus on key initiatives such as the Drupal 9 launch next month.

“DrupalCon has been an important reason for Drupal's success,” said Buytaert. “Even though we'll be gathering virtually this summer, I'm very excited that DrupalCon will live on. I'd like to thank everyone who helped us reach our goals—the Drupal community is stronger than ever."

Part of the success of #DrupalCares was thanks to community-developed fundraisers encouraging Drupal users around the globe to donate. Gábor Hojtsy, Ron Northcutt, and Ofer Shaal started the Drupal 9 module challenge, donating €9 for each module that created its first Drupal 9 compatible release. The amazee.io team created and hosted Pixels for Drupal (with help from Alanna Burke, Sean Hamlin, Brandon Williams, Eli Stone, Michael Schmid) which awarded donors pixels for fun recognition. Jeff Geerling helped amplify our message on Youtube, making a donation for every like. Oliver Davies turned purchases of Test Driven Drupal in April into donations. These and other creative Community-led campaigns helped to drive  #DrupalCares awareness and giving further. 

On behalf of the Drupal Association staff and board, we hope you’ll enjoy this token of our sincere #DrupalThanks for the support and encouragement you’ve given during this #DrupalCares journey. Tackling this hurdle of emergency funding means that we can pivot to other important projects on the horizon such as the launch of Drupal 9 and the virtual version of DrupalCon. For those that wish to continue contributing, or for those that haven’t had an opportunity yet, the official campaign stays open through May 31. Every donation and membership continues to drive our diversification of funding in the right direction.

May 11 2020
May 11

Drupal is one of the largest and most active open-source software projects in the world. Behind the scenes is the Drupal Association, the non-profit organization responsible for enabling it to thrive by architecting and introducing new tooling and infrastructure to support the needs of the community and ecosystem. Many of us know the Drupal Association as the primary organizer of the global DrupalCon conference twice a year. But it's less common knowledge that the Drupal Association is actively engaged in Drupal development and maintains some of the most important elements of the Drupal project. This runs across the spectrum of software localizations, version updates, security advisories, dependency metadata, and other "cloud services" like the Drupal CI system that empower developers to keep building on Drupal.

With the ongoing coronavirus pandemic, the Drupal Association is in dire financial straits due to losses sustained from DrupalCon North America (one of the largest sources of funding) having to be held as a virtual event this year. As part of the #DrupalCares campaign, we at Tag1 Consulting implore organizations that use Drupal, companies that provide Drupal services, and even individuals who make their living off Drupal development to contribute in some shape or form to the Drupal Association in this time of need.

We are putting our money where our mouth is. For years we have donated at least eighty hours a month to support the DA and Drupal.org infrastructure and tooling. I’m proud to announce that we are expanding this commitment by 50% to 120 hours a month of pro-bono work, from our most senior resources, to help the DA offset some of its operating expenses. Furthermore, we contributed to help #DrupalCares reach its $100,000 goal and so that any donation you make is doubled in value.

To gain insights into building software communities at scale in open source, Michael Meyers (Managing Director at Tag1) and I (Preston So, Editor in Chief at Tag1 and author of Decoupled Drupal in Practice) recently kicked off a Tag1 Team Talks miniseries with the Drupal Association's engineering team, represented by Tim Lehnen (Chief Technology Officer at the Drupal Association) and Narayan Newton (Chief Technology Officer at Tag1), to examine all the ways in which the DA keeps the Drupal community ticking.

Why Tag1 supports the Drupal Association

Here at Tag1, we work with a diverse range of technologies, but Drupal has been our passion for many years. It's been a critical part of our business since Tag1's inception, and we're grateful to the Drupal Association for sustaining such an essential part of our work today. By no means is it an understatement to characterize the Drupal Association as the lifeblood of the Drupal ecosystem. Because of our appreciation for what Drupal has given us, we're committed to doing our part to giving back to Drupal, not only over the course of our many years working in concert with the Drupal Association but also right now during the #DrupalCares campaign.

How we contribute to Drupal

Though Tag1 is well-known for being the all-time number-two contributor to the Drupal project, with the largest concentration of core committers, branch managers, release managers, and core maintainers of any organization in the community, we're much less known for how we support the underlying foundations of the ecosystem. Beyond the more visible contributions of staff members like Moshe Weitzman, Nathaniel Catchpole (catch), Francesco Placella (plach), and Fabian Franz (fabianx), we also do much more than add our support to Drupal core development. After all, supporting Drupal requires more than just code; it also requires the tooling and infrastructure that keep the project's blood flowing.

During our Tag1 Team Talks episode with the Drupal Association, Tim Lehnen eloquently made the case for the non-profit that has driven Drupal's success for so many years: While the software makes up the bulk of open-source contributions, offering surrounding services that buttress the software's core is another key function that the Drupal Association performs. To that end, for many years, Tag1 has donated 80 hours of pro-bono work a month to ensure that Drupal.org and all the tooling the community relies on stays up and running. Tag1 is honored to increase our monthly contribution of pro-bono hours to the Drupal Association by 50% from 80 to 120 hours of expert work from our most senior resources. And now with our increased work hours and financial contributions, critical projects like the migration to GitLab can continue to move forward, even during a situation like the current pandemic.

Supporting Drupal's test infrastructure

In Drupal, a key aspect of code contribution is running tests that verify a patch will work against a massive variety of environments, be compatible with a spectrum of versions of Drupal, and not introduce any functional regressions in the code. One of the key questions many community members ask is why Drupal maintains its own testing infrastructure in lieu of a service such as TravisCI.

Unfortunately, whenever existing continuous integration solutions were tasked with running a Drupal core test for every Drupal patch, they would consistently time out, maxing out available resources. To solve the challenges associated with developing and testing at scale, the DA partnered with Tag1. We deployed our expertise in infrastructure, mission-critical application development, and performance and scalability to help run and maintain Drupal.org's servers and the DrupalCI test runner system. The CI system ensures that contributors have a reliable center for collaboration and a dependable test infrastructure for all of their patches and modules. Tag1's deep expertise has been critical to the success of the DrupalCI system, which we scaled dynamically to the extent that it is now concurrently running more than an entire decade's worth of testing in a single year.

The new testing infrastructure was an enormous undertaking for the Drupal Association due to its complexity. Narayan Newton opted from early days to leverage standard Unix tools to build out the environments for testing targets. And rather than use Kubernetes for the orchestration of tests, the Drupal Association opted to use Jenkins and the EC2 Fleet plugin for DrupalCI. Jenkins manages the orchestration of virtual machines (VMs) and initializes them as test targets before actually running the tests themselves in a clean room environment. As Narayan notes during our conversation, one of the most fascinating quirks of Drupal's infrastructure is that many of its core elements were installed before standardized tooling emerged to handle those use cases in a regimented way.

Supporting Drupal's migration to GitLab

In addition to our contributions to Drupal's underlying infrastructure, Tag1 also assists with key initiatives run by the Drupal Association such as the ongoing migration from Drupal's homegrown Git system to GitLab, a source control provider. According to Narayan, the migration to GitLab has been much more straightforward than previous historical migrations in Drupal's past, more specifically the original migration from Drupal's previous CVS source control system to Git, which it has used ever since. Code management in Drupal has long employed a bespoke Git approach with a homegrown Git daemon written by the community and cgit as the web-based front end for Git repositories.

One of the key benefits GitLab provides to the Drupal Association is the fact that the DA is no longer responsible for building and supporting a source control system for Drupal at the scale at which it operates. After all, GitLab has a dedicated site reliability engineering (SRE) team focused on ensuring source availability even at high loads. And as Narayan notes, GitLab has been responsive to security issues, in addition to facilitating "one of the smoothest migrations I've been a part of." But this doesn't mean there weren't complications.

Because GitLab has a superset of features that include some existing Drupal.org functionality, the Drupal Association, supported by Tag1, worked closely with the GitLab team to ensure that certain features could be disabled for use with the Drupal project, avoiding many of the issues that have plagued the GitHub mirror of Drupal since its conception. Narayan contributed key features to ensure that GitLab's integration points could be toggled on and off in order to enable the unique needs and requirements of the Drupal community and ecosystem.

Tim adds that in terms of lack of downtime, disruption, forklifting the entire Git code management infrastructure without disrupting the development community was a rousing success, especially given that there was no impact on a minor version release. In the process, the Drupal community has gained a number of key features that will enable accelerated development and conversation between contributors in ever-richer ways. In coming months, the Drupal Association will also facilitate the addition of GitLab's merge requests feature, which will introduce yet more efficiencies for those making code contributions.

Why #DrupalCares is so important

For us, Drupal is a key reason we exist, and the Drupal Association has done wonders to ensure the longevity of an open-source software project we hold dear. This is why in these troubling times for the Drupal Association, it could not be more important to uphold the ideals of open source and ensure the survival of our beloved community and ecosystem. Over the course of the past month, we've witnessed an incredible outpouring of support from all corners of the community, buttressed by the various matches provided by community members like none other than project lead Dries Buytaert. We at Tag1 Consulting have contributed toward #DrupalCares' $100,000 goal in order to multiply the impact of community donations and buttress our existing support.

Without your support, whether as a company or an individual, we may never see another DrupalCon grace our stages or celebrate yet another major version release that introduces innovative features to the Drupal milieu. And it's not just about the more visible elements of the Drupal experience like DrupalCon. It's also about the invisible yet essential work the Drupal Association does to keep the Drupal project rolling along. Thanks to the innumerable contributions the Drupal Association has made to maintain DrupalCI, the GitLab migration, Composer Façade, and a host of other improvements to Drupal's infrastructure and tooling, with the support of Tag1, the Drupal project remains one of the most impressive open-source projects in our industry.

Conclusion

Here at Tag1, we believe in the enduring value of open source and its ability to enrich our day-to-day lives in addition to the way we do business. We're dedicated to deepening our already extensive support for the Drupal Association in ways both financial and technological. And now it's your turn to return the favor. If you're an individual community member, we strongly encourage you to start or renew a membership. If you're an organization or company in the Drupal space, we encourage you to contribute what you can to ensure the continued success of Drupal. Together, we can keep Drupal alive for a new era of contribution and community.

Special thanks to Jeremy Andrews and Michael Meyers for their feedback during the writing process.

Photo by Jon Tyson on Unsplash

May 11 2020
May 11

What is a views display extender

The display extender plugin allow to add additional options or configuration to a views regardless of the type of display (e.g. page, block, ..).

For example, if you wanted to allow site users to add certain metadata to the rendered output of every view display regardless of display type, you could provide this option as a display extender.

What we can do with it

We will see how we implement such a plugin, for the example, we will add some metadata (useless metatags as example) to the document head when the views is displayed.

We will call the display extender plugin HeadMetadata (id: head_metadata) and we will implement it in a module called views_head_metadata.

The implementation

Make our plugin discoverable

Views do not discover display extender plugins with a hook info as usual, for this particular type of plugin, views has a variable in his views.settings configuration object.

You need to add your plugin ID to the variable views.settings.display_extenders (that is a list).

To do so, I will recommend you to implement the hook_install (as well uninstall) in the module install file. To manipulate config object you can look at my previous notes on CMI.

Make the plugin class

As seen in the previous post on Drupal 8 plugins, you need to implement the class in the plugin type namespace, extend the base class for this type of plugin, and add the metadata annotation.

In the case of the display extender plugin, the namespace is Drupal\views_head_metadata\Plugin\views\display_extender, the base class is DisplayExtenderPluginBase, and the metadata annotation are defined in \Drupal\views\Annotation\ViewsDisplayExtender.

The display extender plugins methods are nearly the same that the display plugins, you can think of its like a set of methods to alter the display plugin.

The important methods to understand are :

  • defineOptionsAlter(&$options) : Define an array of options your plugins will define and save. Sort of schema of your plugin.
  • optionsSummary(&$categories, &$options) : To add a category (the section of the views admin interface) if you want to add one, and define your options settings (in wich category there are, and the value to display as the summary).
  • buildOptionsForm(&$form, FormStateInterface $form_state) : Where you construct the form(s) for your plugin, of course linked with a validate and submit method.

Generate the metadata tags in the document head

Now that we have our settings added to every views display, we need to use those to generate the tags in the document head as promised.

To work on the views render we will use the hook for that : hook_views_pre_render($view) and the render array property #attached.

Implement that hook in the .module of our module views_head_metadata, let's see :

May 11 2020
May 11

For the example we are going to implement an area that will present some links and text in a custom way, not sure if it's really usefull, but that not the point of this article.

The Plugin system

For the first post on the plugins I will introduce briefly on the concept. For those that already been using Ctools plugins system, you already now about the plugin system purposes.

For those who doesn't know about it, the plugin system is a way to let other module implements her own use case for an existing features, think of Field formatter : provide your own render array for a particular field display, or Widget : provide your own form element for a particular field type, etc...

The plugin system has three base elements :

Plugin Types

The plugin type is the central controlling class that defines how the plugins of this type will be discovered and instantiated. The type will describe the central purpose of all plugins of that type; e.g. cache backends, image actions, blocks, etc.

Plugin Discovery

Plugin Discovery is the process of finding plugins within the available code base that qualify for use within this particular plugin type's use case.

Plugin Factory

The Factory is responsible for instantiating the specific plugin(s) chosen for a given use case.

Detailled informations : https://www.drupal.org/node/1637730

In our case Views is responsible of that implementations so we are not going further on that, let see now how to implement a plugin definition.

The Plugin definitions

The existing documentation on the plugin definitions are a little abstract for now to understand how it really works (https://www.drupal.org/node/1653532).

You have to understand simply that a Plugin in most case is a Class implementation, namespaced within the namespace of the plugin type, in our example this is : \Drupal\module_name\Plugin\views\area

So if I implement a custom views area Plugin in my module the class will be located under the location module_name/src/Plugin/views/area/MyAreaHandler.php

To know where to implement a plugin definition for a plugin type, you can in most case look at module docs, or directly in the source code of the module (looking at an example of a definition will be enough)

In most cases, the modules that implement a Plugin type will provide a base class for the plugins definitions, in our example views area provide a base class : \Drupal\views\Plugin\views\area\AreaPluginBase

Drupal provide also a base class, if you implement a custom Plugin type, for the Plugin definition : \Drupal\Component\Plugin\PluginBase

Your custom plugin definition class must also have annotation metadata, that is defined by the module that implement the plugin type, in our example : \Drupal\views\Annotation\ViewsArea

In the case of views you will also need to implement the hook_views_data() into module_name.views.inc file, there you will inform views about the name and metadata of your Area handler.

Hands on implementation

So we have a custom module let's call it module_name for the example :)

We will create the class that implements our plugin definition and we are gonna give it this Plugin ID : my_custom_site_area.

We save this file into module_name/src/Plugin/views/area/MyCustomSiteArea.php

Now we just have to implements the hook_views_data() and yes this is the end, you can use your awesome views area handler into any view and any area.

Define this hook into the file : module_name/module_name.views.inc

May 11 2020
May 11

There is three types of configuration data :

The Simple Configuration API

  • Used to store unique configuration object.

  • Are namespaced by the module_name.

  • Can contain a list of structured variables (string, int, array, ..)

  • Default values can be found in Yaml : config/install/module_name.config_object_name.yml

  • Have a schema defined in config/schema/module_name.schema.yml

Code example :

The States

  • Not exportable, simple value that hardly depend of the environment.

  • Value can differ between environment (e.g. last_cron, maintenance_mode have different value on your local and on the production site)

The Entity Configuration API

  • Configuration object that can be multiple (e.g. views, image style, ckeditor profile, ...).

  • New Configuration type can be defined in custom module.

  • Have a defined schema in Yaml.

  • Not fieldable.

  • Values can be exported and stored as Yaml, can be stored by modules in config/install

Code example :

  https://www.drupal.org/node/1809494

Store configuration object in the module :

Config object (not states) can be stored in a module and imported during the install process of the modules.

To export a config object in a module you can use the configuration synchronisation UI at /admin/config/development/configuration/single/export

Select the configuration object type, then the object, copy the content and store it in your custom module config/install directory following the name convention that is provided below the textarea.

You can also use the features module that is now a simple configuration packager.

If after the install of the module, you want to update the config object, you can use the following drush command :

Configuration override system

Remember the variable $conf in settings.php in D6/D7 for overriding variables.

In D8, you can also override variable from the configuration API:

You can also do overrides at runtime.

Example: getting a value in a specific languages :

Drupal provide a storage for override an module can specify her own way of override, for deeper informations look at :

https://www.drupal.org/node/1928898

Configuration schema

The config object of Config API and of the configuration entity API have attached schema defined in module_name/config/install/module_name.schema.yml

These schema are not mandatory, but if you want to have translatable strings, nor form configuration / consistent export, you must take the time to implement the schema for your configuration object. However if you don't want to, you can just implement the toArray() method in your entity config object class.

Example, docs and informations : https://www.drupal.org/node/1905070

Configuration dependencies calculation

Default is in the .info of the module that define the config object like in D6/D7

But config entity can implements calculateDependencies() method to provide dynamic dependencies depending on config entity values.

Think of Config entity that store field display information for content entities specific view modes, there a need to have the module that hold the fields / formatters in dependencies but these are dynamic depending on the content entity display.

More information : https://www.drupal.org/node/2235409

May 11 2020
May 11

Ressources

Migrate in Drupal 8

Migrate is now included in the Drupal core for making the upgrade path from 6.x and 7.x versions to Drupal 8.

Drupal 8 has two new modules :
Migrate: « Handles migrations »
Migrate Drupal : « Contains migrations from older Drupal versions. »

None of these module have a User Interface.

« Migrate » contains the core framework classes, the destination, source and process plugins schemas and definitions, and at last the migration config entity schema and definition.

« Migrate Drupal » contains implementations of destination, sources and process plugins for Drupal 6 and 7 you can use it or extend it, it's ready to use. But this module doesn't contain the configuration to migrate all you datas from your older Drupal site to Drupal 8.

The core provides templates of migration configuration entity that are located under each module of the core that needs one, under a folder named 'migration_templates' to find all the templates you can use this command in your Drupal 8 site:

To make a Drupal core to core migration, you will find all the infos here : https://www.Drupal.org/node/2257723 there is an UI in progress for upgrading.

A migration framework

Let have a look at each big piece of the migration framework :

Source plugins

Drupal provides an interface and base classes for the migration source plugin :

  • SqlBase : Base class for SQL source, you need to extend this class to use it in your migration.
  • SourcePluginBase : Base class for every custom source plugin.
  • MenuLink: For D6/D7 menu links.
  • EmptySource (id:empty): Plugin source that returns an empty row.
  • ...

Process plugins

There is the equivalent of the D7 MigrateFieldHandler but this is not reduced to fields or to a particular field type.
Its purpose is to transform a raw value into something acceptable by your new site schema.

The method transform() of the plugin is in charge of transforming your $value or skipping the entire row if needed.
If the source property has multiple values, the transform() will happen on each one.

Drupal provides migration process plugin into each module of the core that needs it (for the core upgrade),
To find out which one and where it is located you can use this command :

Destination plugins

Destination plugins are the classes that handle where your data are saved in the new Drupal 8 sites schemas.

Drupal provides a lot of useful destination classes :

  • DestinationBase : Base class for migrate destination classes.
  • Entity (id: entity) : Base class for entity destinations.
  • Config (id: config) : Class for importing configuration entities.
  • EntityBaseFieldOverride (id: entity:base_field_override): Class for importing base field.
  • EntityConfigBase : Base class for importing configuration entities.
  • EntityImageStyle (id: entity:image_style): Class for importing image_style.
  • EntityContentBase (id: entity:%entity_type): The destination class for all content entities lacking a specific class.
  • EntityNodeType: (id: entity:node_type): A class for migrate node type.
  • EntityFile (id: entity:file): Class for migrate files.
  • EntityFieldInstance: Class for migrate field instance.
  • EntityFieldStorageConfig: Class for migrate field storage.
  • EntityRevision, EntityViewMode, EntityUser, Book...
  • And so more…

Builder plugins:

"Builder plugins implement custom logic to generate migration entities from migration templates. For example, a migration may need to be customized based on the data that is present in the source database; such customization is implemented by builders." - doc API

This is used in the user module, the builder create a migration configuration entity based on a migration template and then add fields mapping to the process, based on the data in the source database. (@see /Drupal/user/Plugin/migrate/builder/d7/User)

Id map plugins:

"It creates one map and one message table per migration entity to store the relevant information." - doc API
This is where rollback, update and the map creation are handled.
Drupal provides the Sql plugin (@see /Drupal/migrate/Plugin/migrate/id_map/Sql) based on the core base class PluginBase.

And we are talking only about core from the beginning.
All the examples (That means docs for devs) are in core !

About now :

While there *almost* a simple UI to use migration in Drupal 8 for Drupal to Drupal, Migrate can be used for every kind of data input. The work is in progess for http://Drupal.org/project/migrate_plus to bring an UI and more source plugins, process plugins and examples. There already is the CSV source plugin and a pending patch for the code example. The primary goal of « migrate plus » is to have all the features (UI, Sources, Destinations.. ) of the Drupal 7 version.

Concrete migration

(migration with Drupal 8 are made easy)

I need to migrate some content with image, attached files and categories from custom tables in an external SQL database to Drupal.

To begin shortly :

  • Drush 8 (dev master) and console installed.
  • Create the custom module (in the code, I assume the module name is “example_migrate”):
    $ Drupal generate:module
    or create the module by yourself, you only need the info.yml file.
  • Activate migrate and migrate_plus tools
    $ Drupal module:install migrate_tools
    or
    $ drush en migrate_tools
  • What we have in Drupal for the code example :
    • a taxonomy vocabulary : ‘example_content_category’
    • a content type ‘article’
    • some fields: body, field_image, field_attached_files, field_category
  • Define in settings.php, the connexion to your external database:

We are going to tell migrate source to use this database target. It happens in each migration configuration file, it’s a configuration property used by the SqlBase source plugin:

This is one of the reasons SqlBase has a wrapper for select query and you need to call it in your source plugin, like $this->select(), instead of building the query with bare hands.

N.B. Each time you add a custom yml file in your custom module you need to uninstall/reinstall the module for the config/install files to imports. In order to avoid that, you can import a single migration config file by copy/paste in the admin/config configuration synchronisation section.

The File migration

The content has images and files to migrate, I suppose in this example that the source database has a unique id for each file in a specific table that hold the file path to migrate.

We need a migration for the file to a Drupal 8 file entity, we write the source plugin for the file migration:

File: src/Plugin/migrate/source/ExampleFile.php

We have the source class and our source fields and each row generate a path to the file on my local disk.

But we need to transform our external file path to a local Drupal public file system URI, for that we need a process plugin. In our case the process plugin will take the external filepath and filename as arguments and return the new Drupal URI.

File: src/Plugin/migrate/process/ExampleFileUri.php

We need another process plugin to transform our source date values to timestamp (created, changed), as the date format is the same across the source database, this plugin will be reused in the content migration for the same purpose:

File: src/Plugin/migrate/process/ExampleDate.php

For the destination we use the core plugin: entity:file.

Now we have to define our migration config entity file, this is where the source, destination and process (field mappings) are defined:

File: config/install/migrate.migration.example_file.yml

We are done for the file migration, you can execute it with the migrate_tools (of the migrate_plus project) drush command:

The Term migration

The content has categories to migrate.
We need to import them as taxonomy term, in this example I suppose the categories didn't have unique ids, it is just a column of the article table with the category name…

First we create the source :

File: src/Plugin/migrate/source/ExampleCategory.php

And we can now create the migration config entity file :

File: config/install/migrate.migration.example_category.yml

This is done, to execute it :

The Content migration

The content from the source has an html content, raw excerpt, image, attached files, categories and the creation/updated date in the format Y-m-d H:i:s

We create the source plugin:

File: src/Plugin/migrate/source/ExampleContent.php

Now we can create the content migration config entity file :

File: config/install/migrate.migration.example_content.yml

Finally, execute it :

Group the migration

Thanks to migrate_plus, you can specify a migration group for your migration.
You need a to create a config entity for that :

File: config/install/migrate_plus.migration_group.example.yml

Then in your migration config yaml file, be sure to have the line migration_group next to the label:

So you can use the command to run the migration together, and the order of execution will depend on the migration dependencies:

I hope that you enjoyed our article.

Best regards,

Delta https://www.drupal.org/u/delta

May 11 2020
May 11

At Studio.gd we love the Drupal ecosystem and it became very important to us to give back and participate.
Today we're proud to announce a new module that we hope will help you !

Inline Entity Display module will help you handle the display of referenced entity fields directly in the parent entity.
For exemple if you reference a taxomony "Tags" to an Article node, you will be able directly in the manage display of the article to display tags' fields. It can become very usefull with more complex referenced entity like field collection for exemple.

VOIR LE MODULE : https://www.drupal.org/project/inline_entity_display


Features

- You can control, for each compatible reference field instances, if the fields from the referenced entities would be available as extra fields. Disabled by default.

- You can manage the visibility of the referenced entities fields on the manage display form. Hidden by default.

- View modes are added to represent this context and manage custom display settings for the referenced entities fields in this context {entity_type}_{view_mode} Example: "Node: Teaser" is used to render referenced entities fields, when you reference an entity into a node, and you view this node as a teaser if there are no custom settings for this view mode, fields are rendered using the default view mode settings.

- Extra data attributes are added on the default fields markup, so the field of the same entity can be identified.

Compatible with Field group on manage display form.

Compatible with Display Suite layouts on manage display form.

Requirements

- Entity API
- One of the compatible reference fields module.

Tutorials

simplytest.me/project/inline_entity_display/7.x-1.x
The simplytest.me install of this module will come automatically with these modules: entity_reference, field_collection, field_group, display suite.

VOIR LE MODULE : https://www.drupal.org/project/inline_entity_display

We are currently developping a similar module for Drupal 8 but more powerful and more flexible, Stay tuned !

May 11 2020
May 11

Join us on May 28th for an Amazee Labs Webinar about Test-Driven Development with Storybook and Cypress

Test-driven development is central to any agile development process, and navigating to a browser manually for testing is time that can be spent on more important things. Mastering the testing tools that accompany different languages and frameworks might seem daunting, but it’s one of the most rewarding and efficient things a developer can learn, and we’re here to help.

In our last webinar, we talked about applying Test-Driven Development with Cypress.io to Drupal modules and Gatsby Websites. 

Now we’ll take the next step on our journey to total confidence with testing by teaching you how to mix Storybook into your workflow in order to: 

  • Improve functional and visual test coverage for user interface components 

  • Speed up development 

  • Test without ever touching a browser


Join us on May 28th, 2020 at 04:00 PM -- Register online now! 

Want to review before you join? Check out the resources and full video recording of our last webinar on TDD with Gatsby.
 

Watch our previous Webinars:

May 10 2020
May 10

“A pessimist sees the difficulty in every opportunity; An optimist sees the opportunity in every difficulty.” 
- Winston Churchill

On the left side: On a blue background, a man sitting with his laptop and working in the day time. On the right side: Black background, a man playing his DJ equipment at night time.


In a world where everyone is running after success, only a few take the advantage and grab the opportunity that life gives them, to achieve it. The ones who are ready for every kind of challenge, are the ones who achieve success. Capitalizing that opportunity is where the key lies! 

At OpenSense Labs, we have someone who believes that when opportunity knocks, grab it, and success will find its way. Deepak Sagar, known as Sagar, who is currently a Drupal developer with us, has a very interesting story. He went on from being a DJ in his initial college days to a developer later on. His story will definitely inspire you to have a keen eye for every opportunity that knocks your door.

"Partying is like work for me"

Tuba: So, the first thing that I'd like to know is, how was your life as a DJ and why did you choose DJ-ing?

Sagar: My Life as a DJ is not over, I'm still a DJ. There is a story behind why I chose to become a DJ. During my graduation, a DJ came to my college to play in the college fest. And I went up to him and asked him general questions about his DJ-ing equipment and his response triggered me to learn about the equipment. He said, ‘you won’t understand, let it be.’ It’s a short story, but I felt really bad at that moment and started learning DJ-ing from my cousin who is also a DJ. There were a lot of ups and downs as a DJ in the beginning. I got some work for 2 months and then there was a long gap until I got another job. Now, partying is like work for me.

A person working on his DJ equipment.


Tuba: You are still a DJ, how do you manage both your office life and DJ life?

Sagar: I leave for the office in the morning and after I'm done with the office, I go to the club I work for. I leave for office at around 9:30 AM in the morning and leave the office around 7:00 PM and directly go to the club and leave the club around 1:30 AM and sleep around 3:00 AM and then again the same routine from the next day.

Tuba: Now the big question, why the transition from a DJ to a developer? What triggered your interests towards Drupal?

Sagar: I had nothing to do during the day. I worked as a part-time DJ at a club at night. Vid (CEO at OpenSense Labs) and Devanshu used to visit that club very often. One day, I was just having a casual conversation with them where I told them that I had nothing to do during the day and was looking for something. They asked me to come to their office the next day. I went there, and since that day I tried my best to learn everything about Drupal. I started with them in September as an intern and joined full time as a Frontend Developer in January. I was completely new to Drupal and I had no idea about it or CSS or HTML before. It took time to understand but slowly things came inflow. 

Tuba: And what would you say about your post-Drupal experience?

Sagar: Drupal is a life-changing experience for me. A new opportunity that came in my life and I gained an interest in it. There is something about Drupal that I can't explain. It's the same as your first love, it's almost the same feeling. I guess this is the right example. [Laughter]

Tuba: So what are your plans for the future now? I mean, is it always going to be both the things together?

Sagar: Although both things are going in the flow right now, there is going to be a time where I'll have to choose between the two. So when it comes to choosing, it's going to be hard. But I guess I'm going to choose to be a DJ because it is my first love. [Laughter] Also, there is no scope of a DJ in India. People here think of a DJ as someone who would play music at weddings and nothing more. Not a lot of people value this profession here. So if someday, I get an opportunity from a different country where people value it, I’ll go for it. And about development, that can be done remotely also. But for DJing, I'll have to be present in that place to play. 

Tuba: Great! So let's talk about the two moments - one was when you decided that ok, let's learn Drupal and the second when you became a professional developer.

Sagar: As a DJ, it's all about working at night mostly. So I decided that let's do something in the day time, and this opportunity knocked my door and that's when I thought of giving it a try. I have not lived my life in a planned way ever. It has always been sudden decisions that have led me to where I am. I had no plans of being a DJ. It was a sudden decision and it was the same with development also. I had no plan and no idea about it. But it was a great opportunity and I did my best to learn and I'm happy being a developer now. My life-changing moment was when Vid and Devanshu and also Vinit offered me to come to the office. They welcomed me to the office very nicely. Vid used to discuss and solve all my problems for me. 

Tuba: Thank you so much for your time, Sagar. I was really excited to know the story behind your journey. And I believe, that after reading your story, many would be inspired to do more to reach their life goals.  

Think, Believe, Dare, and Dream! Say yes to all the opportunities that come your way and figure out the required plans later. You need to be visionary enough to recognize the opportunity that comes your way. This is the message that Sagar's story has conveyed and we hope that it proves to be the turning point in the lives of our readers! 

May 09 2020
May 09

I talk a lot about the Cloud.  In fact if I were doing shots every time I mentioned the word, I'd probably be facedown on my desk by 9AM.  Like many buzzwords in the C-Suite there's a lot of excitement and confusion around the term.  Unlike some other buzzwords, this movement really is so important it will change the way we all live and work forever.

Cloud is not the first (and probably not the last) disruptor to business via software.  Over the past 50 years or so there have been four major epochs of software, with Cloud being the latest:

  1. Commercialization
  2. Open Source
  3. SaaS
  4. The Cloud

Commercialization

The first major change in software after it was invented was the consolidation of software from disparate bits of code that were being written into commercialized software that could be sold to businesses and consumers alike.  The major ERP providers (Oracle, SAP, Microsoft) and many other companies were founded during this era (Oracle 1977, Microsoft 1975, SAP 1972) - and over the next 3 decades commercial software was sold into business resulting in tremendous consolidation and wealth creation for the players involved.  The peak output of this era was the creation of the ERP, an acronym so widespread in corporate America that few people even in the industry can tell you what it stands for off the top of their head (it's Enterprise Resource Planning).  ERP software in theory is software "to rule them all", which handles every corner of what is required to run a business.

Open Source

Microsoft: join us or dieThen in the late 80s, Richard Stallman launched the GNU Project - a licensing arrangement designed to make software free and easy to share.  The term "Open Source" wasn't coined until the late 90s around the time the code for the internet browser Netscape Navigator was released to the public.  For those not around at the time many nerds (myself included) were in full revolt against the "Evil Empire" of Microsoft whose dominance in Operating Systems, consumer and business software alike made them appear like the unstoppable force that Amazon appears to be today.

During this time there were a number of advancements in software: open source languages (eg, php) evolved to support frameworks (eg, Zend), frameworks in turn gave way to open source platforms (eg, Drupal).  The mood from the late 90s well into the decade that followed was a jubilant wave of enthusiasm: for proponents, there was no problem that open source software couldn't solve - and even better, the code was free!

The first cracks in the open source approach appeared during the upgrade cycles of the most well developed platforms.  In many systems, great care was taken to "preserve the upgrade path" with the intention that the underlying code should be able to be replaced with a minimal impact to application. In other systems less care was applied here, but no matter the approach the net result was the same: upgrading was more difficult and expensive than the initial build.  The reasons here are only obvious in hindsight: when upgrading not only did you need to write the custom code, and migrate your existing content over, but you also needed to add enough functionality to rationalize a major re-investment to replace something that already existed.

SaaS

In the late 2000s just as the shine was coming off Open Source, the Software as a Service market was coming into full bloom.  If the problem with Open Source was the cost of code ownership, why not lease it instead?  Costs for hosting had dropped significantly, the internet was everywhere, all the time, and the software itself (thanks to Open Source) had become a lot cheaper and easier to build.  The secrets for SaaS products were the ability to build and sell code at scale.  In the CMS space, DIY projects like WordPress and Drupal came under fire from products like SquareSpace and Adobe Experience Manager; Open Source CRM projects faced more challenges from SaaS providers like Salesforce and dozens of other smaller applications.  Even accounting software (never really Open Source) started to cannibalize their own user base by moving to online versions.  For existing software manufacturers it was an opportunity to convert single one-time purchases into recurring revenue streams that would last *forever*.  For many large Open Source projects and communities, it was a bloodbath.  In some cases the pull to SaaS was so strong that former benevolent corporate sponsors walked away with Open Source code and completely rebranded leaving some Open Source developer communities dazed, confused - and angry.

As a service provider who prides ourselves on making the best recommendations for our customers, we couldn’t deny the value that existed on these platforms for many of our customers, conceptually being aligned to a software platform with a robust roadmap just made sense.  As a result, there were a number of areas - video streaming, CMS, CRM - where we moved away from full software builds, or helped with product selection and consulting instead.

The Cloud

Metal Toad at the EmmysMetal Toad at the Emmys

Way back in 2009 we won our first hosting client - the website for the Primetime Emmys.  The scale required was big and the visibility was high, so we setup a small cluster of big, beefy, physical servers in a physical facility to host the website - and it worked.  We hosted the website for several years with 0 downtime (thanks lots of hard work by a smart team and Akamai CDN), and even though AWS had also launched in 2006 we never thought of moving the site there.  Back then I was fond of saying “the Cloud will be great someday, but not today”.  For us, someday came in 2011, with a high profile rebuild of a new website.  The code was released to us 1 week before a major televised event and the new code required a major increase in the required hardware to get to proper performance.  The short timeline meant we simply couldn’t purchase the physical hardware required and rack it in time.  In a Hail Mary attempt to get things across the finish line we set up the site on AWS, held our breath… and it worked perfectly.  From that point on we were true cloud converts.  “Someday” had arrived and the Cloud was great.

For a number of years after that, the Cloud was a cost-effective place to get storage and compute cycles.  The worst part about it was the pricing: Amazon kept dropping the price, a penny per hour at a time.  Google and Microsoft joined the fray in (2008 and 2010 respectively), and more and more traditional hosting providers (Rackspace, etc) started offering their own brand of cloud.  Virtualization was in full vogue and the marketplace was vibrant and varied.

Then with the launch of Lambda in 2015, things shifted again.  You didn’t need to reserve computing power for months, weeks, days or even hours - you could buy in milliseconds.  This shift had profound implications not only for the costs of hosting, but for the promise of how software itself should be built.  The concept of serverless architecture started driving discussions and capturing the imagination of developers - cloud applications spun up on demand using only the resources required, and freeing them up as soon as they were no longer needed.  If fully implemented, rebuilding the software in use today there’s no doubt billions of hours of compute time and associated watts of energy could be freed up - and that’s just the tip of the iceberg.  The AWS cloud now features over 120 products and services including compute cycles optimized for machine, video, AR/VR, IoT, voice, analytics - and even satellite.

By comparison, the promise of SaaS has gone stale.  Years of deferred investment on software roadmaps, maximizing profits, marketing fluff, and walled garden philosophies have left many SaaS providers in a state of high technical debt and high pricing.  The Cloud is going to eat them for lunch.  By way of example, back in 2003 I built a video transcoding engine (using an Open Source project).  The experience was a labor intensive, painful one, so in 2006 when the scores of SaaS video management platforms were released, I readily endorsed them for my customers - Brightcove, Kaltura, Ooyala - they were all better than my home spun system.  Now more than a decade later, many of these systems have fallen behind the times and include many features that customers simply don’t want.  On the cloud front, AWS Elemental offers a-la-carte video features on cloud instances optimized for various functions.  I’m also aware of not 1 but 3 large entertainment companies currently looking at overhauling how they manage video.  And that’s just one small corner of what’s possible!

The Cloud is changing how all software should - and will - be built.  Software is no longer a cost center or a need-to-have for most corporations, but rather a critical part of their customer experience and value chain.  If your competitors allow customers to buy online and you do not, you are in trouble.  If your competitors’ software costs are less than yours and this allows them to beat you on pricing, you are in trouble.  Most of the software in use in the world right now is old, clunky, out-dated, built on aging, poorly architected infrastructure.  For the visionary CEO, this presents an unparalleled opportunity; and for the luddite this is an existential threat.  It’s likely that a full shift to Cloud will take decades, but it will impact everyone.  If you haven’t looked at how your company’s and industry’s software will be impacted - it’s high time to elevate it in your priority list.  The Cloud is coming for all of us.

May 08 2020
xjm
May 08

In order to best resolve some packaging, dependency, and upgrade path issues that have come to our attention in the past week, we're extending the release windows for the following releases to the week of May 11:

  • 8.8.6 (final normal bugfix release of 8.8, which has security coverage afterward until December 2020)
  • 8.9.0-rc1
  • 9.0.0-rc1

The scheduled release date for 9.0.0 and 8.9.0 remains June 3. We will share another announcement with the community once 9.0.0-rc1 is available for testing.

May 08 2020
May 08

Announcing Our New Training Workshops

Mediacurrent training logo

Here at Mediacurrent, we’re excited to introduce live, online training series. These full-day training sessions will demonstrate how to plan, build, style, and integrate components with Drupal 8. These are hands-on workshops where you will be able to follow along with predefined exercises for a better learning experience.

The Power of Components

We chose to focus our first workshop events on a theming approach that’s been successful for Mediacurrent— and our clients. Contrary to traditional top-to-bottom theming, the component-based approach enables us to build Drupal websites, or any type of website for that matter, by breaking down the UI into self-contained, reusable parts. This presents many advantages over traditional development, delivering robust, scalable, and flexible components that promote reusability and code efficiency.

Workshop attendees can expect to leave these sessions with the tools and knowledge to work on Drupal 8 websites and will be prepared for building great Drupal 9 websites using this revolutionary approach.

Youur Training Lead 

Lead trainer Mario Hernandez is a regular speaker and trainer at tech conferences with over ten years of experience as a Front End Developer. His credentials include conducting a series of in-person component-based development training workshops at DrupalCons throughout America and Europe in addition to a recently published ebook: Component-Based Theming for Drupal 8 & 9.

Mario’s personal philosophy as a trainer is to be accessible and available to all students before, during, and after the workshop. To maximize time, attendees will receive detailed instructions on how to set up their training environment.  This ensures our time during training is used to learn about the topic at hand vs. fixing technical issues.  All students will get copies of the training recordings and full access to the training curriculum in an online form.  Our curriculums are constantly being updated and these updates will automatically be available to students at no additional cost.  Finally, all students will get a copy of our latest eBook on Component-based Theming for Drupal 8 & 9.

Ready to get started? 

Visit our registration page to learn more about the course topics and purchase tickets for the Drupal 8 Component-Based Theming & Design virtual training workshop

Mediacurrent blog readers can save 20% by registering with the promo code mctraining20 by Friday, May 15. We hope to see you there!

May 08 2020
May 08

As many of us in the Drupal community are entering the second month of physical and social distancing, it is important to take a break from our - often repetitive - day-to-day activities to spend some time on self-care. This not only helps ourselves, but also those around us. With this in mind, the CWG’s Community Health Team has compiled a list of activities that can help all of us cope with everyday stresses a little better.

The team has prepared a presentation with some strategies to support our wellbeing during this challenging time.  Join us on May 22 for a Wellbeing Hour with Dr. Michelle Drapkin, the newest member of our Community Health Team.

Take a break from the digital world

Breathe. Go outside, sit at the window, stand on your balcony. Break up your day. Fresh air and sunshine can help you to recharge and be more focused when you return to the computer. Exercise can help reduce anxiety and tension, improve mental outlook, and create some mental peace. 

Keep Learning

Use this time to hone your skills. Take some classes, attend meetups, and other virtual events. Many companies and organizations have lowered the cost of their classes or established curriculums that can be accessed at a lowered cost or for free.

Exercise Caution Online

Equipping ourselves with accurate information can go a long way in keeping our anxiety levels low. Be sure to get information from trusted, reliable outlets that back up analysis with data that’s been vetted or verified by official sources. Social media can be a wealth of misinformation, and it’s important to validate what you see online before acting on it or sharing it with others.

Give Back

Giving back has many benefits, but first and foremost it feels good. Not only does giving back make an impact, but it also builds and makes our community stronger, and makes our projects better and more complete. When we mentor, share our expertise, we not only build other’s skills, but we also sharpen our own. By being leaders, we add to our street cred and contribute to our professional growth and development

Take it Easy On Yourself

It’s perfectly okay not to hold yourself to your usual standards of productivity right now. Balancing personal and professional life is harder than usual right now, and many of us are working in environments that are full of distractions. Communicate with your colleagues, let them know how you’re doing, and make arrangements to adjust your working hours and expectations as needed so that you can be your best self both personally and professionally.

Ask for help

You are not alone in needing some additional support, and there is never shame in asking for help. Stress is affecting our sleeping and eating patterns, our work habits, the ways we are interacting with those closest to us.

Call your local public health department or insurance company for resources. While going to an in-person appointment may not be possible, many therapists and counselors offer on-line or telehealth services.

Resources

News

Mental Health Call Centers

  • Disaster Distress Helpline, call 1-800-985-5990, or text TalkWithUs to 66746
  • National Domestic Violence Hotline, call 1-800-799-7233 and TTY 1-800-787-3224
  • We are looking for suggestions for non-US-based mental health resources to include here.

Giving back to Drupal

Drupal Events

May 07 2020
May 07

Today's guest post by Matt Westgate, CEO of Lullabot, is the next installment in our #DrupalCares series. My thanks to Matt and the Lullabots for sharing what the Drupal Association means to them.

It’s hard to believe that a little over a month ago, we were in DrupalCon planning mode. No one expected the Drupal community’s biggest event to come to a halt any more than we anticipated our lives totally changing due to a pandemic. While we’re all dealing with this new, and hopefully very temporary, normal, it’s more important than ever to keep things moving forward personally and professionally.

When it was clear that DrupalCon would most likely not happen this year, we decided to pledge our sponsorship dollars to the Drupal Association regardless of whether or not DrupalCon ended up taking place. We’ve been part of the Drupal community since the dawn of IRC, and many of our team members actively contribute to Drupal. We understood the financial hit that would occur by not having DrupalCon and because the Drupal Association has played such an important role in our business and the community, the decision seemed like a no-brainer. Let’s face it; the Drupal Association is the hub for Drupal success.

The Drupal Association is the conduit through which everyone on my team can contribute back to Drupal. They exist so we all can participate and receive the benefits of the community and the software. Simply put, there isn’t a Drupal without them."
Matt Westgate, co-founder and CEO of Lullabot

It’s been incredibly inspiring to see so many of our fellow sponsors step forward as well. No doubt, we’re all in this together.But, there’s still more work to do. In order to continue project velocity, ensuring that we have adequate tooling, marketing Drupal, and many other activities that the Drupal Association helms, they needed to raise $500,000. Raising this amount is no easy feat, but we are almost there. We are committed to supporting this endeavor and hope you will be too.

[Editor's note: As of publication the #DrupalCares campaign is 96% to goal!]

Lullabot Contributor Stories

Olivero Theme: Mike Herchel, Senior Front-end Developer & Putra Bonaccorsi, Technical Project Manager

The idea for the new front-end of Drupal 9 (Olivero) would not have happened without the Drupal Association. We serendipitously met up with Lauri Eskoka and Angie Byron at DrupalCon Seattle (which is put on by the Drupal Association), which led to the creation of the initiative.

Furthermore, the majority of Olivero’s development has taken place on Drupal.org, which is maintained by the Drupal Association. Without this tooling, development would be disparate and communication with the Drupal community (which is vital for this project) would be ineffective. 

We were able to pitch our ideas for the redesign and development of a theme that could ship with the release of Drupal 9 by submitting our proposal to the Drupal Association's “idea issue” queue. This ideas queue section of Drupal.org let us propose ideas for Drupal core and got them through validation and planning phases, which are a big part of the success of the Olivero project.

API-First Initiative: Mateu Aguiló Bosch, Senior Developer

The API-First initiative has been very thorough with automated testing. We have created comprehensive test coverage for all sorts of actions on all of the entity types defined in Drupal core. This allowed us to add features more soundly and eventually include JSON:API in core. The whole initiative would have been negatively impacted without the testing infrastructure provided by the Drupal Association to execute the tests and provide feedback in the issue queue.

Admin UI & JavaScript Modernization Initiative: Cristina Chumillas, Front-end Developer & Sally Young, Senior Technical Architect

The Admin UI & JavaScript Modernization Initiative idea started and evolved through several DrupalCons organized by the Drupal Association, where most of the main contributors were present. Also, drupal.org has been a key tool to move forward: the kick-off ideas issue queue was key, and Claro saw a huge increase in contributions when it moved to drupal.org. Using known tools by the community and the drupal.org credit system helped increase the project’s visibility.

Something else that made a huge difference on the design side was having the Drupal Association, especially Megan Sanicki, as the Drupal Association Director at that time, backing the design team as a legitimate group of the Drupal project to get free access to Figma. This online and real-time design tool has been a key factor allowing designers to be distributed across the world and timezones.

Join us in supporting the Drupal Association

May 06 2020
May 06

Drupal 9 is going to be the easiest major version upgrade in a decade. With the release of Drupal 9, the project has proven its vision of transforming the development process with an emphasis on continuous innovation and a regular update cycle. Over the course of Drupal 8's lifecycle, we've seen this new strategy come to fruition with six-month minor releases including major feature improvements. With Drupal 9's release, we prove that major version upgrades are easier than ever before. 

D8 to What?

For the last 5 years, Drupal 8 has used its own dedicated drop logo, and as the release comes closer and closer, it's only become more important that we update the brand to help unify Drupal's identity across the ecosystem.

With Drupal 9's release less than 30 days away, we're confident that we've achieved the easy upgrade goal, and we are doubling down on that success with the new Drupal brand.

The new brand represents the fluidity and modularity of Drupal, and our community value of coming together to create a greater whole. The new logo can be used by itself, or alongside the Drupal wordmark.

This new design was chosen for its ability to represent Drupal not just at a single moment in time (for a single major release), but onward into the future. We expect to continue using this new iteration of the Drupal drop for the Drupal 9 lifecycle, through Drupal 10, and beyond.

While this continuity is the central element of this new design, there is sometimes a need to represent a specific version of Drupal. That could be for celebrating a particular release, or highlighting new features in a minor version. For that reason, the new Drupal drop may also be used with a version number at its side. 

Drupal Drop Stand Alone        Drupal Drop + Wordmark - Vertical        Drupal Drop + Version

How did we arrive at this new design?

Late last year the Drupal Association put together a request for proposals for design firms to help us develop the evergreen brand for Drupal. All of the responses we received were excellent, reflecting the incredible passion and pride in their work of the design firms that work in the Drupal space. Ultimately, we selected SixEleven who had previously helped us design the brand for DrupalCon.

Thank you, Sixeleven

We brought together a team of people to navigate this process. Dries Buytaert as project founder was joined by Drupal Association staff members Heather Rocker, Carrie Lacina, and myself, board members Audra Martin-Merrick and Suzanne Dergacheva, and longtime community leaders Angie Byron and Gábor Hojtsy.

SixEleven provided a series of initial design concepts which were reviewed by this team, each providing a different take on the classic Drupal brand. How would we emphasize human contribution? Drupal's evolutionary path? Continual innovation and growth?

Eventually we realized that we'd addressed these questions before. When working on the DrupalCon brand several years earlier we created an inner drop that represented all of these ideas, while still remaining classically and recognizably Drupal.

As many design undertakes often do, our vision suddenly came together - each drop falling into place to create the new brand. 

Brand Consistency 

When the inner drop design from the DrupalCon brand became a front-runner for the Drupal brand itself, we realized there was an important opportunity to create consistency across all of the Drupal brands.
Drupal Association         DrupalCon

As such, we've updated the Drupal Association brand as well, to use the new inner drop surrounded by our simple blue circle, representing all of the ways that the Association surrounds and supports the Drupal project. The DrupalCon brand will continue to use the drop on a colorful field of triangles, representing the diverse voices and communities we bring together with the event. 

What about the Druplicon?

The beloved community mascot hasn't gone anywhere. The new branding simply replaces the Drupal 8-specific logo that was in use for the past 5 years during Drupal 8's life cycle; it does not replace the Druplicon. The Druplicon still exists as an emblem of the Drupal Community and a mascot to be remixed and reused by local community organizations, as it has been throughout Drupal's history.

Here are just a few examples from https://www.druplicon.org/ 

Druplicon    Druplicon Remixes

Spreading the word

In the coming weeks, we'll be updating materials across Drupal.org to reflect the updated brand. We encourage you to update your own materials using the resources and brand guidelines we have made available.

We'd like to see all of the organizations that provide Drupal services, or that create software that integrates with Drupal, adopting the new brand in their own materials as well. Consistent use of the Drupal brand across the ecosystem helps us achieve the goal of creating more market recognition of the brand. Together we can spread the message of what Drupal has become. 

Download the new brand kit

May 06 2020
May 06

Drupal 8 to 9 Upgrade

With Drupal 9 just around the corner, there's more and more buzz about preparing for the upgrade. From a project planning perspective, what do organizations need to consider when planning for the Drupal 9 upgrade? Developers may be wondering about the technical details; how to upgrade to Drupal 9. We’ve discussed who should upgrade to Drupal 9 and when to upgrade to Drupal 9. Here’s how to do it.

Drupal 9 Upgrade Project Planning

Plan a release window

Drupal 9 is currently slated for release in June 2020. However, Drupal 8.9.x is scheduled to reach end-of-life in November 2021, with older versions, such as 8.7.x slated to stop receiving security support in June 2020. You first need to plan a release window to upgrade to Drupal 8.9.x during this timeframe to make sure your site is upgraded before the older Drupal versions are no longer supported. Once on Drupal 8.9, you can perform and release all the preparatory work described below. After that, you’ll be ready to plan a release window for the final upgrade to Drupal 9. 

For more on planning a release window, check out Drupal 8 Release Planning in the Enterprise. Remember to factor in other development work, updates for the rest of your stack, and other ongoing development projects, and give yourself plenty of time to complete the work.

Scope the upgrade project

To scope the upgrade project, you'll need to consider a handful of factors:

  • Deprecated code that must be updated
  • Other development work that you'll do as part of the upgrade project

We'll dive deeper into how to check for and correct deprecated code and APIs shortly, but first, let's take a look at other development work you might do as part of the upgrade project.

Solicit feature requests from stakeholders

Does your website deliver stakeholder-required features using contributed modules that haven't yet been updated for Drupal 9? Do your key stakeholders want new features to better serve site users, or meet business objectives? 

For many organizations, major Drupal replatforming efforts have provided a cadence for other website development work, including new feature development. If it's been a while since your organization checked in with stakeholders, now might be a good time to do that. 

Regardless of whether or not you plan to deliver new feature development in the Drupal 9 upgrade project, it's a good idea to make sure you won't lose Drupal 8 contributed modules that provide the functionality your stakeholders can't live without - unless you've got a new way to deliver that functionality in Drupal 9.

Architecture, content, accessibility audits and more

For sites that are already on Drupal 8, the Drupal 9 upgrade is different than many previous major version updates; Drupal 8 to Drupal 9 does not require a content migration, so there's no real need to do a major information architecture audit and overhaul. In this new world, organizations should look at shifting the site redesign and content architecture cadence to an ongoing, iterative model.

How to Prepare for Drupal 9

Upgrade to Drupal 8.8 or Drupal 8.9

If you haven't already updated your Drupal 8 site to the most recent version of Drupal 8.8.x or 8.9.x, that's where you must start. Drupal 8.8 is a big milestone for API compatibility; it's the first release with an API that's fully compatible with Drupal 9. Practically speaking, this means that contributed modules released prior to 8.8 may not be compatible with Drupal 9.

Beyond API compatibility, Drupal 8.8 and 8.9 introduce further bugfixes, as well as database optimizations, to prepare for Drupal 9. If you upgrade your website and all contributed modules and themes to versions that are compatible with 8.9, those parts of your site should be ready for Drupal 9. 

Platform requirements 

One change between Drupal 8 and Drupal 9 is that Drupal 9 requires a minimum of PHP 7.3. Drupal 8 recommends but does not require 7.3. There are new minimum requirements for MYSQL and MariaDB and other databases. And your Drush version, if you use Drush, must be Drush 10. If you need to update any of these, you should be able to do it while still on Drupal 8, if you like. There may be other changes to the Drupal 9 requirements in the future, so double-check the environment requirements.

Audit for conflicting dependencies

Composer manages third-party dependency updates and will update Drupal dependencies when you do Composer updates. However, if anything else in your stack, such as contributed modules or custom code, has conflicting dependencies, you could run into issues after you update. For this reason, you should check your code for any third-party dependency that conflicts with the core dependencies. 

For example, Drupal 9 core requires Symfony 4.4, while Drupal 8 worked with Symfony 3.4. If you have contributed modules or custom code that depends on Symfony 3.4, you'll need to resolve those conflicts before you update to Drupal 9. If your code works with either version, you can update yourcomposer.json to indicate that either version works. For instance, the following code in your module’s composer.json indicates that your code will work with either the 3.4 or 4.4 version of Symfony Console. This makes it compatible with both Drupal 8 and Drupal 9 and any other libraries that require either of these Symfony versions.

{
  "require": {
    "symfony/console": "~3.4.0 || ^4.4"
  }
}

If you have code or contributed modules that require incompatible versions of third party libraries and won’t work with the ones used in Drupal 9, you’ll have to find some way to remove those dependencies. That may mean rewriting custom code, helping your contributed modules rewrite their code, or finding alternative solutions that don’t have these problems.

Check for deprecated code

Sites that are already on Drupal 8 can see deprecated code using a few different tools:

  • IDEs or code editors that understand `@deprecated` annotations;
  • Running Drupal Check,  PhpStan Drupal, or Drupal Quality Checker from the command line or as part of a continuous integration system to check for deprecations and bugs;
  • Installing the Drupal 8 branch of the Upgrade Status module to get Drupal Check functionality, plus additional scanning;
  • Configuring your test suite to fail when it tries to execute a method that calls a deprecated code path.

See Hawkeye Tenderwolf’s article How to Enforce Drupal Coding Standards via Git for more ideas. That article explains how Lullabot uses GrumPHP and Drupal Quality Checker to monitor code on some of our client and internal sites.  

Many organizations already have solutions to check for deprecated code built into their workflow. Some organizations do this as part of testing, while others do it as part of a CI workflow. In the modern software development world, these tools are key components of developing and maintaining complex codebases.

While you can do this check in any version of Drupal 8, you’ll need to do a final pass once you upgrade any older Drupal 8 version to Drupal 8.8, because new deprecations have been identified in every release up to Drupal 8.8.

Refactor, update and remove deprecated code

If you find that your site contains deprecated code, there are a few avenues to fix it prior to upgrading to Drupal 9. Some of those tools include:

Flag modules as Drupal 9 compatible

Once you’ve removed deprecated code from your custom modules, flag them as being compatible with both Drupal 8 and Drupal 9, by adding the following line to your module’s info.yml file.

core_version_requirement: ^8 || ^9

What about contributed modules?

If you're using contributed modules that are deprecated, work with module maintainers to offer help when possible to ensure that updates will happen. You can find Drupal 9 compatible modules, check reports in the drupal.org issue queue for Drupal 9 compatibility or by checking Drupal 9 Deprecation Status.

You should update all contributed modules to a Drupal 9-compatible version while your site is still on Drupal 8. Do this before attempting an upgrade to Drupal 9!

Update to Drupal 9

One interesting aspect of the Drupal 9 upgrade is that you should be able to do all the preparatory work while you’re still on Drupal 8.8+. Find and remove deprecated code, update all your contributed modules to D9-compatible versions, etc. Once that is done, updating to Drupal 9 is simple:

  1. Update the core codebase to Drupal 9.
  2. Run update.php.

Drupal 9.x+

The Drupal Association has announced its intent to provide minor release updates every six months. Assuming Drupal 9.0 releases successfully in June 2020, the Drupal 9.1 update is planned for December 2020, with 9.2 to follow in June 2021.

To make Drupal 9.0 as stable as possible, no new features are planned for Drupal 9.0. The minor updates every six months may introduce new features and code deprecations, similar to the Drupal 8 release cycle. With this planned release cycle, there is no benefit to waiting for Drupal 9.x releases to upgrade to Drupal 9; Drupal 9.0 should be as stable and mature as Drupal 8.9.

Other resources

May 06 2020
bgm
May 06

As of CiviCRM 5.25, the minimum required PHP version is version 7.1, with PHP 7.3 being the recommended version. Since Drupal 6 does not support PHP 7.1 (except LTS vendors, such as myDropWizard), and since there are very few active CiviCRM sites on Drupal 6, we have decided to officially stop supporting Drupal 6.

We strongly encourage Drupal 6 users to upgrade to a supported content management system (CMS), such as Drupal 7, Drupal 8, Backdrop or WordPress. Depending on how much of the content management integration is used, it can be as simple as installing a new CMS, then re-importing the CiviCRM database in that site. For more information, see the switching CMS platform documentation.

If you need a hand, you can find a CiviCRM expert on our partner and contributor listing.

Are you still on Drupal 6? Have you upgraded recently? We would love to hear from you. Please leave a comment!

May 06 2020
May 06

In recent years, it seems as if open source has taken the software world by storm. Nonetheless, many enterprise organizations remain hesitant to adopt open-source technologies, whether due to vendor lock-in or a preference for proprietary solutions. But open source can in fact yield substantial fruit when it comes to advancing your business in today’s highly competitive landscape. By leveraging and contributing back to open source, you can distinguish your business with open source as a competitive advantage.

A few years back, Michael Meyers (Managing Director at Tag1 Consulting) presented a keynote at Texas Camp 2016 about the individual and business benefits of open source. As part of that talk, he highlighted some of the best motivations for open-source adoption and the outsized benefits that open source delivers to not only individual developers but also businesses that are seeking to get ahead in recruiting, sales, and other areas. In this two-part blog series (read the first part), we analyze the positive effects of open source on everyone from individual developers to the biggest enterprises in the world, all of whom are benefitting from their adoption of open-source software.

In this second installment, we dive into some of the ways in which open-source technologies like Drupal can improve your bottom line, with the help of a hypothetical tale of two companies and real-world case studies that demonstrate that open source presents much more rewards than risks in the context of enterprise.

A tale of two enterprises

As I wrote in the previous installment in this two-part series, individuals who participate in and contribute to Drupal garner immense benefits from open-source communities. And organizations can leverage these benefits as well for themselves by encouraging their employees to attend open-source conferences and grow their expertise and knowledge.

Let’s consider a hypothetical scenario in which two enterprise organizations are attempting to outcompete others in their space. The two protagonists of our vignette are DIY Corporation (whose slogan is “reinventing the wheel since forever”), and their corporate headquarters is located in the silos next to a nearby waterfall. Collab Incorporated is the other main character in this story, and they focus on working with others.

Writing custom code vs. leveraging open source

In this hypothetical scenario, DIY Corporation downloads Drupal, one of the most commonly used open-source content management systems (CMS) in the world. However, it soon discovers that it needs to extend existing functionality to solve problems unique to its business requirements. DIY Corporation chooses to write code to solve the problem rather than leveraging others’ code, something that is a common event among organizations that are unaccustomed to open-source software. Writing code makes perfect sense, as the business needs are resolved, but the challenge is when developers leave and additional support is required. When DIY Corporation gets stuck, they have no one to turn to, because their code is located in a private repository.

Meanwhile, Collab Inc. first checks to see if there is a solution available that has already been committed to the open-source ecosystem in the form of a Drupal module or experimental sandbox project. The key distinction here is that if there is no solution already available, Collab Inc. can decide only then to write a solution—and they choose to do so in public rather than in a silo. Too often, Drupal companies download software and write code in isolation rather than contributing that code back. If every organization opts to do this, then we negate the value of the open-source community in the first place.

A real-world example: Fivestar module

The key lesson from this hypothetical scenario is that sharing code from the beginning translates into better results for everyone across the board. By being open to contributions and ideas from others, we can resolve shared problems when we hit a wall. After all, other organizations will have a vested interest in your contributed code, because they are dependent on it and appreciative of the outcomes they have been able to achieve as a result.

A real-world example of this situation is Drupal’s Fivestar module, which ironically does exactly what it says it does. Originally developed by Lullabot for Sony BMG, which needed to provide ratings on pages associated with the label’s musicians, it has quickly found ubiquity across a variety of businesses leveraging Drupal. After the Fivestar module was released, Warner Music Group also contributed to the module’s codebase by upgrading it to Drupal 6 from Drupal 5. This illustrates an increasingly rare scenario in the hyper-competitive music landscape: two competitors helping each other for better results all around.

Thanks to Warner Music Group’s contributions, when Sony BMG finally needed to update all of their artist websites to Drupal 6, they simply employed the existing Drupal 6 module. Because of this strategic alliance, even as direct competitors, Sony BMG and Warner Music Group recognized that they were not competitors in the technology space—only in the music space—and worked together to realize mutual benefits. In the end, technology is a commodity, and every dime spent on additional code is not in each organization’s best interest. Their five-star rating systems are not a differentiator; instead of building separate code in that arena, they can focus on creating good music.

Recruiting talent in open source

Consider another scenario. Organizations are always looking to recruit the best talent, particularly in the Drupal ecosystem. Our hypothetical DIY Corporation posts to a job board; they release information about their opening and wonder why their recruiting pipeline is running dry, especially if they are not a well-known household name. However, because DIY Corporation has not focused on recruiting open-source developers in an open-source community, they have not attracted the interest they desire.

This brings us to a crucial point: Locking up your code guarantees a disincentive for people to work with you as an employee. Developers who wish to grow their careers are willing to work with employers who have a vested interest in their growth as well. If an employer does not grant the necessary opportunities to engage with open-source communities, this results in a lack of opportunities. Thanks to open source, organizations can develop a bench of people who may be interested in the future, thus expanding their recruiting pipelines.

The competitive advantage of open source

The benefits and advantages conferred by Drupal cannot be overstated. While the most overt benefit is Drupal’s cost-effectiveness, the more subtle—and perhaps realer—benefit is that you can participate in a global community with common methodologies and best practices that expand your sphere of knowledge and influence. Open source has been proven time and time again to be better, faster, and cheaper.

For agencies interested in getting involved in open source, there are huge opportunities. For instance, if a customer is looking to hire a consultancy to solve a particular problem, they have a clear choice between an agency that simply uses Drupal as opposed to one that actively contributes meaningfully to the Drupal community.

Agencies can gain a significant advantage by contributing to open source. Granted, contributing to open source as a small agency can be difficult, and bench time can often be limited for developers not actively working on projects. However, organizations that do get involved and publicize their open-source contributions tend to get meaningfully more business as a result. For instance, prominent companies in the Drupal landscape such as Amazee Labs, Phase2, Chapter Three, and others with full-time Drupal contributors often have customers reaching out directly precisely because of their commitment to open source.

Conclusion

Getting involved in open source can yield substantial dividends for those who engage in it. Though there are thousands upon thousands of open-source projects in the wild that you can get involved in, Drupal in particular has a highly well-developed ecosystem for organizations to get involved in open-source contribution, including user groups and Drupal conferences around the world that are looking for sponsors interested in supporting open source. As a case in point, I organize a non-profit open-source conference in New York City called Decoupled Days, about decoupled Drupal (also the subject of my book), and we’re currently looking for more sponsors!

For businesses interested in contributing to open source, there are also business summits and events, such as Drupal Business Days, that can help you connect with other organizations exploring open-source software like Drupal. And there’s no need to be a developer to contribute to open source. In fact, among the most critical needs the Drupal community perpetually has are marketing and event support. That brings us to perhaps the most important message of open-source contributions: You, too, can contribute.

Special thanks to Michael Meyers for his feedback during the writing process.

Photo by Vincent van Zalinge on Unsplash

May 05 2020
May 05

Hands-On Machine Learning With PHP, Part Two

By Liam Wiltshire

Last month, we looked at how we can take our data and, using machine learning, categorize the data by groupings we’d already decided upon—spam, ham, fraudulent, good, etc. This usage is a great way to start, but you might quickly find you want to take things further. Perhaps this means analyzing the data differently, to come up with new relationships you hadn’t previously considered, or maybe you want to improve the accuracy of your results by avoiding some common pitfalls in machine learning. These are the questions we are addressing today, starting with a different approach to machine learning—unsupervised learning.

Decoupling Drupal From Its Frontend System to Use in an Existing Website

By Jack D. Polifka

The ability to create and publish content in real-time without knowing HTML or the ability to program is a common feature of many websites. This capability allows individuals to produce web content regardless of their technical ability. Producing web content is a common feature of many content management systems (CMS). Some websites don’t allow direct creation and publication of content, so a possible solution to address this shortcoming is integrating a CMS into these websites. This article describes how Drupal, a CMS, was added to an existing Symfony website to allow users to publish content in real-time. Implementation details about integrating Drupal into the existing website using Headless Drupal are shared.

Passwordless Authentication

By Brian Reterrer

Passwords are part of our everyday life. You may not even think about them most of the time, that is until you forget one. What if you never had to use a password again? What if I told you it was more secure not to have a password? Would you believe me? Find out why companies are ditching passwords and moving towards multi-factor authentication.

PHP Puzzles: Factorials

By Sherri Wheeler

Each installment of PHP Puzzles presents a small coding exercise typical of those we might encounter in a job interview, or on a coding challenge website. In the following month, we’ll look at a couple of possible solutions for today’s puzzle. Perhaps one of the most common coding puzzles, I recall this one from high school computer class&msdash;calculating a factorial.

Education Station: Anatomy of a Web Response

By Chris Tankersley

Last month, we looked at HTTP requests and how a user agent asks for a specific resource. How do we provide an answer? Web servers send it back in an HTTP response. Let’s look at the parts of a response, how to indicate success or failure, and how to build the response body.

The Workshop: Specification BDD with Phpspec

By Joe Ferguson

phpspec is a package which allows us to use Behavior-Driven Development, BDD, which comes from Test-Driven Development, TDD. When applying BDD, we write our tests first and then only enough code to pass our tests and then refactor and verify the tests still pass exactly as we would with TDD. This cycle continues and is often referred to as red-green development of writing tests that fail and enough code to make them pass, then restarting the process.

History and Computing: Transcontinental Railroad

By Edward Barnard

We’re looking at the background behind the U.S. Department of Justice plan to consider antitrust action against the giants of high tech. We’ll see how ocean transportation gave way to transcontinental transportation. That’s the background we’ll need for seeing how transcontinental transportation became the antitrust action that’s setting a precedent for big tech.

Security Corner: Request Replay Protection

By Eric Mann

One of the most overused terms of security is “token.” It’s used in many different, often unrelated contexts to mean very different things. This month we’re going to discuss one form of tokens—replay prevention nonces—and how to use them.

By Eric Van Johnson

This month, we revisit our Canadian friends, this time we travel north of Toronto, Canada, to the York Region of Canada and the You Region PHP User Group.

finally{}: What’s in PHP Eight?

By Eli White

While much of the world shuts down, the PHP core developers have been hard at work preparing for the release of PHP 8.0 at the end of this year! The feature freeze is in just a few months (July 28th), so this is the exciting time when there is a push to get various features into this momentous release! Let’s take a look at a few of the bigger things currently planned for PHP 8.0.

May 05 2020
May 05
Start:  2020-05-21 23:30 - 2020-05-24 03:30 UTC Organizers:  Gábor Hojtsy Event type:  Sprint

Join the Drupal Community in this worldwide event focusing on Drupal 9 stability and adoption across contributed projects. Over 1600 projects are already Drupal 9 compatible a month before Drupal 9's release which is unprecedented. However, there are still thousands that only need very small changes and a release made.

The first Drupal 9 Porting Day was on April 28, 2020, led by Gábor Hojtsy, Lee Rowlands, Vladimir Roudakov, QED42, Srijan, Adam Bergstein and Mike Lutz. Altogether 126 issues were worked on that resulted in 89 newly Drupal 9 compatible releases on that day and the following two days. It was not only successful but we had a lot of fun too. So we are of course here to do another one this month!

Dates

Drupal 9 Porting Weekend is on May 22-23, 2020. Friday, May 22 would have been contribution day at DrupalCon Minneapolis. We picked the dates in honour of the cancelled event.

Mentors / leaders needed worldwide

The following great people signed up so far to lead in their own timezones:

Friday leaders:

Saturday leaders:

We are looking for more leaders at various time zones to help mentor people working in that timezone. Spreading the effort to more people would help everyone's questions be answered. Contact Gábor Hojtsy if you are interested to be a mentor / leader in your timezone and we'll add you here. We are looking to cover as many time zones as possible.

How to participate

Anyone can help!

  • Let's meet online in the #d9readiness channel on Drupal slack: https://www.drupal.org/slack
  • We'll use slack threads to discuss projects and to help coordinate the work.
  • Do tag issues worked on with "Drupal 9 Porting Weekend" on drupal.org.

Tools that we'll definitely use include:

Check out Kristen Pol's post to prepare at http://www.kristen.org/content/preparing-yourself-drupal-9-porting-weekend or for a more developer focused short summary Tsegaselassie Tadesse's post at https://gist.github.com/tsega/ce47315a053f8453abcd7a289ae03500.

Help get the word out!

Excited about participating? Let your friends and colleagues know! You don't need to be a module maintainer to participate. Tweet and post on other favourite social platforms about Drupal 9 Porting Weekend using #Drupal9Weekend.

Special thanks to @surabhi.gokte and @gambry for their help to get this off the ground.

May 05 2020
May 05

The ability to create and publish content in real-time without knowing HTML or the ability to program is a common feature of many websites. This capability allows individuals to produce web content regardless of their technical ability. Producing web content is a common feature of many content management systems (CMS). Some websites don’t allow direct creation and publication of content, so a possible solution to address this shortcoming is integrating a CMS into these websites. This article describes how Drupal, a CMS, was added to an existing Symfony website to allow users to publish content in real-time. Implementation details about integrating Drupal into the existing website using Headless Drupal are shared.

This article was originally published in the May 2020 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

May 05 2020
May 05

05 May

Nick Veenhof

Open source as a top sport

If Drupal was a sport, the Drupal Association would be the International Olympic Committee (IOC). They don’t practice the sports on their own, they do not vouch for a specific nation, nor do they have a direct financial benefit. Mind you, a non-profit organisation doesn’t mean nobody gets paid. The IOC’s main job is to make sure the Olympic Games happen, and that the infrastructure, the contracts with the countries are set up, that in the end the sports are represented by the best and that fair-play is guaranteed.

The Drupal Association isn’t that different, just replace sports with Drupal. They support the infrastructure needed to make sure that agencies, hosting companies, etc. can all benefit from the Open Source Drupal project with the tools that are more than just source code. Think of events, composer repositories, collaboration tools, sponsorships benefits management, etc.. 

Without such a central component, many companies like Dropsolid wouldn’t be as productive as we are today, nor would we have the power to have such an impact on the world that is in dire need of digital transformation in these times
 

Even the Olympics suffer from COVID-19

Unfortunately, the global pandemic has a severe impact on the Drupal Association with DrupalCon Minneapolis that needed to be postponed. Even though Open Source is crucial for the world at times of crisis, at the same time it's being hit.

"People all over the world can access open source technology to create solutions for crisis communication, remote education, and community cooperation."
- Forbes, Daniel Newman

And that is where we, and maybe also you, stepped in.
 

We play the game, we make it better

Dropsolid is proud of identifying itself as a maker in order to sustain the growth of Open Source. In the last 3 months we were attributed to 61 maker credits on Drupal.org, which places us 32nd worldwide. 

Next to being a maker we also understand that hard cash is needed as an investment for the future. Not only do we consider the money that goes into the Drupal Association as a donation, we see it as a crucial investment, with a return an Open Source Dividend, in the future of Dropsolid. 

“These pivots can only happen in one kind of organisation. Organisations that have embraced digital transformation. These are the organisations that were ready for technology. These are the organisations that looked at a piece of technology and said: this can be used differently. They have the leaders who were ready for change. They have the cultures that were ready to step up. This is what digital transformation for good looks like. “
- Forbes, Daniel Newman

We sponsored Drupalcon Amsterdam 2019 as a Diamond sponsor and have early-on committed to being a Diamond Sponsor of Drupalcon Barcelona 2020, delayed or not. Also several local initiatives such as Drupal Dev Days, Drupaljam or Drupalcamp London. All these sponsorships in the last years amounted to more than 60.000 euro. However, in this difficult time we feel like we need to do more.  

That is why we decided to upgrade our partnership with the Drupal Association to a premium level at the end of March. We are in conversation with the Association about another 11.000 euro support. 

To stay in the game, we all need to play

Like the Olympics couldn't happen without the support of the IOC, we need the Drupal Association to support the global community of Drupal athletes.

We are proud supporters of the community. We hope that you will follow in our footsteps. It’s the right thing to do, and that is what we stand for.

Donate to the Drupal Association

May 05 2020
May 05

A few months ago I helped a client switch over to Zoom for hosting their webinars. As a professional membership association, they needed to limit registrations to members only. They were also interested in streamlining the process of creating and marketing webinars – doing as much as possible in one system with fewer steps. We used Zoom’s API and a new module for Drupal 8 to make it easy: from dynamically publishing members-only webinars to automatically creating recap pages – complete with saved recordings – for each event.

Getting Familiar with the Zoom API

The Zoom API provides a suite of RESTful endpoints for interacting with just about every part of Zoom. Using the API, developers can build rich video conferencing integrations directly into applications.

Learn more about the Zoom API on Zoom’s marketplace website.

Streamlining Members-Only Webinars

For our purposes, we specifically wanted to:

  • Let site admins do everything in one system. When an author creates a new webinar page in Drupal, it should automatically generate a new webinar in Zoom.
  • Limit registration to members only. For this particular client, webinars were one of the benefits of purchasing an association membership. Registrations needed to stay behind a paywall.
  • Cut down on manual work. In the past, site admins would have to manually upload webinar recordings and publish event recaps. We wanted to reduce or eliminate the need for manual work and copy-and-paste.

Drupal 8 + Zoom API

The Zoom API module for Drupal 8 makes Zoom integrations easy for Drupal developers. Here are the basic steps:

  • First, install the Zoom API module. Assuming you’re using composer for your Drupal project, type:
    composer require drupal/zoomapi:^1.0
  • If you haven't already, create a Zoom App (JWT) Be sure to record your API key and secret for later use.
  • Enable the Zoom API Drupal module. With Drush installed, you can simply type:
    drush en zoomapi
  • After enabling the module, set the necessary API credentials in your Drupal website under /admin/config/zoomapi. You’ll need to set up your API key and secret using the required Key module. Storing keys in files outside the webroot or as environment variables is recommended. (Here’s a post by my colleague Edmund about saving sensitive data the right way.)
  • If you’re using the Zoom Event Subscriptions feature (aka webhooks), enable them in your Zoom Application. Copy your Verification Token into the appropriate field at /admin/config/zoomapi. On the Zoom side while managing your app, enter your "Event Notification endpoint URL,” which will always be https://your-domain.com/zoomapi-webhooks (Sidenote: webhooks let you respond to data being pushed out from Zoom. For example, you could trigger an event in your application every time a meeting starts or ends.)
  • Create a custom module for your integration. If you’re using Drupal Console, you can just type drupal generate:module and follow the prompts. There are a number of ways you might want to architect your module.
  • Make a test API call in your custom module:
$client = Drupal::service('zoomapi.client'); 
 
$response = $client->request('GET', '/users');
  • In a custom module, inject the zoomapi.client service or write an EventSubscriber – whichever best meets your needs.

Example Module for Drupal 8

To get started with your own Zoom API integrations in Drupal 8, check out this example module on GitHub. To learn more about the Zoom API Drupal 8 module, checkout the module README. Drop me a line in the comments section if you have questions, or to show off your next great Zoom API integration project!

May 05 2020
May 05

Drupal is one of the largest and most active open-source projects in the world, and the Drupal Association is responsible for enabling it to thrive by creating and maintaining tooling and other projects that keep Drupal humming. Though many in the Drupal community and outside it see the Drupal Association only as the organizer of the global DrupalCon conferences each year, the Drupal Association is, in fact, responsible for some of the most critical elements that sustain Drupal as a software product, including localizations, updates, security advisories, metadata, and infrastructure. All of the "cloud services" that we work with on a daily basis in the Drupal ecosystem represent fundamental functions of the Drupal Association.

In recent years, the Drupal Association has launched several features that reinvent the way developers interact with Drupal as a software system, including DrupalCI (Drupal's test infrastructure), Composer Façade (in order to support Drupal's adoption of Composer), and Drupal's ongoing migration to GitLab for enhanced source control. For many years, Tag1 Consulting has supported and contributed to the Drupal Association not only as a key partner in visible initiatives but also in the lesser-known aspects of the Drupal Association's work that keep Drupal.org and the ecosystem running. Though we've long provided 80 free hours of work a month to the Drupal Association, we're proud to announce we are expanding this commitment by 50% to 120 pro-bono hours per month (75% of an FTE). In addition we have also made a donation toward #DrupalCares' $100,000 goal.

In this special edition of the _Tag1 Team Talks _show, we introduce a miniseries with the engineering team at the Drupal Association, including Tim Lehnen (Chief Technology Officer, Drupal Association) and Narayan Newton (Chief Technology Officer, Tag1), along with Michael Meyers (Managing Editor, Tag1) and Preston So (Editor in Chief at Tag1 and Senior Director, Product Strategy at Oracle). In this first installment, we dive into some of the mission-critical work the Drupal Association performs for the Drupal community with the support of Tag1 and other organizations and how they represent the lifeblood of the Drupal project as well as its continued longevity.

[embedded content]

May 05 2020
May 05

Drupal 8 has thousands of contributed modules meant to make the lives of Content editors easier. The Focal point module in Drupal 8 is one such module that we are focusing on today. 
Content editors spend a big chunk of their time on editing images. Unless they are also experts in Photoshop, cropping and resizing could get messy sometimes. Simply cropping out an image to fit well on the screen might seize the importance out of it. Drupal offers many interactive means to crop and resize images but they don’t provide the flexibility that the Focal Point module offers. The Focal Point module allows for smart cropping while focusing on the important part of the image.

Focal Point Modules

Installation of the module

Step 1: Install the module using the composer. Use the command “composer require drupal/focal_point”.

Step 2: Enable the module.

Installation of the Focal Module

The module can be enabled through front-end or with the help of the composer, which also enables its dependency modules.

Working of Focal Point Module

Step 1: Create Image styles for the image.
Go to the path Configuration-> Media -> Image styles to create your custom image style.

Focal point module

Step 2:  Select the effect to your image style.

Select, Focal Point Scale and Crop option from the drop-down menu.

Focal Point Scale and Crop

Step 3: Give image Height and Width for smart cropping.

After the effect is added to the image style, an option to add the width and height of the image is offered. This is basically the width and the height to which the image should be cropped.

focal point module-height and width

Step 4: Selecting widget type in Manage form display.

After creating the image style, navigate to manage form display of the field, and select “Image (Focal Point)”.

demo focal point module

In the image widget settings, select the custom image style which you have created.

focal point widget settings

Step 5: Selecting image style in format settings of Manage display.

Under manage display, navigate to the format setting of your image field and select the image style which you have created.

Focal-point

After completing all these steps, you will be able to add content to a content type. Once the image is uploaded, a plus(+) mark appears at the center of the image. Also, a preview button will be displayed below the image.

Focal-point

In the above image, you can see the plus symbol, and also the preview button. If you click on preview, you will be redirected to the preview of the cropped image.

Focal-Point

Initially, the original image is  of a bigger size and once the image style is selected, the preview of your image is displayed. You can also change the crop section by moving the plus(+) mark anywhere on the image.

Focal Point

In the above image, I have moved the plus symbol to the right corner, so it crops the left portion of the image.

Focal Point

In the above picture, the left portion of the image is cropped by placing the plus(+) mark on the right of the image. This is how the drupal focal point works. 

May 05 2020
May 05

Businesses are different, and so are their websites. Each of the types of business websites has its own recommended features, specific design tweaks, and more. But there is something that unites them all!

First, regardless of the type, the decision to build a business website in the digital era is extremely beneficial. Next, there is an enterprise-level CMS that is able to meet the needs of all categories of websites. Its name is Drupal.

In this post, discover more about the different types of business websites that can be built with this CMS. If this inspires you for creating a website for your business, never hesitate to hire our Drupal agency, which has affordable web development prices.

Why build a business website?

There are plenty of reasons why your business needs a website, but any doubts about it are melting away with every day of the digital boom.

Even the sad events such as the Covid-19 quarantine add to the increasing speed of digitalization. They show the whole world how important it is to be represented on the Web where plenty of prospective customers are surfing. The online business trends will continue ever after the sad story is over.

Meanwhile, let’s outline a few ways in which you benefit from building a business website:

  • you expand your reach with no geographical boundaries
  • you shape and promote your brand
  • you attract, engage, and convince your customers
  • you deliver your message via the design and content
  • you make your business known through search engines
  • you get to know your customers through marketing tools
  • you are available 24/7
  • you benefit from online sales or other transactions
  • and so much more

Key types of websites to make with Drupal

First of all, we want to emphasize that it’s possible to create a business website of any type with Drupal, with no exceptions. Drupal has a multipurpose, well-picked set of core modules, and any others can be added like pieces in a Lego set.

There are many thousands of contributed modules to extend a website in every area of its work. Finally, Drupal also offers unlimited opportunities for developers in reaching the goals through custom code.

Build an e-commerce business website on Drupal

If you want to build a business site, choose Drupal and you will never regret it. Unlike purely e-commerce platforms with no content management system, Drupal provides exceptional opportunities for content-driven commerce. Drupal has a powerful e-commerce package called Drupal Commerce that is equipped with the coolest features. Integration with any payment gateways, flexible product management, opportunities for ultra-fast shopping carts are just some of the reasons to create an online store with Drupal.

International multi-domain store “JYSK” created by our team:

International multi-domain store “JYSK” on Drupal

Build a real estate business website on Drupal

Here is the next type of business website on our list that pairs perfectly with Drupal. It is clear to see that Drupal is a great choice for real estate websites. They can have attractive property object listings, responsive images that look great on any device, smart filtering and sorting options, integration with any real-estate APIs, payment systems, property management software, granular user roles and permissions, and much more. The popularity is proved by numerous examples of real estate Drupal websites.

Powerful real estate data and analytics platform “Gridics” created by our team:

Powerful real estate data and analytics platform “Gridics”

Build a university website on Drupal

More than 70 percent of top higher-ed websites are built with Drupal. This love is easy to explain. Drupal’s benefits for university websites include robust multisite opportunities for multiple departments, different user roles with flexible permissions (for students, staff, teachers, parents, etc.), multilingual features to attract international students, a mobile-first approach to engage the young audience, and so on. So you can easily build a university, college, school, or other education establishment site with Drupal.

The Maryland Global University website created by our team:

Maryland Global University website on Drupal

Build a fundraising website on Drupal

Next in our collection of different types of business websites are various fundraising and crowdfunding websites that help users raise money for specific purposes. They can be very interesting in terms of their functionality. The most popular features on them include integration with payment providers, flexible payment options, dynamic real-time notifications for users, flexible user management, mobile-first design, social media integration, etc. Drupal is the winner again in all these features!

YaWave crowdfunding platform created by our team:

YaWave crowdfunding platform on Drupal

Build a law firm business website on Drupal

If you want to build a website for your law business, Drupal can make a “lucky union” with i is a great choice. When searching for law firm services, potential customers extensively use search engines and read online content. Thanks to Drupal’s SEO-friendliness and handy content publishing, you will have a change to attract more users. Any third-party integrations, email marketing, user-friendly contact forms, live chats, and anything else a law firm website needs is easy to build.

LSC (Legal Services Corporation) website on Drupal:

LSC (Legal Services Corporation) website on Drupal

Build a healthcare website on Drupal

Businesses that need special responsibility deserve a reliable CMS to build their websites with. Sites of this type need security, granular user permissions and sometimes, two-factor authentication. Interesting features may include online appointment calendars, electronic signature, online messaging, various integrations, and more. Drupal can provide all this and more to healthcare websites.

The AttendingDR doctors’ portal created by our team:

adr

Build a news and media business website on Drupal

Everyone who wants to build a publishing business website should consider Drupal’s benefits for news and media websites. They include easy content editing, the quick edit feature, Media Library, easy media embedding, multilingual capabilities, API integration, mobile-first design, and much more. With every new Drupal version, the focus on smooth and silky editorial experiences increases.

The FoxNews website on Drupal:

The FoxNews website on Drupal

Build a beauty business website on Drupal

What about the most beautiful industry? Of course, you can build a business website for beauty products on Drupal! Attractive presentation of images with image optimization, good filtering and sorting, e-commerce integration, smart search, easy content publishing for various beauty tips, videos, and blogs — these are a few of its great features.

The Lush beauty product website on Drupal:

The Lush beauty product website on Drupal

Build a website for business with the help of our experts!

As you can see, Drupal can build the best “digital home” for your business in any industry. However, this is only possible in professional hands. Combined with our affordable prices, it’s your best option to build a business website.

We will recommend to you the most reasonable implementation of your project in terms of the budget. Our experienced developers can deliver a better value in a limited time. The consultation is totally free, so contact us and let’s discuss how our website development team can help your business take wing!

May 05 2020
May 05

List of Drupal Commerce content entities.

For each entity we will present: the module that provides it, the class that defines it, and the available properties. For each property we will list its name, field type, a description, and a note if the field allows unlimited values (i.e. it has an unlimited cardinality). The list of properties available for a content entity depend on many factors. For example, if the entity is revisionable (e.g. revision_default), translatable (e.g. langcode), or both (e.g. revision_translation_affected). The modules that are enabled on the site can also affect the available properties. For instance, if the “Workspaces” module is installed, it will add a workspace property to many content entities. This reference assumes that Drupal was installed using the standard installation profile and only Drupal Commerce related modules that provide content entities are enabled.

It is worth noting that entity properties are divided in two categories: base field definitions and field storage configurations. Base field configurations will always be available for the entity. On the other hand, the presence of field storage configurations will depend on various factors. For one, they can only be added to fieldable entities. Attaching the fields to the entity can be done manually by the user, by a module, or by an installation profile. Again, this reference assumes that Drupal was installed using the standard installation profile with Drupal Commerce related modules enabled. By default, the commerce_product entity adds a bodyfield. For entities that can have multiple bundles, not all properties provided by the field storage configurations will be available in all bundles. For example, with the standard installation profile all content types will have a body field associated with it, but only the article content type has the field_image, and field_tags fields. If subfields are available for the field type, you can migrate into them.

If you are migrating into Drupal Commerce, make sure to check the Commerce Migrate module. It offers migrate destination field handlers for commerce fields and a plugin for commerce product types. It also provides a migration path from Commerce 1 (Drupal 7), Ubercart, and other e-commerce platforms. It is even possible to import data from other platforms like WooCommerce, Magento, and Shopify via CSV exports.

Store entity

Module: Commerce Store (part of commerce module)
Class: Drupal\commerce_store\Entity\Store

List of base field definitions:

  1. store_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. langcode: (language) Language.
  4. type: (entity_reference to commerce_store_type) Type. The store type.
  5. uid: (entity_reference to user) Owner. The store owner.
  6. name: (string) Name. The store name.
  7. mail: (email) Email. Store email notifications are sent from this address.
  8. default_currency: (entity_reference to commerce_currency) Default currency. The default currency of the store.
  9. timezone: (list_string) Timezone. Used when determining promotion and tax availability.
  10. address: (address) Address. The store address.
  11. billing_countries: (list_string) Supported billing countries. Allows unlimited values.
  12. path: (path) URL alias. The store URL alias.
  13. is_default: (boolean) Default. Whether this is the default store.
  14. default_langcode: (boolean) Default translation. A flag indicating whether this is the default translation.
  15. shipping_countries: (list_string) Supported shipping countries. Allows unlimited values.
  16. prices_include_tax: (boolean) Prices are entered with taxes included.
  17. tax_registrations: (list_string) Tax registrations. The countries where the store is additionally registered to collect taxes. Allows unlimited values.

Product entity

Module: Commerce Product (part of commerce module)
Class: Drupal\commerce_product\Entity\Product

List of base field definitions:

  1. product_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. langcode: (language) Language.
  4. type: (entity_reference to commerce_product_type) Product type.
  5. status: (boolean) Published.
  6. stores: (entity_reference to commerce_store) Stores. The product stores. Allows unlimited values.
  7. uid: (entity_reference to user) Author. The product author.
  8. title: (string) Title. The product title.
  9. variations: (entity_reference to commerce_product_variation) Variations. The product variations. Allows unlimited values.
  10. created: (created) Created. The time when the product was created.
  11. changed: (changed) Changed. The time when the product was last edited.
  12. default_langcode: (boolean) Default translation. A flag indicating whether this is the default translation.

List of field storage configurations:

  1. body: text_with_summary field.

Product variation entity

Module: Commerce Product (part of commerce module)
Class: Drupal\commerce_product\Entity\ProductVariation

List of base field definitions:

  1. variation_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. langcode: (language) Language.
  4. type: (entity_reference to commerce_product_variation_type) Product variation type.
  5. status: (boolean) Published.
  6. uid: (entity_reference to user) Author. The variation author.
  7. product_id: (entity_reference to commerce_product) Product. The parent product.
  8. sku: (string) SKU. The unique, machine-readable identifier for a variation.
  9. title: (string) Title. The variation title.
  10. list_price: (commerce_price) List price. The list price.
  11. price: (commerce_price) Price. The price
  12. created: (created) Created. The time when the variation was created.
  13. changed: (changed) Changed. The time when the variation was last edited.
  14. default_langcode: (boolean) Default translation. A flag indicating whether this is the default translation.

Product attribute value entity

Module: Commerce Product (part of commerce module)
Class: Drupal\commerce_product\Entity\ProductAttributeValue

List of base field definitions:

  1. attribute_value_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. langcode: (language) Language.
  4. attribute: (entity_reference to commerce_product_attribute) Attribute.
  5. name: (string) Name. The attribute value name.
  6. weight: (integer) Weight. The weight of this attribute value in relation to others.
  7. created: (created) Created. The time when the attribute value was created.
  8. changed: (changed) Changed. The time when the attribute value was last edited.
  9. default_langcode: (boolean) Default translation. A flag indicating whether this is the default translation.

Order entity

Module: Commerce Order (part of commerce module)
Class: Drupal\commerce_order\Entity\Order

List of base field definitions:

  1. order_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. type: (entity_reference to commerce_order_type) Order type.
  4. order_number: (string) Order number. The order number displayed to the customer.
  5. store_id: (entity_reference to commerce_store) Store. The store to which the order belongs.
  6. uid: (entity_reference to user) Customer. The customer.
  7. mail: (email) Contact email. The email address associated with the order.
  8. ip_address: (string) IP address. The IP address of the order.
  9. billing_profile: (entity_reference_revisions) Billing information. Billing profile
  10. order_items: (entity_reference to commerce_order_item) Order items. The order items. Allows unlimited values.
  11. adjustments: (commerce_adjustment) Adjustments. Allows unlimited values.
  12. total_price: (commerce_price) Total price. The total price of the order.
  13. total_paid: (commerce_price) Total paid. The total paid price of the order.
  14. state: (state) State. The order state.
  15. data: (map) Data. A serialized array of additional data.
  16. locked: (boolean) Locked.
  17. created: (created) Created. The time when the order was created.
  18. changed: (changed) Changed. The time when the order was last edited.
  19. placed: (timestamp) Placed. The time when the order was placed.
  20. completed: (timestamp) Completed. The time when the order was completed.
  21. cart: (boolean) Cart.
  22. checkout_flow: (entity_reference to commerce_checkout_flow) Checkout flow.
  23. checkout_step: (string) Checkout step.
  24. payment_gateway: (entity_reference to commerce_payment_gateway) Payment gateway. The payment gateway.
  25. payment_method: (entity_reference to commerce_payment_method) Payment method. The payment method.
  26. coupons: (entity_reference to commerce_promotion_coupon) Coupons. Coupons that have been applied to order. Allows unlimited values.

Order item entity

Module: Commerce Order (part of commerce module)
Class: Drupal\commerce_order\Entity\OrderItem

List of base field definitions:

  1. order_item_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. type: (entity_reference to commerce_order_item_type) Order item type.
  4. order_id: (entity_reference to commerce_order) Order. The parent order.
  5. purchased_entity: (entity_reference to node) Purchased entity. The purchased entity.
  6. title: (string) Title. The order item title.
  7. quantity: (decimal) Quantity. The number of purchased units.
  8. unit_price: (commerce_price) Unit price. The price of a single unit.
  9. overridden_unit_price: (boolean) Overridden unit price. Whether the unit price is overridden.
  10. total_price: (commerce_price) Total price. The total price of the order item.
  11. adjustments: (commerce_adjustment) Adjustments. Allows unlimited values.
  12. uses_legacy_adjustments: (boolean) Uses legacy adjustments.
  13. data: (map) Data. A serialized array of additional data.
  14. created: (created) Created. The time when the order item was created.
  15. changed: (changed) Changed. The time when the order item was last edited.

Payment method entity

Module: Commerce Payment (part of commerce module)
Class: Drupal\commerce_payment\Entity\PaymentMethod

List of base field definitions:

  1. method_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. type: (string) Payment method type.
  4. payment_gateway: (entity_reference to commerce_payment_gateway) Payment gateway. The payment gateway.
  5. payment_gateway_mode: (string) Payment gateway mode. The payment gateway mode.
  6. uid: (entity_reference to user) Owner. The payment method owner.
  7. remote_id: (string) Remote ID. The payment method remote ID.
  8. billing_profile: (entity_reference_revisions) Billing profile. Billing profile
  9. reusable: (boolean) Reusable. Whether the payment method is reusable.
  10. is_default: (boolean) Default. Whether this is the user's default payment method.
  11. expires: (timestamp) Expires. The time when the payment method expires. 0 for never.
  12. created: (created) Created. The time when the payment method was created.
  13. changed: (changed) Changed. The time when the payment method was last edited.

Payment entity

Module: Commerce Payment (part of commerce module)
Class: Drupal\commerce_payment\Entity\Payment

List of base field definitions:

  1. payment_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. type: (string) Payment type.
  4. payment_gateway: (entity_reference to commerce_payment_gateway) Payment gateway. The payment gateway.
  5. payment_gateway_mode: (string) Payment gateway mode. The payment gateway mode.
  6. payment_method: (entity_reference to commerce_payment_method) Payment method. The payment method.
  7. order_id: (entity_reference to commerce_order) Order. The parent order.
  8. remote_id: (string) Remote ID. The remote payment ID.
  9. remote_state: (string) Remote State. The remote payment state.
  10. amount: (commerce_price) Amount. The payment amount.
  11. refunded_amount: (commerce_price) Refunded amount. The refunded payment amount.
  12. state: (state) State. The payment state.
  13. authorized: (timestamp) Authorized. The time when the payment was authorized.
  14. expires: (timestamp) Expires. The time when the payment expires. 0 for never.
  15. completed: (timestamp) Completed. The time when the payment was completed.
  16. test: (boolean) Test. Whether this is a test payment.
  17. captured: (timestamp) Captured. The time when the payment was captured.

Module: Commerce Promotion (part of commerce module)
Class: Drupal\commerce_promotion\Entity\Promotion

List of base field definitions:

  1. promotion_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. langcode: (language) Language.
  4. name: (string) Name. The promotion name.
  5. display_name: (string) Display name. If provided, shown on the order instead of "Discount".
  6. description: (string_long) Description. Additional information about the promotion to show to the customer
  7. order_types: (entity_reference to commerce_order_type) Order types. The order types for which the promotion is valid. Allows unlimited values.
  8. stores: (entity_reference to commerce_store) Stores. The stores for which the promotion is valid. Allows unlimited values.
  9. offer: (commerce_plugin_item:commerce_promotion_offer) Offer type.
  10. conditions: (commerce_plugin_item:commerce_condition) Conditions. Allows unlimited values.
  11. condition_operator: (list_string) Condition operator. The condition operator.
  12. coupons: (entity_reference to commerce_promotion_coupon) Coupons. Coupons which allow promotion to be redeemed. Allows unlimited values.
  13. usage_limit: (integer) Usage limit. The maximum number of times the promotion can be used. 0 for unlimited.
  14. start_date: (datetime) Start date. The date the promotion becomes valid.
  15. end_date: (datetime) End date. The date after which the promotion is invalid.
  16. compatibility: (list_string) Compatibility with other promotions.
  17. status: (boolean) Status. Whether the promotion is enabled.
  18. weight: (integer) Weight. The weight of this promotion in relation to others.
  19. default_langcode: (boolean) Default translation. A flag indicating whether this is the default translation.

Module: Commerce Promotion (part of commerce module)
Class: Drupal\commerce_promotion\Entity\Coupon

List of base field definitions:

  1. id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. promotion_id: (entity_reference to commerce_promotion) Promotion. The parent promotion.
  4. code: (string) Coupon code. The unique, machine-readable identifier for a coupon.
  5. usage_limit: (integer) Usage limit. The maximum number of times the coupon can be used. 0 for unlimited.
  6. status: (boolean) Status. Whether the coupon is enabled.

Log entity

Module: Commerce Log (part of commerce module)
Class: Drupal\commerce_log\Entity\Log

List of base field definitions:

  1. log_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. uid: (entity_reference to user) User. The user for the log.
  4. template_id: (string) Log template ID. The log template plugin ID
  5. category_id: (string) Log category ID. The log category plugin ID
  6. source_entity_id: (integer) Source entity ID. The source entity ID
  7. source_entity_type: (string) Source entity type. The source entity type
  8. params: (map) Params. A serialized array of parameters for the log template.
  9. created: (created) Created. The time when the log was created.

Price list entity

Module: Commerce Pricelist
Class: Drupal\commerce_pricelist\Entity\PriceList

List of base field definitions:

  1. id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. type: (string) Price list bundle.
  4. uid: (entity_reference to user) Owner. The user that owns this price list.
  5. name: (string) Name. The name of the price list.
  6. stores: (entity_reference to commerce_store) Stores. The stores for which the price list is valid. Allows unlimited values.
  7. customer: (entity_reference to user) Customer. The customer for which the price list is valid.
  8. customer_roles: (entity_reference to user_role) Customer roles. The customer roles for which the price list is valid. Allows unlimited values.
  9. start_date: (datetime) Start date. The date the price list becomes valid.
  10. end_date: (datetime) End date. The date after which the price list is invalid.
  11. weight: (integer) Weight. The weight of this price list in relation to other price lists.
  12. status: (boolean) Status. Whether the price list is enabled.
  13. changed: (changed) Changed. The time when the price list was last edited.

Price list item entity

Module: Commerce Pricelist
Class: Drupal\commerce_pricelist\Entity\PriceListItem

List of base field definitions:

  1. id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. type: (string) Price list item bundle.
  4. uid: (entity_reference to user) Owner. The user that owns this price list item.
  5. price_list_id: (entity_reference to commerce_pricelist) Price list. The parent price list.
  6. purchasable_entity: (entity_reference to commerce_product_variation) Purchasable entity. The purchasable entity.
  7. quantity: (decimal) Quantity. The quantity tier.
  8. list_price: (commerce_price) List price. The list price.
  9. price: (commerce_price) Price. The price.
  10. status: (boolean) Status. Whether the price list item is enabled.
  11. changed: (changed) Changed. The time when the price list item was last edited.

Shipment entity

Module: Shipping
Class: Drupal\commerce_shipping\Entity\Shipment

List of base field definitions:

  1. shipment_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. type: (entity_reference to commerce_shipment_type) Shipment type.
  4. order_id: (entity_reference to commerce_order) Order. The parent order.
  5. package_type: (string) Package type. The package type.
  6. shipping_method: (entity_reference to commerce_shipping_method) Shipping method. The shipping method
  7. shipping_service: (string) Shipping service. The shipping service.
  8. shipping_profile: (entity_reference_revisions) Shipping information.
  9. title: (string) Title. The shipment title.
  10. items: (commerce_shipment_item) Items. Allows unlimited values.
  11. weight: (physical_measurement) Weight.
  12. original_amount: (commerce_price) Original amount. The original amount.
  13. amount: (commerce_price) Amount. The amount.
  14. adjustments: (commerce_adjustment) Adjustments. Allows unlimited values.
  15. tracking_code: (string) Tracking code. The shipment tracking code.
  16. state: (state) State. The shipment state.
  17. data: (map) Data. A serialized array of additional data.
  18. created: (created) Created. The time when the shipment was created.
  19. changed: (changed) Changed. The time when the shipment was last updated.
  20. shipped: (timestamp) Shipped. The time when the shipment was shipped.

Shipping method entity

Module: Shipping
Class: Drupal\commerce_shipping\Entity\ShippingMethod

List of base field definitions:

  1. shipping_method_id: (integer) ID.
  2. uuid: (uuid) UUID.
  3. langcode: (language) Language.
  4. stores: (entity_reference to commerce_store) Stores. The stores for which the shipping method is valid. Allows unlimited values.
  5. plugin: (commerce_plugin_item:commerce_shipping_method) Plugin.
  6. name: (string) Name. The shipping method name.
  7. conditions: (commerce_plugin_item:commerce_condition) Conditions. Allows unlimited values.
  8. condition_operator: (list_string) Condition operator. The condition operator.
  9. weight: (integer) Weight. The weight of this shipping method in relation to others.
  10. status: (boolean) Enabled. Whether the shipping method is enabled.
  11. default_langcode: (boolean) Default translation. A flag indicating whether this is the default translation.

Available properties for other content entities

This reference includes Drupal Commerce content entities and some provided by related contributed modules. The previous article included a reference for Drupal core content entities. That being said, it would be impractical to cover all contributed modules. To get a list of yourself for other content entities, load the entity_type.manager service and call its getFieldStorageDefinitions() method passing the machine name of the entity as a parameter. Although this reference only covers content entities, the same process can be used for configuration entities.

What did you learn in today’s article? Did you know that there were so many entity properties provided by Drupal Commerce? Were you aware that the list of available properties depend on factors like if the entity is fieldable, translatable, and revisionable? Did you know how to find properties for content entities from contributed modules? Please share your answers in the comments. Also, we would be grateful if you shared this article with your friends and colleagues.

May 04 2020
May 04

Even among teams who are accustomed to working remotely, staying positive and connected can be a challenge when statewide stay-at-home mandates turn lives upside down in a myriad of different ways.

At Promet Source, we took it up a notch this spring, with some new ways to enliven meetings and support each other. The following five initiatives helped us to:

  • Get a glimpse into each others’ lives beyond faces on a Zoom call, 
  • Encourage accountability beyond immediate tasks at hand, and
  • Just make regularly scheduled meetings more fun. 

1. Guess the Workspace

Prior to last month’s all-company meeting, I requested photos of six individual’s workspaces. Near the end of the call, I showed the photos of the workspaces and asked everyone on the call to match the six selected employees to their workspace and submit their votes via the Zoom chat. It was fun to speculate the owner, and in the end we all learned that we know each other better than we thought, because we mostly guessed them right!

Screenshot of employees and their workspaces

2. Meet the Family (Dogs and Children)

We played the above game with pets as well. Better than a picture is seeing them real-time on camera. Recently, I was in a meeting where someone’s baby was connecting with a team member’s dog through the camera. Working around children and dogs is part of this new normal for many of us, and instead of stressing about trying to keep other members of the family quiet and out of the way, we encourage team members to introduce us to current members of their household. Dogs and children bring joy to any meeting. Even if they’re only on camera for a few moments, it brightens everyone’s day!

Screenshot images of four dogs of Promet Source team members

3. Virtual Watercooler Questions

Since we can’t chat by the coffee machine or while sipping a LaCroix, I like to post fun random questions in our Slack Channel. Building rapport through light conversation is a great way to help connect the team with fun facts or experiences that we might have in common. After all, how else are you going to find out that someone else’s first concert was also Cool Kids On The Block?

screen shot from a Slack exchange concerning first album purchases

4. Get Fit Challenge

One of our team members reached out to the group wanting more accountability for his workouts. The cure? He started a “Promet Quarantine Fitness Accountability Challenge.” Participants share their goals and report in every week whether they are meeting them. 

5. Hat-Mandatory Meetings 

Most of us know about being able to change the Zoom background on a call (when settings allow for it), and that can spark some fun conversation. But matching a hat to the background, or simply requiring a hat, can be a fun way to kick off a meeting, and keep us from taking ourselves too seriously.

screenshot of a promet zoom meeting

This is just a glimpse into the many ways that Covid-19 quarantines have have sharpened our commitment at Promet Source to connection and creativity. 

In the meantime, we’re continuing to collaborate with our public sector, higher education, and enterprise clients on the development of amazing websites that redefine possibilities. Interested in what we can do you you? Contact us today.  

May 04 2020
May 04

Collecting rich and structured data

In our API-first and data-driven world, we need to collect rich and structured data. The Webform module for Drupal 8 empowers websites to build any type of form which collects any type of data.

The Webform module supports composites elements, which are multiple inputs working together to collect rich and structured data. Composite elements can collect information, including addresses. Composite elements combined with the Webform module's support for multiple values can collect multiple addresses that are represented using a table where rows can be added or removed. Yet, the Webform module's support for composite elements has some limitations.

Composites the good and the bad

Webform composites are easy to understand, implement, and customize.

The best way to begin using and understanding composites is to build a webform that contains an address element and examine how the address element's data is submitted, stored, and exported. Below is a quick demo of a basic address composite element. If you install and enable the Address module, you can add an 'Advanced address' element to your webforms, which does a great job of managing locality and zip codes.

Composite Address Example

If the default composite elements included in the Webform module do not meet your requirements, you can also create a custom composite in the Webform module's UI or using custom code.

To create a custom composite, add a 'Custom element' to your webform, select the desired elements and voila, you have a custom composite.

Composite Custom Example

An immediate limitation that site builders will notice is the not all webform elements are available via the UI. Also, elements that collect multiple values are not supported. The Webform module stores submission data using an Entity-Attribute-Value (EAV) model, which limits the complexity of what type of data can be collected. Elements that require complex configuration, including entity references, are not supported via UI. Fortunately, developers can create custom composites in code.

Custom composites in code require that a developer defines a Form API composite element plugin and a webform element plugin with a summary template. Because this is a lot to understand, the Webform module includes a working example of custom composite in code. Custom composites in code allow developers to add complex elements with custom conditional logic and validation. All this functionality is encapsulated into a reusable element that can be added to multiple webforms.

Any organization needing to create rich and structured user data across multiple webforms should think about creating a custom composite in code. Learn more about creating a custom composite element by checking out the Webform Example Composite module.

If creating custom composites in code is too arduous, Rich Gerdes (richgerdes) created the Webform Composite Tools module, which provides UI for creating reusable composite elements.

Composites provide the easiest way of collecting rich and structured data. There are some limitations, and the Webform module now provides full support for tables, which offers another way to layout elements and collect rich data.

Tables the good and the bad

Tables provide a completely customizable way to collect information.

Before the Webform module supported composite elements, site builders were able to place elements in a table. A table is just a simple way to layout information using rows and columns to create cells. Any webform elements can be placed within a table cell, and "Yes!" entity references, multiple values, and even composite elements are supported.

The flexibility of building tables does require an understanding of the Drupal's render API. For this reason, support for tables was a hidden feature, but recently several people within the Drupal community began building custom tables within their webforms. I decided it was time to create a user interface for creating tables using the Webform's form builder.

To make it easier to build and maintain a table, all rows and child elements within a table are automatically named and incremented. The first row of a table can be duplicated to create new table rows. This automated naming convention ensures non-technical users can start laying out form elements in a table.

Tables and rows also support conditional logic. Conditional logic can be used to hide/show table rows and mimic how records are added and removed from a webform multiple element.

When to composite vs. when to table

Always start with a composite element and use tables for complex requirements.

Whenever possible, first try using a composite element. Composite elements are easier to manage, and they ensure that structured data is being captured and distributed. If a composite element does not meet your business requirements, it is worth exploring using a table.

The biggest plus and minus to building tables using the Webform module is every element is captured independently. The minus is the only 'data structure' provided by a table, comes from the table element's naming convention. The plus is that any element or conceivable layout can be built using a table. The Webform module sees each table cell as an individual element, which can be completely customized.

Webform Table Example

I feel that 80% percent of complex data form requirements can be addressed using a composite element. For the remaining 20%, building and maintaining a table provides unlimited possibilities that need to be properly planned out and executed.

If you are still not sure when to composite vs. when to table, please watch the video below for a recap of composite elements and tables.

Backing the Webform module

Open Collective is providing us, Drupal, and Open Source, with a platform to experiment and improve Open Source sustainability. If you appreciate and value what you are getting from the Webform module, please consider becoming a backer of the Webform module's Open Collective.

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK

May 04 2020
May 04

I recently wrote about using drupal-check and drupal-rector to assist in upgrading your Drupal 8 code so that it's ready for Drupal 9. And in the comments for that post Gabor mentioned that I should check out the Upgrade Status module. So I spent a little bit of time playing around with it and here are my notes so far.

It's AWESOME, and you should try it. Thank you to everyone that's been working on it.

TL;DR: Upgrade Status generates a report that serves a sort of checklist to help you determine whether or not your site is ready to be upgraded to Drupal 9. It packs a lot of useful information into a single report. And it's worth taking the time to install it on a copy of your Drupal 8 site and seeing what it has to say.

Behind the scenes Upgrade Status performs the following checks, and probably more:

  • Are you using the latest version of the module?
  • PHP code deprecation via drupal-check
  • Check Twig templates for calls to deprecated functions
  • Check {MODULE}.libraries.yml files for deprecated dependencies
  • Analyze hook_theme implementations
  • Verify composer.json and {MODULE}.info.yml files are Drupal 9 compatible
  • Does the Drupal.org project provide a Drupal 9 upgrade roadmap?
  • Probably more...

Then it pulls this all into a nice visual report like the example below, complete with links to both issues and documentation to help you best resolve the issues it finds.

Screenshot of upgrade status report described in detail in this post.

Hosting environment report

The report starts by listing hosting environment compatibility. It's worth noting that you'll probably want to install the module and generate these reports on a non-production environment, and that these indicators are for the current environment. But it does give you an idea of what to look for on your production environment. Namely, are PHP, MariaDB (MySQL), and Apache up-to-date enough to be compatible?

Current requirements (in addition to what's already required for D8) are listed here: Environment requirements of Drupal 9 (drupal.org).

Custom code report

Then there's a section that reports on your custom code. Anything that's in this list is your responsibility to upgrade. So if you're looking for next steps, this is a good place to start. If you click the "X errors, Y warnings" link for any project it'll open a modal window with a detailed report of what needs to be done. And in most cases link you to the relevant change record, or documentation page.

Screenshot of detailed report for Drip module showing a single warning about missing code and a link pointing to where you can find more information.

Contributed projects report

This is followed by a report on all the contributed projects you have enabled. Note that Upgrade Status only scans enabled projects. This list provides the same link to see a detailed report as above, and a bunch of additional information as well. It'll indicate things like:

  • The Available update column will show either Up-to-date or a version number. If there's a version number this means you're currently using an out-of-date version of the project and should upgrade. Note that if this column lists N/A for everything make sure you've got the Update Manager enabled and that it's run a status check recently. If not, you can trigger one manually at Reports > Update status.
  • "Consumers >= 8.x-1.11 is compatible with Drupal 9.": There's a newer version of the module than the one I have installed and it is Drupal 9 ready. Learn how to update a module (or theme)
  • Some modules, like for example Recurly in the example above, provide detailed Drupal 9 roadmaps (Note: maintainers, you can add this via your project page!), that help indicate where things are at.

Try Upgrade Status on your site

Install it (I recommend you do so on a development environment) using Composer:

composer require 'drupal/upgrade_status:^2.0'
drush en upgrade_status -y

The project page mentions the optional Composer deploy, and Git deploy, modules. If you've got projects installed via Composer where the required version is a -dev version (e.g. "drupal/migrate_source_directory": "1.x-dev" or projects that have been added by cloning their Git repository, then you can install the respective optional helper module to ensure Upgrade Status can find the information it needs for those projects.

The reason you need these is because modules installed via either Composer (in some cases) or via Git don't contain the version key in their *.info.yml files that gets added automatically by Drupal.org. Upgrade Status uses this to determine what version of the module you're currently using.

Anyway, if you use Composer to manage your project adding Composer Deploy won't make things any worse and may make them better:

composer require drupal/composer_deploy
drush en composer_deploy -y

Note: After installing have Drupal run its Update status checks again (Reports > Update status).

Scan your projects

You need to tell Upgrade Status to scan your project(s) before it can provide detailed reports. This can be done either by navigating to the report page at Reports > Upgrade status then checking the box for each project you want to scan and pressing Scan selected at the bottom of the page.

Or use one of the included Drush commands. Because the module caches the results of each scan you can use Drush to run a scan and still view the detailed report via the module's UI.

What next?

I think the biggest win for me using Upgrade Status is that it helps illustrate where I should be spending my time. Once my custom code is ready to go I can pretty quickly see that state of the different contributed projects I'm using, and which ones are most likely to benefit from my helping out.

In my case the Group module is super important to what I'm doing, so I'll start by seeing what if anything I can do to contribute to getting that module Drupal 9 ready first. Simple OAuth is also very important so I should update to the latest version of that and run these checks again.

I also look at this list and think, I'm not using Configuration Installer, so I should remove that. And, in my use case I could switch to using the Drupal core Media Library instead of Entity Browser and Inline Entity Form which would remove those (plus their dependencies like dropzonejs and Entity Embed) from the list of things I need to worry about.

Here's some questions to ask yourself when reviewing the report provided by Upgrade status:

  • Do I know what the minimum hosting requirements are, and what do I need to do (if anything) to prepare my hosting environment?
  • Are there modules in this list that we're just not using at all and can be disabled and removed?
  • Are there modules that we might want to consider replacing with a new approach, or with a different project that is Drupal 9 compatible? Also consider new best practices. For example, Media Library can replace Entity Browser for many use cases, now that it's stable.
  • Which of these modules are the highest impact for my project? And what can I do to help move those ones closer to Drupal 9 readiness?
  • If I can't do this work myself who do I need to start working with to coordinate?

We've got a tutorial, Prepare for a Drupal-to-Drupal Migration that has lots of ideas about how to start the process of preparing for a Drupal 7 to Drupal 8 migration that's relevant here. One of the big ones is, start a spreadsheet and start collaborating with your team on tracking the status of things.

Example:

Google sheet showing a list of Drupal 7 modules and notes about their drupal 8 readiness.

Also, check out the Upgrade Rector project which aims to provide a UI for the drupal-rector toolset.

May 04 2020
May 04

Paul johnsonContinuing our short series of articles highlighting ways that the Drupal software and its community are building solutions to help combat the effect of COVID-19, today we hear from Paul Johnson of CTI Digital. Here, he describes their project at the Arts Council England.

Arts Council England support and help fund cultural activities within local communities, arts organisations, museums and libraries. After the UK government mandated the closure of all cultural venues including national parks and theatres, The Arts Council have made available 160 million GBP of emergency funding  to offer individuals and organisations working in the cultural sector new financial support during this crisis.

The Arts Council is providing:

  • Up to 90 million for National Portfolio Organisations (NPOs) and Creative People and Places (CPPs) lead organisations
  • 50 million for organisations that are not in receipt of regular funding from the Arts Council
  • 20 million for artists, creative practitioners and freelancers

(These figures are correct at time of writing)

Their Drupal platform is central to making the funding available by providing information and access to funding applications. With an urgent need to accept and process high volumes of applications, the Arts Council found themselves in a strong position as their existing Drupal website easily accommodating rapid creation of new site sections without need for developer intervention.

Arts Council England quickly created detailed pages using existing components that lead users through the application process. Clear and accessible design patterns help users hone in on useful information that answers everything from where the funding comes from, to how to use the funding application system. 

This information is available alongside videos and help articles. All of the content is also entirely accessible and provides a smooth user experience at what can be a distressing time.

screenshot of arts council website

Critically, the Arts Council is able to continue to build new pages, extend pages, and update content as the government introduces new measures. 

The funding applications currently push through a dedicated grant-based system, but Arts Council England have the capability to manage applications directly within their Drupal platform if required at a later date. 

Learn more about the Arts Councils support for arts organisations and individuals on their website

May 04 2020
May 04

 

Area Alert Drupal distribution logo

For the past several weeks, the Mediacurrent team has spent hours collaborating on an open source emergency site. In a recent Area Alert post, expert designer Becky laid out the UI design approach to creating websites dedicated to emergency responses like the COVID-19 pandemic. Becky walked through user scenarios and digital psychology that inspired her design choices. 

This week, we are proud to announce the beta release of the Area Alert distribution! Mediacurrent has partnered with Pantheon to create a free public upstream along with 90 days of free hosting for qualifying organizations.

What’s In The Box

The goal of the Area Alert project is to enable organizations to rapidly develop and deploy emergency websites in a matter of hours or days, not weeks or months.

area alert demo page

Explore the full demo at https://areaalert.mediacurrent.com/.

Flexible Components

The first way we help expedite website creation is by giving content editors the tools to easily drop different types of components onto the page. The screenshot below shows you a toolbox of components that can be added to any page.

Area Alert sample content

The Area Alert distribution is pre-loaded with sample content that can help editors quickly get started and provides guidance about how to keep going.

Color Support

The next way this distribution supports the rapid setup of emergency response sites is with the “Color” feature. This feature gives administrators the ability to change the color scheme of the website from the UI.

Area Alert Colors

By giving editors the ability to quickly add branded colors, site administrators will be able to give site visitors more confidence in the authority of the website and more trust in their information right from the start.

Additional Features

The Area Alert profile comes with 4 content types and 15+ components including carousels, FAQs, maps, and media content.

Key features include:

  • Enterprise-level security
  • Fully responsive, mobile-ready theme
  • Fast translation using https://gtranslate.io/
  • Full-text site search to quickly search for a specific topic
  • Out of the box, pre-configured content types such as landing pages and press releases
  • Automated content aggregation for article content with a dedicated landing page and featured news area on the homepage
  • Twitter integration

Getting Started

As mentioned, Mediacurrent has partnered with Pantheon to create a free public upstream. This means that with a free account on https://pantheon.io/, you can fully install the Area Alert profile in a matter of minutes. Pantheon is also offering free elite plans for qualifying organizations. Read more about Pantheon’s offers. Visit the Area Alert public upstream link hosted on Pantheon to get started.

For advanced installations, developers are encouraged to visit the official project page on Drupal.org for more information. The project page also has information about how to submit bugs or join our public Slack channel.

If you would like to use this product but need some help to get started, Mediacurrent is standing by, ready to partner with organizations that need assistance with building out and maintaining their COVID-19 site, or any emergency response site. Contact us for a live Area Alert demo or for more information about our services. 

We’re In This Together

Mediacurrent, a long-time contributor to open source, is committed to helping the community respond to emergencies, like the COVID-19 pandemic, in any way we can. If you have any questions or comments, please contact us for more information. Our hope is that this contribution can help municipalities and organizations better communicate with the public during this difficult time.

May 04 2020
May 04

If you’ve ever wished there was a way to easily import CSV data into your Drupal website then this post is for you. With the new Entity Import module, website admins can easily add and configure new importers that map CSV source files to Drupal 8 entities. Entity Import adds a user interface for Drupal 8’s core migration functionality. It lets you add importers for any entity in the system, map source data to entity fields, configure process pipelines, and of course, run the import.

Why Another Drupal Import Module?

In Drupal 8 there are already several good options for importing and migrating content using the admin interface.

The Feeds module is one approach for importing content, with a great user interface and huge community of support. Feeds has been around for 7+ years, has been downloaded 1.8 million times, and, according to its Drupal project page, is being used on more than 100,000 websites.

The Migrate module, a part of core for Drupal 8, is an incredibly powerful framework for migrating content into Drupal. With Migrate, developers can create sophisticated migrations and leverage powerful tools like rollback, Drush commands, and countless process plugins for incredibly complex pipelines.

We use both Migrate and Feeds extensively. (Check out this recent post from Joel about getting started with Migrate.) Recently, though, we needed something slightly different: First, we wanted to provide Drupal admins with a user interface for configuring complex migrations with dependencies. Second, we needed Drupal admins to be able to easily run new imports using their configured migrations by simply uploading a CSV. Essentially, we wanted to give Drupal admins an easy-to-use control panel built on top of Drupal core’s migrate system.

My First Use Case: Complex Data Visualizations

Here at Aten, we do a lot of work helping clients with effective data visualizations. Websites like the Guttmacher Institute’s data center and the Commonwealth Fund’s 2018 interactive scorecard are great examples. When I started working on another data-heavy project a few months ago, I needed to build a system for importing complex datasets for dynamic visualizations. Drupal’s core migration system was more than up for the task, but it lacks a simple UI for admins. So I set about building one, and created Entity Import.

Getting Started with Entity Import

Download and Install

Entity Import is a Drupal module and can be downloaded at https://Drupal.org/project/entity_import. Alternatively, you can install Entity Import with composer:

composer require drupal/entity_import

Entity Import is built directly on top of Drupal’s Migrate module, and no other modules are required.

Importer Configuration

Adding New Importers

Once the Entity Import module is installed, go to Admin > System > Entity Import to add new importers. Click “Add Importer.”

For each importer, you will need to provide:

  • Name - In my case I used “Dataset,” “Indicators,” and “Topics.” Generally speaking, I would name your importers after whatever types of data you are importing.
  • Description - An optional description field to help your Drupal administrators.
  • Page - Toggle this checkbox if you want to create an admin page for your importer. Your administrators will use the importer page to upload their CSV files.
  • Source Plugin - At the time of this writing, Entity Import provides just one source plugin: CSV. The system is fully pluggable, and I hope to add others – like XML or even direct database connections – in the future.
  • Plugin Options - Once you choose your source Plugin (i.e. CSV) you’ll have plugin-specific configuration options. For CSVs, you can choose whether or not to include a header row, as well as whether or not to support multiple file uploads.
  • Entity Type - Specify which entity type your data should be imported into.
  • Bundles - Once you pick a entity type, you can choose one or more bundles that your data can be imported into.
Field Mappings

Configuring Importers

Each Importer you add will have its own configuration options, available under Admin > Configuration > System > Entity Importer. Configuration options include:

  • Mappings - Add and configure mappings to map source data to the appropriate destination fields on your entity bundles. (Important side note: when creating mappings, the human readable name can be whatever you wish; the machine name, however, needs to match the column header from your source data.)
  • Process Plugins - When you add new mappings you can specify one or more process plugins directly in the admin interface. This is where things get interesting – and really powerful. Drupal 8 provides a number of process plugins for running transformations on data to be migrated (read more about process plugins in Joel’s recent migrations post). With Entity Import, you can specify one or more process plugins and drag them into whatever order you wish, building process pipelines as complicated (or simple) as you need. Your admins can even manage dependencies on other imports; for example, mapping category IDs for an article importer to categories from a category importer. Again, no coding necessary. Entity Import provides a user interface for leveraging some of Migrate’s most powerful functionality.
Import Screen

Importing the Data

Once you’ve added and configured importers, go to Admin > Content > [Importer Name] to run a new import. You’ll see three tabs, as follows:

  • Import - This is the main import screen with upload fields to upload your CSV(s). If your import has dependencies specified in any of its process plugins, the import(s) it depends on will show up on this screen as well. (TODO: Currently, the interface for managing multiple, interdependent imports is a little complicated. I’d like to make it easier for users to visualize the status of all interdependent migrations at-a-glance.)
  • Actions - After you run an import, you can rollback using the options on the actions tab. (TODO: I’d like to add other actions as well; for example, the ability to change or reset import statuses.)
  • Logs - Migration logs are listed for each import, allowing admins to quickly see if there are any errors. You can quickly filter logs by message type (i.e. “notice” or “error”).
Import Actions

My Second Use Case: Importing Courses for a University

Soon after wrapping up a working prototype for the data visualization project I mentioned above, I was tasked with another project. A prominent university client needed to quickly import an entire course catalog into Drupal. Beyond running a single import, this particular organization needed the ability to upload new CSVs and update the catalog at any point in the future. The use case was a perfect match for Entity Import. I installed the module, spent a few minutes adding and configuring the course importer, and presto!

Next Steps for Entity Import

Writing clean, reusable code packaged as modules is a huge benefit for Drupal development workflows. Even better, Drupal.org module pages provide really great tools for collaboration with features like issue tracking, release management, and version control built into the interface. I have a few TODOs that I’ll be posting as issues in the days ahead, and I am excited to see if Entity Import fills a need for others like it has for me.

If you run a data or content -intensive website and have trouble keeping everything up to date, Entity Import might be just the ticket. We’d love to give you a quick demo or talk through how this approach might help – just give us a shout and we’ll follow up!

May 03 2020
May 03

Time and again, we are reminded of the adage: “There’s unity in diversity.” Contemplating this deeply would make one realise the vastness of this statement. Depending on the region of the world you operate in, diversity may connote issues of religion, race, nationality, ethnicity, class, gender, age, sexual orientation or physical ability. It may constitute all of these or none of them. To formulate a perfect diversity and inclusion (D&I) strategy that is really global in nature, one has to understand the culture, politics, economics and relevant legislation within the regions. Taking diversity and inclusion global is not about the distribution of certain programs but about creating a movement that holds D&I as a fundamental tenet.

Black and white photography of a white person and a black person holding each others' hands to represent diversity and inclusion


Defining, leveraging, and measuring diversity and inclusion is of great relevance. More than ever, businesses, governments, nonprofits and other institutions have been putting a lot of emphasis on the adoption of a global mindset in order to remain viable and relevant in the global marketplace of this day and age. Diversity and inclusion practitioners have been perpetually engaged in assisting people from all backgrounds to hear and be heard, understand and be understood, and work in unison with higher levels of productivity.

Open source communities have been at the forefront of this work. Building a diverse and inclusive community is increasingly becoming a top priority of open source enthusiasts. Drupal, one of the market leaders in the world of open source content management systems, is also backed by a strong and growing community that embraces the principles of D&I. From workplaces to open source communities, the D&I factor has been very impactful. To understand how the open source community, the world over (Drupal, in particular), is grabbing the plate full of diversity and inclusion strategies with both hands, we need to look deep into its immense necessity and importance.

Richness of diversity and inclusion

Diversity is a powerful term and calls for empowering people. It emboldens the idea of respecting and appreciating what makes a person different from another. Exploring the differences in a secure, positive and nurturing ecosystem is the basic principle of diversity.

When you talk about inclusion, you talk about a sense of belonging that a person, no matter what socioeconomic status or ethnicity or race or any other criteria he or she belongs to, feels in a community. People feel valued and respected which makes them put their best put forward and lend immaculate performances.

Illustration showing four icons resembling holding hands, fist pump, people sitting around a table, and a bulbSource: Deloitte

It’s the leadership group that can make a massive impact. Every individual leader, both intellectually and emotionally, needs to buy into the value of belonging. In other words, you can call it empathetic leadership. It’s a critical starting point. It makes a person, who is part of the leadership group, remember the times when they were excluded, shamed, or interrupted. Tuning into empathy can make a person understand the feeling of being excluded or making others feel excluded. When you have a strong leader, who embraces D&I principles, practices them, and enables others to choose this path, you can expect behavioural changes to kick in and culture reset to happen. According to Deloitte, following characteristics, interrelated and mutually reinforcing, defines a good leader.

Illustration showing a circle encircling a human with different icons resembling people on the circleSource: Deloitte

The importance of diversity and inclusion at the workplace has already been realised by top companies and necessary steps have been taken. If you look at the financial sector, for example, D&I remains a higher priority according to a global CEO survey. This, they believe, would eventually pave the way for newer talents.

Bar graph with orange coloured vertical bars and red backgroundSource: PwC

As one of the largest media networks, BBC has chalked out a clear-cut plan of making diverse thinking and inclusive action as its elemental parts.

Tabular column in violet colour with text and numbers written about diversity and inclusionSource: BBC

Another industry giant, Nestlé, has also made discernible commitment to embed diversity and inclusion across everything that it does with a primary focus on culture, innovation and society. Action plans for creating a gender balance, promoting cultural agility, empowering different generations at the workplace, supporting people with disabilities, tackling discrimination against LGBTQ+ community, and so forth, have been increasingly emphasised upon and put to work.

[embedded content]


Open source communities embracing D&I

Technology that has taken birth with the help of homogenous groups has shown to be negatively impacting the women in the past. Amazon had to scrap an AI recruiting tool as it showed bias against women. Back in 2014, menstruation was not included as a health metric in Apple’s health tracking app. And, a story on Vice stated how the prospect of fully artificial heart implants seemed exciting for men and not for women as they were not designed to fit women. Therefore, while building open source software, diverse participation can ensure equitable outcomes.

While building open source software, diverse participation can ensure equitable outcomes.

The importance of diversity and inclusion has been coming to realisation and large organisations have already been trying to make sweeping changes to make their workspaces more diverse and inclusive. 78% of organisations, according to a report on ZDNet, are running all part of their businesses with open source software. So, in addition to organisations, open source communities need to imbibe the principles of D&I.

A building in blue and red with statistical information on diversity and inclusion written around itSource: ZDNet

It’s true that anyone who wishes to license an open source project has to agree, among other things, to not get involved in any discriminatory action. However, it is easier said than done. For example, in a GitHub survey, which is the world’s leading repository of open source code, over thousands of open source users and developers across the globe were asked questions on a range of topics. Of that randomly selected cohort, 95% of the respondents were found to be male, 3% as female and 1% as non-binary. 

Let’s put it this way: Only the scanty vestiges of the day have come in through the open door. In spite of a faint shimmer of light in the hall, the doorway yawns impenetrably black. Open source has work to do. A lot needs to be done because the obstacles faced by the under-represented groups in the open source fraternity are piling up. The position, they are finding themselves in, can’t be addressed through a single lens or strategy.

In spite of a faint shimmer of light in the hall, the doorway yawns impenetrably black.

The positive sign is that the open source world has shown tremendous improvement and has been proving their commitment to D&I. To start with, there’s a collective of people called Open Source Diversity that is working on driving more D&I initiatives in free and open source software communities. It has laid down the basics that can help make an open source project more friendly and inclusive. For instance, the Open Source Diversity prescribes the usage of the Contributor Covenant. This is a code of conduct for open source projects that is created to overtly welcome everyone to contribute to open source software.

Mozilla, in 2018, to promote D&I within their ranks and their work, prepared an action plan for making the code review process more egalitarian and subvert unconscious gender bias.

The Linux Foundation takes a lot of pride in being an open, friendly, and accessible community for new participants and doesn’t leave any stone unturned to show the world the proof of that.

Illustration with blue background and statistical information on diversity and inclusion inside itSource: The Linux Foundation

Open source meritocracy, where there is recognition and decision-making on the basis of work or talent that a person can contribute to the project, is something that Tor firmly believes in and likes to put to practice. This is why it started the Global South Initiative to improve diversity, inclusion and equity in the work that it was doing and get more people from the ‘global south’ to be involved in the Tor community.

GitHub, to cultivate a culture of inclusion, provided training to its managers on the best practices of promoting inclusivity and established a recurring dialogue between its Leadership Team and its Inclusion Advisory Council.

The Apache Software Foundation has ambitious plans too. It wants to become the most equitable open source foundation in the world.

In a bid to promote nonprofits that are dedicated to education, inclusiveness and skill-building for under-represented groups, IBM even awarded $50,000 to Girls Who Code for the latter’s terrific work on increasing the number of women working in computer science.

Drupal’s contribution to promoting diversity and inclusion

It’s more strategic than arbitrary when it comes to the efforts of the Drupal Community to promote D&I. There has been a year-on-year statistics aggregation happening to check how Drupal’s development is being sponsored.

In an in-depth analysis report of 2018-2019 edition, characteristics like gender diversity and geographic diversity were analysed. The data showed discernible gender imbalance in Drupal and underscored the need to continue fostering D&I in our community.

bar graph with blue and green vertical bars showing diversity and inclusion statisticsSource: Dries Buytaert's blog

When measuring geographic diversity, it was seen that Europe and North America continued to contribute more and more to Drupal but the contributions from Asia were declining year over year.

https://dri.es/Source: Dries Buytaert's blog

Before exploring Drupal and its various efforts of creating a sense of belonging among its community members, let’s go across the pond and check out WordPress Community’s efforts.

With a clear hegemony over the market share, WordPress, as an open source CMS, is powering the most number websites around the world. (Drupal wins on the security front.) It’s the big players in the open source CMS market, like WordPress and Drupal, who need to show the way forward. WordPress has been working on making its community more diverse by driving some splendid initiatives. They have developed a workshop, for example, that trains women and other people from traditionally underrepresented groups in technology. They help them out to present sessions at conferences. The sole aim is to see more underrepresented groups as speakers and bring about a real change in the speaker roster for their annual conferences. WordPress has also been very supportive of its LGBTQ+ community and has been celebrating Pride Month every year. In short, WordPress is doing great work.

There’s a reason why we talked about WordPress (a competitor to Drupal). When it comes to the question of diversity and inclusion, open source communities work together to increase the number of participants and contributions from marginalised and underrepresented groups. Jill Binder, who has been at the forefront of major speaker diversity improvement programs within the WordPress community, helped the Drupal Diversity and Inclusion Contribution Team with its efforts.

Blue coloured heart shaped icon that represents the logo of diversity and inclusion team of Drupal


DDI is an independent collective within the Drupal Community that champions a number of initiatives to foster a welcoming and inclusive culture everywhere Drupal exists - from events to online meetups to workplaces. Jill helped DDI organise a speaker diversity workshop in September 2019 to help people from underrepresented groups to prepare for submitting talks to global events.

To make sure prospective and existing community members are treated with respect, Drupal has instituted a community-wide code of conduct. Drupal’s Community Working Group’s documentation includes clear guidelines for:

  • Handling the conflict between you and another contributor
  • Escalating the conflicts to this Community Working Group if an issue feels unresolvable
  • Reporting the cases of harassment no matter if you are the victim or an observer of it

To make the Drupal project accessible to a diverse user base, it has a Core Accessibility Gate which has to be passed before any patch can be shipped.

With a majority of demographic surveys requiring users to conform to restrictive identity fields and alienating underrepresented groups, the Open Demographics Initiative wanted to develop forms that are more inclusive. In addition, it wanted to give people more authority over the data they think is right to be revealed. Therefore, the Drupal Association planned to implement Open Demographics Initiative’s recommendations on Drupal.org. It collaborated with the Open Demographics team for adding the recommendations to the user registration process on Drupal.org.

Dries Buytaert, the founder and project lead of Drupal, firmly believes that “everyone deserves the opportunity to contribute”. He encourages Drupalists to inspire and enable a new, diverse group of people to contribute to Drupal through Drupal Core Mentoring. He also advises leveraging the Drupal Apprentice Initiative by TalentPath that can help businesses in building a diverse talent pipeline through apprenticeships.

Major events like DrupalCons and DrupalCamps gather a range of citizens of the Drupal ecosystem to learn, share and collaborate together. The perspectives, vigour and diversity of experiences these participants share make these conferences invaluable. These Drupal events ensure that everyone, no matter who they are or where they are from, is invited to attend.

Tweet showing coloureful droplet like icon on top-left and text below about diversity and inclusion in Drupal event


These Drupal events have made it a priority to include D&I as an important element to be tracked, measured and improved. For instance, DrupalCon Seattle 2019 saw an increase in the number of sessions submitted from underrepresented groups.

White background and statistics in numbers written inside it about diversity and inclusion in Drupal communityWhite background and red strips on top with statistics on diversity and inclusion in Drupal community written inside itSource: DrupalCon Seattle 2019

Final note

Open source community carries a great potential to transform society for the better. The more diverse and inclusive an open source community is, the stronger, vibrant and ambitious it is in its approaches. Drupal is making giant strides. A lot of positive signs have emerged in the recent past to make the Drupal project better.

Drupalists have to constantly work on making the Drupal ecosystem a place where people from all walks of life can participate and contribute their knowledge and skills.

OpenSense Labs embraces the principles of diversity and inclusion and ensures that it sets an example of an organisational culture eloquent of wonderful diversity at the workplace. Ping us at [email protected] to explore the wonders of promoting and embracing D&I.

May 03 2020
May 03

This is part two of a two-part series on different ways and benefits of contributing to an open-source project. In the first part, we looked at the perks of contributing to an open-source project. In this article, we will explore Drupal project, one of the largest open-source projects with a thriving community, and the ways to get involved with it.

Don’t we all want to leave our mark on this world and to know that our life matters? I’m sure all of us want to leave a legacy that means something to people. By legacy, I mean putting a stamp on the future, and making a contribution to coming generations. 
In one of the scenes of Dead poets society, John Keating, who is an English teacher, discusses with his students about the meaning of life. During his lesson, he quoted from Walt Whitman’s poem, Oh Me Oh Life, as follows:

“Oh life! of the questions of these recurring, Of the endless trains of the faithless, of cities fill’d with the foolish. What good amid these, O me, O life? Answer: That you are here — that life exists and identity, That the powerful play goes on, and you may contribute a verse.”

Illustration, symbolising Drupal contribution. consisting of a blue coloured Drupal logo, shaped like a droplet, being carried on a palm


The poem explains that life is like a play, in which anyone who has ever lived gets to contribute one verse. Later, Keating questions the students: “What will your verse be?” 

Your legacy will be that you contribute to the verse! 

Similarly, when you contribute to an open source project, you not only contribute to its growth but also to yours. You leave your mark in the project that you contribute to, inspiring hundreds of other contributors. Drupal allows its users to freely modify and integrate the work into their projects. It gives you ways to freely plan and exchange ideas with like-minded people in their community. It also offers immense opportunities to contribute and leave your mark. Drupal.org is home to thousands of contributors and it's where users find the projects and succor they need to make Drupal better everyday.

Why Drupal?

Now that we know how much value a contribution holds, let’s talk about why we should specifically choose Drupal over any other CMS.

Have you wondered about the one similarity between the websites of The Economist, NY Government, Arizona University and Mint? 

Well, these websites are a product of Drupal open source content management system (CMS) framework. 

PHP is an open source script code, which is freed from any licensing costs and a choice of developers from a few years. Drupal is written in PHP code, and, therefore, it saves money when it involves developing a web site using it.

A blue coloured droplet shaped icon with Drupal features being written inside it


Drupal is very flexible due to its modularity. Which means, you can easily extend it. It is capable of managing and creating a wide variety of content and this has proved to be one of its greatest selling points. Hence, Drupal enables a flexible design platform to create content rich websites for different markets like commerce or media. 

Another major reason to choose Drupal is its scalability. It’s used by NASA and Oxford University because it’s highly scalable and great at accommodating content growth. Even if you plan to deliver the best digital experience to your customers, it will all go in vain if your site is hit with a lot of traffic and goes down. No matter how much traffic you receive, Drupal can handle it.

In addition to being one of the best tools for creating websites, the greatest strength of Drupal is that it is one of the largest open source communities. The open source community proffers voluminous public documentation, chat and mailing lists, well-developed discussion board parallel to an air of affable online culture.

Drupal ensures that its users get rapid responses from a dedicated security team along with a large professional service provider ecosystem and Drupal's community, which is one of the largest developer communities in the world. The goals of the Drupal security team include resolving reported security issues, helping the infrastructure team to keep the Drupal.org infrastructure secure and providing documentation on securing your site. 

According to the Imperva’s report on The State Of Web Application Vulnerabilities in 2018, Drupal reported less number of security vulnerabilities in comparison to Wordpress. While Wordpress reported 542 security attacks in 2018, Drupal reported 107. 

A bar graph with yellow, blue, violet and red coloured vertical graphsSource: Imperva

Drupal also makes content authoring easy. The tools that Drupal provides makes it easier for the content creators to do their jobs. Drupal allows the creators to edit and write the content in place. Even if you are away from your laptops/PC’s, mobile editing comes to the rescue! You can very easily edit and approve content from any mobile device. Content revision is another tool that comes in handy to keep a track of all the changes made in the content and by whom.  

Drupal has made building multilingual websites faster and easier. Full translation of every part of the site is provided by four core modules in Drupal. Every part of the interface can be customised according to your language and needs. 

Drupal 8 comes with 94 different languages and they can be installed without any additional components. Also, the diversity in languages makes it hassle-free for the site administrators!

Doesn’t matter what device you’re using, Drupal helps in building responsive websites and provide a seamless content experience anytime, anywhere. 

In order to make Drupal content ready for delivery to site apps and free from presentation, Drupal lets you decouple the back and front-end where needed.

Frank Nagle, in his research at Harvard on the hidden benefits of giving back to open source, found that those who contributed to open source projects gain more productivity and knowledge of the software they use everyday. So, the more you contribute to Drupal, the more you learn about it.

Your contribution is visible to anyone around the world and can learn your name and admire your skills and also might be the one to help you land your dream job! 

Statistical outlook on the development of Drupal

Drupal, being an open-source project, does not have employees to deliver improvements and support. It depends on its varied community of individuals who work diligently to push the project forward by working on not just web development and user support but also many other contributions and interests that comprise, marketing, helping to review issues, organizing user groups and camps, maintaining documentation and speaking at events.

To start doing your bit, you can start by making an account on Drupal.org. Follow the steps and you will be ready to start contributing in no time! Now, let’s look at some of the key stats related to the contributions made to the Drupal project.

The project pipeline

According to Drupal Business Survey 2019,  the Drupal project pipeline has shown significant growth or stayed the same in 2019 as compared to last 2018. 

The win rates of Drupal projects have also remained the same. The future of Drupal looks moored in the coming years, based on the response of 2019. 

The survey also stated that out of the total 118 businesses that, 111 contribute to Drupal and 7 don’t. 

Pie chart with blue coloured regions to show who's contributing to Drupal and the overall percentage of Drupal contributionSource: Drupal.org

In total, the Drupal community worked on 3,474 different Drupal.org projects in 2019 compared to 3,229 projects within the period of 2017-2018 which is an 8% year over year shoot up!

Credits

Every contribution made to Drupal is valued, whether they're code contributions, or non-product and community-oriented contributions such as organizing events, giving talks etc.

The credit system has proven to be more accurate in conceding types of Open Source contribution and is both pragmatic and important.

The initial ideas for giving credits were proposed in 2014 by Dries Buytaert, the project lead and founder of Drupal. He wanted to start a page on Drupal.org that would show which organization contributed to Drupal and the number of times the contributions were being made. Credit is a very powerful motivator for individuals and organizations. 

Later, in the spring of 2015, Drupal added the credit feature for people to credit their work. The credit feature has played a very important role in increasing the scalability and development of Drupal. 

According to Dries Buytaert's report on Drupal.org’s contribution data  for 2018-19, Drupal.org's credit system received contributions from 8,513 different individuals and 1,137 different organizations which shows a significant growth in comparison to the report of 2017-18.

Bar graph with orange and yellow bars to representing who's contributing to Drupal


The majority of work is done by a relatively small number of contributors. These contributors put a large amount of time and effort into developing Drupal and its projects. One of these contributors includes Gaurav Kapoor who is a Drupal Architect at OpenSense Labs.

Volunteer contributions proved to be very important to Drupal, even though there are almost four times as many purely sponsored credits as compared to Purely Volunteer credits. 

The community captured more number of non-product contributions because of the large jump in volunteer credits. Even though the ‘sponsored credits’ grew more in number in comparison to ‘volunteer credits’, the relative number of ‘volunteer credits’ seemed to make a jump!

Bar graphs with blue and green horizontal bars to show Drupal contribution dataSource: Dries Buytaert's blog

Diversity and inclusion

Supporting diversity and inclusion within Drupal is supremely important for the health and success of the project. Drupal welcomes all kinds of contributors ranging from programmers to designers and writers to mentors.

The Drupal diversity and inclusion team tries to recruit teams from places where the people from diverse backgrounds collaborate. Drupal contributors have become more diverse but need more efforts to be put in for widespread reach of D&I principles among its members. And when a team has diverse members, it makes better products for more people! 

According to the data contributions that were recorded in Drupal.org’s contribution data for 2018-2019, only 8% were made by contributors who do not identify as males which is a 1% increase in comparison to last year. 

Bar graph with yellow and orange bars to show who's contributing to Drupal


One of the reasons that Drupal suffers from a lack of diversity is that not everyone has an equal amount of free time to make contributions. Research shows that women still do more unpaid work in comparison to men, for example, household chores, child care etc. This makes it difficult for women to contribute on an unpaid basis. 

When geographic diversity was measured, it was observed that individual contributors were from six continents and 114 countries:

Bar graph with yellow and orange bars to show who's contributing to Drupal


Contributions from Europe and North America have increased. Asia, South America and Africa together account for 6.3 billion out of 7.5 billion people in the world and hence, pose great opportunities for Drupal. 

Different ways to contribute to Drupal

Coding Is The New Literacy

If you are the one who likes to fix issues, developing is for you! So many coders believe that coding should be open. Developers’ contributions can be in the form of both contributed modules/themes and patches to core. When you find a bug in the project, you'd want to have a look on the source and patch it yourself. 

When you contribute to an open source project like Drupal as a developer, you ensure that Drupal can do what the contributor needs to do in his next project.

The Drupal core issue queue contains a substantial amount of unresolved issues, and demands the assistance of more volunteers to address these issues deftly. 

Mentoring: Effective Way To Contribute

Every contribution holds value and mentoring is the most effective way to contribute. When you mentor as a contributor, you not only help the individual but also the entire Drupal community. 

Drupal core mentors inspire, enable, and encourage new core contributors by working on the core tools, process, and community for a hassle-free experience for the new contributors. 

And not just that, the gratitude you earn by mentoring someone is beyond everything! 

Interacting With The Community

When you join Drupal as a new contributor, you would like to interact with someone who shares the same interest as yours, someone who has experience in contribution. Drupal has a community of thousands of passionate individuals around the world. It also offers some tools that are used to keep in touch with them. There are support forums on Drupal.org where you can put your queries and get your doubts cleared by other members of the forum. Find like-minded individuals who are working on the same tasks as yours on Drupal Groups. It is an online space where hundreds of groups come together to plan projects and work on them and also to organise local meetups or discuss anything for that matter. The Drupal community is also very active on IRC and Slack.

Running Drupal Tests

There is so much more in open source than just coding. Testing is one of the ways to contribute and there are so many things to test for and so many ways to help in Drupal (like reviewing patches).. For helping Drupal with testing, you need to have a keen eye for detail or just a knack for breaking things. Good testing directly contributes to the stability of the platform and is a preeminent way for individuals of all backgrounds to make a valuable contribution to the project.

Translating Drupal to Your Language

People get involved in Drupal from around the world. Drupal supports many languages, and there is always a need for contributions in translation. If you are the one who knows multiple languages, you can contribute by helping to maintain Drupal core or contribute to module translations. All the translations are managed on the Drupal.org translation server. You can start contributing by logging in with your Drupal account and join the relevant language team. 

Designing and Usability

If you are into design and graphics, you can help with a lot of projects who need work in their logo designs, icons and other graphics that are visually appealing. Being a designer, you first need to find yourself a project whose goals you understand and relate to. A designer needs to focus and make sure that they understand users' needs. There is Drupal’s usability group where you can create, discuss and plan great Drupal UX designs

Making A Donation

There are so many people who want to contribute but don't have the time. So, if you want to say "thank you" to the folks who have put hard work into making Drupal what it is and ensure that Drupal's infrastructure stays healthy and strong, you can consider a monetary donation! Donations are also a part of the contributions that take Drupal forward in many ways. During the uncertain times, like the current Covid-19 pandemic, Dries Buytaert has pledged $100,000 in individual contributions to the Drupal Association. After a week of taking this pledge, 29 organizations of the Drupal community pledged another $100,000. Now, for every $1 you donate, Drupal gets $3. To donate to #DrupalCares visit the donation page of Drupal association.

Marketing Drupal

Marketers love the various marketing tools as they help them get better analytics and also effectively streamline their work benefits. Drupal provides easy integration with marketing automation tools which is a plus for marketers! Marketers can freely produce convincing and more powerful campaigns in their native languages. Drupal marketing group for the branding and marketing committee is open for all the marketers out there!

Organizing An Event

You can do your bit for Drupal by organizing events in your area. There are many types of Drupal events, starting from the colossal and comprehensive DrupalCons that are organized by the Drupal Association, to smaller local DrupalCamps and local Drupal Group meetings. DrupalCon unifies experts from around the world who create progressive digital experiences that include keynotes & sessions for leaders, developers, and end-users, summits & training industry-focused to elevate your skills. Drupical displays all the Drupal events and you can also check out local Drupal groups and stay updated on what events are taking place.

Conclusion

There are many benefits to contribution: from individuals gaining knowledge and expertise, to organisations building stronger more productive teams, to the broader open source community as a full. Drupal is continuously growing in government, higher education and the enterprise state.

Even the smallest of contributions count on Drupal. The feeling when you see your name appear on a project is beyond words. 
So, are you ready to leave your legacy? Ping us at [email protected] to be a part of the growing number of Drupal contributors.

Keep your customers! Drupal + eCommerce + You

May 01 2020
May 01

How to Futureproof Your Next Project with Drupal Rector

Apr 30 2020
Apr 30
Apr 29 2020
Apr 29

CRMs are helpful assistants for businesses in their communication with current and prospective customers. No wonder that many business owners want to integrate CRM software with their sites.

Luckily, the enhanced third-party integration opportunities in Drupal 8 pave the way to any integrations you need, which is one of the significant Drupal 8 benefits for a business.

The InternetDevels web development team has extensive experience integrating Drupal sites with various CRMs, so you can ask us for help with a task like this at any time.

The focus of our today’s post is specifically on Drupal integration with Salesforce. We will review the opportunities in this area, as well as share one of the recent Drupal case studies of building a Drupal 8 website with Salesforce integration.

What is Salesforce? A glimpse of the famous CRM solution

Salesforce is an industry-leading cloud-based CRM (customer relationship management) solution that brings businesses and customers together. The word “sales” in its name clearly shows one of its key missions — it helps companies effectively manage their sales, customer service, marketing automation, collaboration, and analytics. The platform gives the sales, marketing, commerce, and other departments a shared view of every customer.

Salesforce Suite

Benefits of integrating Drupal and Salesforce

If you have a Drupal website, your sales and marketing team can enjoy all the power of Salesforce described above through a smooth integration between the two systems. Here are at least a few benefits you will get:

  • your sales and marketing workflows become much more efficient
  • you save time and money thanks to a completely integrated system
  • you never miss a prospective customer thanks to instant email notifications
  • you have a chance to track your competitors
  • both one-way and two-way data sharing between Drupal and Salesforce is possible
  • it’s easy to create and update the data thanks to smooth synchronization
  • authorization features improve the data protection

Drupal integration with Salesforce: how it works

The essence of any integration is a perfect data exchange — Drupal websites need to both push the data to and pull it from Salesforce. As stated above, any integrations have become a breeze in Drupal 8 thanks to its API-first approach.

Drupal also boasts a wealth of ready made contributed modules that facilitate specific integrations. So, of course, there is a useful Salesforce module for Drupal 8 (and Drupal 7 as well). It’s called the Salesforce Suite and takes care of the seamless integration. The suite includes a bunch of submodules, so let’s take a tour on them.

A glimpse at the modules for setting up Salesforce on Drupal websites

The Drupal 8 Salesforce Suite module

The Salesforce Suite is the main module for the integration. It synchronizes Drupal website’s entities (content nodes, users, etc.) with Salesforce objects (contacts, organizations, etc.) The exact relationship between these is provided by field mapping.

The module supports the import and export of data, which can be both in real time or asynchronously, based on the Cron runs. The Drupal 8 Salesforce module version has been updated in 2020.

The Salesforce Suite submodules

Here is how the particular tasks are performed by the efficient team of the submodules in the suite’s Drupal 8.4 version:

  • Salesforce Integration. This submodule is responsible for the Drupal and Salesforce integration.
  • Salesforce JWT Auth Provider. This tool in the suite takes care of the key-based Salesforce authentication.
  • Salesforce Mapping. To better synchronize the exchanged data, field mapping is used. This submodule maps Drupal entities to Salesforce objects.
  • Salesforce Mapping UI. This submodule provides a handy user interface that allows you to manage the mapping settings.
  • Salesforce Logger. This member of the suite provides for the consolidated logging of the Salesforce Log events.
  • Salesforce Push. This tool is particularly responsible for pushing the Drupal data to Salesforce when updates are made on Drupal.
  • Salesforce Pull. The opposite job is performed here — the Salesforce objects are imported based on the mapping.
  • Salesforce Soap. This submodule exposes a SoapClient service to communicate with the Salesforce SOAP API.
  • Salesforce Webform. This submodule adds support for webforms fields in the mapping process to provide Drupal Salesforce webform integration.

Salesforce Suite module for Drupal and Salesforce integration

How to integrate Salesforce with Drupal: case study

For the Drupal 8 case study we are sharing now, our customer recently reached out to us with a request to build a simple website. The site didn’t have to include anything special — just a few content types to match the InDesign template, Google Analytics tracking, and, at the most complex part, Drupal integration with Salesforce.

When we are asked for “simple website development,” we understand the customer’s budget is limited. So we try to help them and make even the seemingly complex parts simple. If you are also interested in development services based on this approach, you can drop us a line.

One of the ways to achieve this is to use the Drupal core and contributed solutions. That’s exactly what happened in our case — we used the Salesforce Suite to implement this integration.

To relate the Drupal data to the Salesforce data, we relied on the built-in field mapping types of the Mapping module in the Suite without writing custom ones. The built-in field mapping types include properties, related IDs, constants, tokens, and more, so they cover plenty of simple cases. This is exactly what was needed for our customer’s case — simple user properties.

Steps of Drupal integration with Salesforce

Here are the standard steps to integrate Salesforce with Drupal that we performed and that may come in handy to anyone.

1. The Salesforce part

  • Our customer signed up for a Salesforce Developer Edition account.
  • We advised them on how to create a new Salesforce Connected App (at Setup — Create — Apps — Connected Apps — New), including the enabling of the OAuth settings and specifying the callback URL to their domain.
  • After that, they received their consumer keys that needed to be saved for the next step.

2. The Drupal part

  • On the customer’s Drupal website, we installed the Salesforce Suite and enabled its key submodules.
  • On the Administration — Configuration — Salesforce — Authorization page of our customer’s Drupal admin dashboard, we entered the credentials received from the Salesforce in the previous part.

3. Mapping Drupal to Salesforce

  • Next, we went to the Administration — Structure — Salesforce — Mappings page on the Drupal dashboard.
  • We created a mapping instance labelled “Customers” and specified the Drupal entity type “User” should be mapped to the Salesforce object “Contact.”
  • Next, we mapped all the necessary Drupal user properties (first name, last name, email, etc.) to the corresponding Salesforce fields.

Finally, how to test Salesforce and Drupal Integration?

Here are the steps to test whether the integration works:

  • We created a new test user on the Drupal website to see if it would be automatically pushed to Salesforce.
  • Next, we ran Cron at Administration — Configuration — System — Cron to refresh the Salesforce contacts.

Integrate your Drupal website with Salesforce or another CRM!

If you’ve been thinking about integrating your website with Salesforce or any other CRM of your choice, or building an entire website for your business, the time is now. Our special priority today is to provide our customers with reasonably-priced solutions. Our Drupal development team will find ways to resolve your tasks quickly and efficiently, while saving where it is possible. Let’s discuss!

Pages

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web