Upgrade Your Drupal Skills

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

See Advanced Courses NAH, I know Enough
Oct 08 2020
Oct 08

If you've followed Pantheon's Build Tool Instructions and used Pantheon's Example Drops 8 Composer as the base to take advantage of CircleCI then you've encountered Behat tests. Behat tests are extremely valuable for testing site functionality before new code goes to production or a shared code stream. However, on a custom site these default tests provided by Pantheon are likely to fail if you've made even a benign change like deleting Tags vocabulary on a Drupal standard installation.

The first few times I encountered these tests and inevitable failures, I would summarily delete or comment out the Behat test and proceed with development as normal. "We'll come back to those later", I always said. One of the barriers to taking full advantage of the Behat scaffolding that Pantheon provided was that there wasn't obvious guidance on how to run the tests locally before they caused failures in CircleCI builds. 

However, with just a few file changes to your Lando-based project, you can have these tests running locally. Good test coverage can give developers confidence when pushing code and reduces the chance of breaking basic existing functionality. An investment in tests early in a project can save time and headaches later on and build confidence in the development team.

(These instructions assume Drops 8 2.3.1 composer-based installation.)

  1. Add a drush alias file with url and db-url settings to drush/lando.aliases.drushrc.php.1

    <?php
    
    $aliases['epihc'] = array(
      'uri' => 'https://epihc.lndo.site/',
      'db-url' => 'mysql://pantheon:[email protected]:3306/pantheon',
    );
    
  2. Add lando-specific behat config to tests/behat/behat-lando.yml.

    default:
      suites:
        default:
          contexts:
            - FeatureContext
            - Drupal\DrupalExtension\Context\DrupalContext
            - Drupal\DrupalExtension\Context\MinkContext
            - Drupal\DrupalExtension\Context\MessageContext
            - Drupal\DrupalExtension\Context\DrushContext
            - FailAid\Context\FailureContext
      extensions:
        Drupal\MinkExtension:
          goutte: ~
          base_url: https://epihc.lndo.site/  # Replace with your site's URL
        Drupal\DrupalExtension:
          blackbox: ~
          api_driver: 'drush'
          drush:
            alias: 'lando.epihc'
    
  3. Add Behat tooling to the Lando config and restart/rebuild lando to .lando.yml.

    tooling:
      behat:
        description: Run behat tests.
        cmd:
          - appserver: /app/vendor/bin/behat --config=/app/tests/behat/behat-lando.yml
    
  4. Run lando behat in terminal to run the tests.

The final task will be to update the Behat tests for your particular site's needs. Your main test file is at tests/behat/features/content.feature. Luckily Behat uses natural language and is pretty easy to write

Other things to know:

  • Check out your dev dependencies for the packages that are working together to make the tests Drupal friendly. The Behat Drupal Extension page has some good references.
  • We use Pantheon, Drops-8, and Lando as a starting point for many of our projects but other approaches are equally valid. 
  • If you need to debug the actual build process on CircleCI, go to .ci/test/behat/run
  • Behat tests aren't appropriate for every use case. Visual regression tests, linters, code sniffers, and/or unit test have their place as well. 

Hopefully these instructions will help you get started on your test-driven way!

1 Replace pantheon with drupal8 when using the drupal8 Lando recipe. This database setting is required for Behat to run drush commands. 

Oct 08 2020
Oct 08

At the core of any successful digital transformation is finding the ideal CMS that best fits your enterprise short and long-term digital objectives.

However, this decision making process can take a lot of time and effort.

To simply this process, our team developed this guide to help you identify the CMS that best suits your enterprise and your end-users based on the criteria that is relevant to your business requirements.

The CMS Buyers Guide will feature:

  • Vendor and product viability
  • Budget concerns
  • CMS capabilities
  • Best practices and standards
  • ... and much more.

Download the CMS Buyers Guide by filling out the form to the right.

Oct 08 2020
Oct 08

From its conception, the fundamental (ground) idea of the internet was the exchange of information through code snippets of a markup language. This is still the ground principle that moves the internet these days. There are, of course, a lot of other things you can do over the internet, but it all comes down to an exchange of information.

With this kind of freedom, it is not surprising, that people abuse this for their own benefit. Spam comments are a form of abusing this privilege.

The combination of the Drupal modules Honeypot and Antibot will ensure that your site is “almost” 100% protected from spam (at least the ones produced by robots).

Keep reading to learn how to Control Spam in Drupal with Honeypot and/or Antibot!

 Step #1. - Install the Required Modules

  • Open the terminal application of your computer.
  • Place the cursor on the root of your Drupal installation.
  • Type:

composer require drupal/honeypot

composer require drupal/antibot

These two commands will install the codebase of both modules on your site.

Control Spam with Honeypot and Antibot in Drupal

Now it is time to enable them.

  • Click Extend and look for the Honeypot and Antibot modules.
  • Click Install.

Control Spam with Honeypot and Antibot in Drupal

Step #2. - Configure Honeypot

  • Click Configuration > (Content authoring) > Honeypot configuration.

Honeypot uses two methods to detect whether a form is filled by a human being or a pre-written script (also known as robot or just bot):

  1.  A hidden field (added by Honeypot). You can label this field whatever you want, but it makes sense to give it a unique “sticky” name, like “homepage” or “url” - this field is mandatory. Since people are not able to see this field, they also will not be able to fill it out. Bots will fall into the trap, and the form will be filed out; therefore detected as spam.
  2. The timestamp. If the form is filled out in less than 5 seconds, Honeypot will assume that it is being filled out by a robot, since people usually need more time to fill out a form on the internet. You can configure the time in seconds or leave this setting disabled at all if you prefer - with 0.

Notice: Pages containing honeypot-protected forms will NOT be cached.

  • Check Log blocked form submissions.

Consider it some kind of “best practice” to get as much information as possible about what is happening within your Drupal system. Always use and check the logs.

  • Leave the default “Honeypot default element” value.
  • Leave the honeypot time limit of 5.
  • Select the forms you wish to be protected by Honeypot
  • Click Save configuration.

Control Spam with Honeypot and Antibot in Drupal

Step #3. - Honeypot Permissions

It is possible to bypass the Honeypot method by assigning the right permissions to certain roles.

  • Click People > Permissions
  • Locate the Honeypot permissions.
  • Make the required changes.
  • Scroll down and click Save permissions.

Control Spam with Honeypot and Antibot in Drupal

Step #4. - Configure Antibot

Antibot checks if the browser has JavaScript enabled. If not, it will ask the user to enable it. Since bots do not use graphical browsers, it is very unlikely for the bot to fill out the form in the first place.

If it has JavaScript enabled, Antibot will check for a keypress, a mouse movement, or a swipe gesture. This determines the human nature of the user once again.

Control Spam with Honeypot and Antibot in Drupal

Antibot uses JavaScript in the same way to prevent bots from submitting data remotely to the forms on your site via cURL for example. cURL is a command-line program used to transfer files over networks, e.g. over the internet. It adds a unique key to the form values. This key is also generated via JavaScript.

The code of Antibot runs statically, so page caching will be not be disabled on pages containing antibot-protected forms.

  • Click Configuration > User Interface > Antibot.

You can configure the forms protected by Antibot on this interface. To protect multiple forms with the same base URL, add a ‘*’ character.

Control Spam with Honeypot and Antibot in Drupal

Summary

It is possible to control computer-generated spam either with the Drupal Honeypot, or the Drupal Antibot modules. You can also use a combination of both modules if you prefer on all forms or using one of them to particular forms on your site. It all depends on your needs and the ones of your web site..

Thanks for reading!


About the author

Jorge lived in Ecuador and Germany. Now he is back to his homeland Colombia. He spends his time translating from English and German to Spanish. He enjoys playing with Drupal and other Open Source Content Management Systems and technologies.
Oct 07 2020
Oct 07

Have you ever happily pushed your latest piece of work ready for others to test only to have it fail the build on coding standards? If so, git pre commit hooks could be your friend!

It's pretty standard practice these days for CI build pipelines to include linting steps to ensure things like coding standards pass. Depending on how the build is configured, failing coding standards can result in the entire build failing. 

Because linting is generally not resource intensive, running it locally can be a useful time saver. But it's an easy step to forget. Thankfully it can be automated to run before every git commit with a pre-commit hook.

First we need a script to fire before the commit. This is placed in the project repo somewhere like .git-hooks/pre-commit:

#!/bin/sh

make lint-php
exit $?

We use Makefiles to call our custom lint-php rule, but this could be a Robo command or any other task running which fires your coding standard check.

Next, the script needs to be executable:

chmod +x .git-hooks/pre-commit

Then let git know about this script by running the following command:

git config core.hooksPath .git-hooks

That's it, our coding standards check will now automatically run whenever we do a git commit and stop the commit from proceeding if there is a fail.

If you've got a WIP or something you wish to commit regardless of any errors use git commit --no-verify

Hopefully this saves you from pushing coding standard fails in the future.

Oct 07 2020
Oct 07

Google  has made gigantic leaps in streamlining search results -- to the point that more than 50% of Google searches no longer result in a click-through to a website or other content. More often than not, search queries and question-based searches can now be answered directly from the Search Engine Results Page (SERP). 

This new world of Zero-Click Searches has upended prior approaches to SEO and analytics, and calls for new expertise and new strategies.
 

What are Zero-Click Searches?

Zero Click searches refer to search results that appear on top of the search engine results page (SERP) that answer the search query without the need to click any further. The search can result in a direct answer, a snippet of the content from the webpage that answers the search query, and sometimes a considerable depth of information.. 

The type of zero-click search result depends on the search query. There are currently six types of search results that are displayed in on the SERP.

Types of Zero-Click Search Results

1. Featured Snippets

Featured snippets are search results that appear in the highly-sought-after position zero of the search engine results page.  Featured snippets provide relevant answers to question-based queries. There are typically five types of featured snippets.

  • Paragraph snippet - Paragraph snippets typically appear on question-based queries such as how-tos, as well as "who," "why," and "what" types of queries.
  • List type snippets - List type results can appear as a numbered list or bulleted lists depending on the search query. List type snippets typically appear for search results such as recipes, ingredient lists, or step-by-step tutorial instruction lists.
  • Table snippets - Table snippets are results that display content in table format.
  • Video snippet - video snippets are results that appear in video format together with featured snippets.
Featured snipped on a SERP pageAn example of a featured snippet answer in response to an inquiry concerning the advantages of Drupal Layout Builder. While the above snippet answers the search query, there's a strong likelihood that the search will also result in a click onto the page for further 

The following is another example of a featured snippet that follows sponsored ad content, while providing a considerable view slice of information along with a photo from a Promet blog post on the topic.

Featured snippet on a SERP page
Featured snippet in response to the Search Inquiry of "What is Human-Centered Web Design. This SERP result from a "What is Human-Centered Web Design" query, also includes  a list of related "People Also Ask" results.

2. Instant Answers

Instant answers are search results from vetted resources -- often quick answers to uncomplicated questions.

Here's the top result from Google Search for “How Many Ounces in a Gallon?” 

Zero click analytics SERP pageAsked and answered with additional references to additional “People Also Ask” information

3. Definition

Definition-based results are for search queries that involve word definition, meaning, usage, and spelling. 

SERP results pageThe above search result for a definition within Drupal appears essentially as a featured snippet.

Definition search results can take the form of a featured snippet or more closely resemble a dictionary entry as in the example below.

SERP page The above definition search result functions as an enhanced dictionary entry.

4. Map Results

Map results are for location-based search queries that display a Google map result in the search result. 

SERP for Map resultsMap results also tend to include "People Also Ask" inquiries.

5. Calculator

Google also provides a calculator for mathematical related searches. Users can perform basic or highly complex mathematical operations straight from the search results page. 

Calculator SERP page The search engine result for the above inquiry resulted in the answer, as well as a fully functional calculator for a full range of complex mathematical equations.

6. Knowledge Panel

A knowledge panel is an expanded featured snippet search result with more detailed information such as additional pictures, map results, and content that is relevant to the search answer. Google has two different types of knowledge panels: brand knowledge panels and local knowledge panels.

 
Brand Knowledge Panel
SERP brand knowledge panel A simple search query for a local Austin, Texas sandwich shop resulted in a depth of information on the SERP concerning menus and product information, a map, as well as locations, and other options.
Local Knowledge Panel
Local SERP knowledge panelThe "near me" search option has become a highly popular Google search feature that is very much relied upon among mobile users.  

 

Impact of Zero-Click Searches on Website Traffic

A featured snippet displays information directly to the search engine results page, which can reduce the click-through rate from the SERP to the website, because the search query is answered -- resulting in a “zero-click.” While the impact of zero-click can be net-zero web traffic from a particular search term, there is always the likelihood that of a click to learn more.

Since digital marketing and search engine optimization (SEO) strategies have traditionally focused on generating site traffic from organic searches in the SERP, zero-click search has created a new dimension to SEO and analytics.

Creating a Strategy for Zero-Click Searches

Being featured as a zero-click search result in the SERP is a significant achievement, because it means that Google has selected the content of a particular webpage over thousands of other webpages. For audiences, this means that the webpage contains the most relevant information based on their search query. Appearing in a featured snippet result provides an immediate credibility boost for the brand and the website.

Despite the inherent achievement, appearing as a featured snippet upends traditional SEO and the potential loss of site visits is not always viewed as an advantage. The following five steps for an updated SEO strategy can help overcome perceived drawbacks, while taking full advantage of the new zero-click world.  
 

1. Conduct Thorough Keyword Research

The first step in ranking for zero-click positions is to identify the keywords that display them in the SERP. Once you have identified the keywords that have zero-click search features then you can create a content strategy to help target those features. 

Targeting question based keywords and creating content to answer those queries will help you rank for the featured snippet position.
 

2. Optimize Pages that are Already Ranked for Keywords with SERP Features

After identifying the keywords that have the zero-click feature in SERP, the next step is to identify current web pages that are already ranking for this keyword. Once you have identified the pages, the next step is to optimize them and add more content to the page.

Optimization includes reducing page loading times by using light images, streamlining the CSS of the webpage, and improving the content on the page.

3. Improve Page Navigation

The next step is to help web visitors already in your website find the page by adding internal links to other relevant web pages in your website. 

Another effective strategy for improving page traffic is to generate more referral traffic to the page by conducting a backlinking campaign to generate more incoming links to the webpage.
 

4. Always Add Meta Data to Web Pages

Adding metadata such as alt text for images, graphs, and other digital assets will allow Google and other search engines to properly identify the contents of your pages. This is extremely helpful, especially if you want to rank for images searches.

Meta descriptions or meta tags help search engines identify the content in the webpages by providing a concise snippet of the content. The meta descriptions can also be displayed as a snippet in the SERP.

5. Register Your Business with Google Business

Creating an account in Google Business will help increase the visibility of your website, especially for local searches. A detailed profile about your business, products, and services will maximize  chances of being featured in the SERP. 

 

Optimizing Zero-Click Searches 

Zero-click searches may not directly result in a visit to your website, but they absolutely boost brand visibility and referral traffic. Targeting the featured snippet position for a particular keyword search phrase is an essential SEO strategy in the current climate. 

Interested in optimizing your search strategies or gaining deeper insights into the new world of zero click search results? Contact us today.

 

 

Oct 07 2020
Oct 07

We are less than a week away from BADCamp liftoff!!

Bay Area Drupal Camp (BADCamp) runs from 9 am - 4 pm PT from Wednesday, October 14 through Saturday, Oct 17. Limited-availability workshops and summits will take place on Wednesday and Thursday.

Register on BADCamp's Virtual Conference Platform

This year we are delivering content in the Hopin platform and separate registration is required for both the workshop and summits block and the sessions. We understand that you may have already registered on the BADCamp website, but we do require folks to register on Hopin as well.

Level up your skills!

Seats are limited for BADCamp trainings on a wide variety of topics - not just coding. There are learning opportunities for all skill levels and passions. Seats are filling up fast so be sure to visit the website and register to reserve your seat.
Scholarships are available. Just dop us a line and we can help!
 

Oct 07 2020
Oct 07

argument-open-source

Here’s a dirty secret: most businesses are unsatisfied with their website. Research shows that 34% of website owners are unsatisfied with the amount of business their website generates for them. Loudhouse data suggests that 62% of business owners believe a more effective website would increase their sales. And millions of business websites deal with slow load times, inconsistent customer experiences, and problematic UI/UX issues.

There’s a reason that 36% of small businesses STILL don’t have a website. Creating an amazing, design-driven, customer-centric website is challenging. So, what do you do when your website isn’t making the cut? You look towards the source — your Content Management System (CMS). Every year, thousands of private and public entities migrate their website to a new CMS.

But, unfortunately, thousands more don’t. Migration is scary. It’s easier to stay with your current CMS and focus on redesigns or new templates. Here’s the problem: new coats of paint don’t fix broken engines. If you’re thinking about migrating from WordPress or Joomla to Drupal, you’ve probably heard rumors and myths regarding migrations.

Let’s clear those up. Here are 4 myths about migration that need to be squashed.

Myth #1: I’m Going to Lose All My Content/Data

This is, by far, the most common excuse against migrating. You’re worried all of that precious content and data are going to fall off the ship if you switch ports. And, you’re right to worry. It could… if you don’t migrate correctly. But it’s not inevitable. You can prevent data and content loss. In fact, if you lose data or content, we would consider that a failed migration. In other words, successful migrations keep data and content intact by definition.

Here are some handy-dandy steps you can take to ensure that your precious data doesn’t go overboard during your migration:

  • Crawl your site before migration and use the crawl data to check for URL issues. If you check each URL, you should be able to see any missing content (and fix it!)
  • Keep your existing site stable until you’ve fully migrated.
  • When you migrate, check for duplicate content; plenty of site owners run into the opposite of losing content.

Myth #2: I Have to Invest in a Redesign

You’re migrating; you might as well invest in a redesign, right? Sure! You could. But it’s tricky. When you do a redesign and a migration, you’re no longer just matching URL-to-URL and content-to-content, you’re simultaneously rebuilding your website. Don’t get us wrong; there are advantages. It’s a great time to redesign from an SEO perspective (you’re already going to take a small hit during the migration; more on this in the next section), but it also requires significantly more planning, budget, and time.

If you want to do a redesign-migration, we heavily recommend that you touch base with your design company. You want to work through the kinks and create a best-in-class action plan to tackle any issues that may (or may not) pop up. The entire migration will be structured around the redesign, so it’s important to carefully weigh your options.

Myth #3: Goodbye SEO!

From an SEO perspective, migration sounds like a nightmare. You’ve worked diligently to build up your SEO. What happens when you frolic to a new location? Let’s get this out of the way: your SEO will take a temporary hit. But, it shouldn’t last long. In fact, there’s a good chance you’re moving to another platform because it’s better at handling SEO. For example, Drupal has built-in SEO capabilities (e.g., title-based URL nodes, customizable meta tags, etc.) WordPress does not. Obviously, you can get SEO plugins for WordPress that help you build SEO functionalities, but most of those plugins are also available for Drupal — so Drupal gives you a net gain.

Here’s a secret: migration can help your page rank. After the first awkward week (Google has to recrawl your website, recognize that it’s you, and give you back your ranking), migration can help you build a more powerful SEO framework.

Want to migrate without dumping your SEO overboard? Here are some tips:

  • Update your internal links
  • Benchmark your Google Analytics profile and compare it with your analytics post-migration to look for gaps
  • Keep any old domains and redirect your website
  • Check for broken or duplicate content that could tank your SEO
  • Manage your sitemaps
  • Update any PPC campaigns and ad creatives

Myth #4: You Just Have to “Lift-and-Shift”

There are plenty of myths surrounding the difficulty of migration. But there are also a few myths making migration out to be super easy. And, without a doubt, the most prevalent “easy-peasy-lemon-squeezy” migration myth is the ever-coveted “lift-and-shift.” There is no one-size-fits-all strategy for migrating websites. Sometimes, it can be as easy as lifting content off of one website and putting it onto another website. But that’s seldom the case.

Generally, you need to set up test servers, check to see if website elements function correctly on the new platform, test out and utilize new CMS features, and a variety of other tasks before you can simply drop content from one place to another. In other words, lift-and-shift may work when you’re migrating a cloud environment, but it often doesn’t work with CMS migration.

Remember, just because everything worked perfectly in one environment doesn’t mean it will in another one. You may have to fix some website elements and carefully construct your new website ecosystem. At the same time, you’ll probably be playing around with the new features available to you on Drupal — so the “lift-and-shift” is usually more of a “lift-and-test-and-shift.”

Do You Need Help With Your Drupal Migration?

At Mobomo, we help private and public entities migrate to Drupal environments using proven migration strategies and best-in-class support. So, whether you’re looking to establish your website in a more secure, SEO-friendly environment or you’re looking to do a redesign-and-migrate, we can help you migrate pain-free. Are you ready to move to a brighter future?

Contact us. We’ve got your back.

Oct 07 2020
Oct 07

There are several stable contrib modules available that offer redirecting users - often as one of many functionalities. In some cases however, you might want to write your own module in order to precisely control what it does. Or perhaps you would like to combine this code with other specific requirements into a custom module. 

Whatever your particular reason, here’s how redirect users the proper way in Drupal 8:

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;

/**
 * Implements hook_form_FORM_ID_alter().
 */
function MYCUSTOMMODULE_form_user_login_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $form['#submit'][] = 'MYCUSTOMMODULE_user_login_form_submit';
}

/**
 * Custom submit handler for the login form.
 */
function MYCUSTOMMODULE_user_login_form_submit($form, FormStateInterface $form_state) {
  $url = Url::fromRoute('/your/destination/path');
  $form_state->setRedirectUrl($url);
}

For Drupal 8 in particular, it is important to note that we no longer use hook_user_login(), because it would stop other implementations of that hook to be invoked. Instead, we’re adding a custom submit handler to the user login form.

Of course this is just a starting point. You could add certain conditions or redirect users to different paths depending on their user role. 

___

Hope this helps! Please don't be afraid to reach out if you need any help with your Drupal project. Our experts are always happy to help!

Oct 06 2020
Oct 06

Reposted from the Core group on groups.drupal.org

In preparation for the minor release, Drupal 9.1.x will enter the alpha phase the week of October 19th, 2020. Core developers should plan to complete changes that are only allowed in minor releases prior to the alpha release. The 9.1.0-alpha1 deadline for most core patches is October 16. (More information on alpha and beta releases.)

  • Developers and site owners can begin testing the alpha after its release.

  • The 9.2.x branch of core will be created, and future feature and API additions will be targeted against that branch instead of 9.1.x. All outstanding issues filed against 9.1.x will be automatically migrated to 9.2.x.

  • Once 9.2.x is branched, alpha experimental modules will be removed from the 9.1.x codebase (so their development will continue in 9.2.x only). The Config Environment module is an alpha stability module in 9.1.x.

  • All issues filed against 9.0.x will then be migrated to 9.1.x, and subsequent bug reports should be targeted against the 9.1.x branch.

  • During the alpha phase, core issues will be committed according to the following policy:

    1. Most issues that are allowed for patch releases will be committed to 9.1.x and 9.2.x.
    2. Most issues that are only allowed in minor releases will be committed to 9.2.x only. A few strategic issues may be backported to 9.1.x, but only at committer discretion after the issue is fixed in 9.2.x (so leave them set to 9.2.x unless you are a committer), and only up until the beta deadline.

Drupal 9.1.0-beta1 will be released the week of November 2nd

Roughly two weeks after the alpha release, the first beta release will be created. All the restrictions of the alpha release apply to beta releases as well. The release of the first beta is a firm deadline for all feature and API additions. Even if an issue is pending in the Reviewed & Tested by the Community (RTBC) queue when the commit freeze for the beta begins, it will be committed to the next minor release only.

The release candidate phase will begin the week of November 16th. See the summarized key dates in the release cycle, allowed changes during the Drupal 8 and Drupal 9 release cycles, and Drupal 8 and 9 backwards compatibility and internal API policy for more information.

The scheduled release date of Drupal 9.1.0 is December 2nd, 2020.

Bugfix and security support of Drupal 9.0.x, 8.8.x and 8.9.x.

Security coverage for Drupal 8 and 9 is generally provided for the previous minor release as well as the newest minor release. However, Drupal 8.9.x is a Long-Term Support release where support is provided until November 2021. Based on these the following changes are upcoming:

Drupal 8.8.x Security releases will be provided until December 2nd, 2020. Drupal 8.9.x Security releases will be provided until November 2021. Bugfix support will continue into early 2021. Drupal 9.0.x Normal bugfix support ends on December 2nd, 2020. However, security releases are provided until the release of Drupal 9.2.0 on June 2, 2021.

2021 Support Timeline

Oct 06 2020
Oct 06

In preparation for the minor release, Drupal 9.1.x will enter the alpha phase the week of October 19th, 2020. Core developers should plan to complete changes that are only allowed in minor releases prior to the alpha release. The 9.1.0-alpha1 deadline for most core patches is October 16. (More information on alpha and beta releases.)

  • Developers and site owners can begin testing the alpha after its release.

  • The 9.2.x branch of core will be created, and future feature and API additions will be targeted against that branch instead of 9.1.x. All outstanding issues filed against 9.1.x will be automatically migrated to 9.2.x.

  • Once 9.2.x is branched, alpha experimental modules will be removed from the 9.1.x codebase (so their development will continue in 9.2.x only). The Config Environment module is an alpha stability module in 9.1.x.

  • All issues filed against 9.0.x will then be migrated to 9.1.x, and subsequent bug reports should be targeted against the 9.1.x branch.

  • During the alpha phase, core issues will be committed according to the following policy:

    1. Most issues that are allowed for patch releases will be committed to 9.1.x and 9.2.x.
    2. Most issues that are only allowed in minor releases will be committed to 9.2.x only. A few strategic issues may be backported to 9.1.x, but only at committer discretion after the issue is fixed in 9.2.x (so leave them set to 9.2.x unless you are a committer), and only up until the beta deadline.

Drupal 9.1.0-beta1 will be released the week of November 2nd

Roughly two weeks after the alpha release, the first beta release will be created. All the restrictions of the alpha release apply to beta releases as well. The release of the first beta is a firm deadline for all feature and API additions. Even if an issue is pending in the Reviewed & Tested by the Community (RTBC) queue when the commit freeze for the beta begins, it will be committed to the next minor release only.

The release candidate phase will begin the week of November 16th. See the summarized key dates in the release cycle, allowed changes during the Drupal 8 and Drupal 9 release cycles, and Drupal 8 and 9 backwards compatibility and internal API policy for more information.

The scheduled release date of Drupal 9.1.0 is December 2nd, 2020.

Bugfix and security support of Drupal 9.0.x, 8.8.x and 8.9.x.

Security coverage for Drupal 8 and 9 is generally provided for the previous minor release as well as the newest minor release. However, Drupal 8.9.x is a Long-Term Support release where support is provided until November 2021. Based on these the following changes are upcoming:

Drupal 8.8.x Security releases will be provided until December 2nd, 2020. Drupal 8.9.x Security releases will be provided until November 2021. Bugfix support will continue into early 2021. Drupal 9.0.x Normal bugfix support ends on December 2nd, 2020. However, security releases are provided until the release of Drupal 9.2.0 on June 2, 2021.

Support timelines visualized

Oct 06 2020
Oct 06

Introduction

Can you hear this sound? That noise coming behind your back - this is a popular CMS for website building overtaking the other one. The website should be fast, simple, and user-friendly. Drupal is perfect for many types of websites. Earlier, we discussed the advantages of using Drupal for a university website, e-Commerce websites, and considered the creation of a food delivery application on Drupal. And today we have selected for you a few examples of healthcare Drupal websites, including the one created by ADCI Solutions.

Why Drupal is so popular in healthcare?

Let's take one step back to 1996. Congress passed the Health Insurance Portability and Accountability Act (HIPAA), which sets national standards for the exchange and security of protected health information (PHI). In May 2018, Europe dug a little deeper and added a General Data Protection Regulation (GDPR) that changes the way organizations collect, store, and transmit the personal data of EU citizens and residents. Essentially, GDPR grants EU citizens expanded control of their personal data.

In this reality, these new regulations are a problem for medical healthcare providers. Their websites must follow these guidelines and protect their patients properly.

The number of exposed records more than doubled between 2017 and 2018, and more than tripled between 2018 and 2019. In 2019, healthcare data breaches were reported at a rate of 1.4 per day, according to the HIPAA Journal. So, why do we recommend you the website based on Drupal? Drupal is a perfect fit for websites for medical websites! Why is this CMS often chosen by healthcare organizations?

  • The most secure option for organizations working with highly secure data. Drupal can boast of top-notch security for your website. The Drupal encryption system is HIPAA compliant to protect sensitive patient’s data.
  • A lot of modules. Drupal has thousands of modules and themes that provide the ability to customize user experience and deliver personalized data to patients and doctors online for improving patient experience and satisfaction. For example, Drupal's integration with the Electronic Health Records (EHR) system helps providers communicate with patients through a secure portal. Custom modules and plugins can also be created for unique business rules and needs. With minimal technical knowledge, they are easy to install and configure.
  • Intuitive administrative part. Moreover, many processes can be automated. Also, it has a certain logic and structure. It greatly facilitates the work of representatives of medical clinics, pharmacies, and other similar institutions.
  • Personalization. Thanks to flexible parameters, the website interface can be quickly customized as you need.
  • No royalties fee. It is open-source software.
  • Outside the control of the supplier. Drupal is a large active developer community. It is widely supported by a large number of qualified agencies and developers beyond the control of the supplier.

Drupal also has modules that can translate the websites into over 90 languages, which helps to improve communication with patients. Drupal's mobile-centric design allows healthcare professionals to use tablets to collect medical information and access records. This had affected the workflows and made additional changes to the user interface, to improve its interaction with patients and supplier satisfaction.

The latest version of Drupal is considered one of the richest and flexible Content Management System (CMS) platforms ever created. Drupal is used by hundreds of hospitals and healthcare systems today, including some of the most famous and effective hospital websites. So let's finish the theory and move on to live examples.

Oct 06 2020
Oct 06

“The big deal about Drupal 9 is … that it should not be a big deal” - Dries Buytaert (Founder and Project Lead of Drupal)

June 2020 marked the onset of the long-awaited version 9 of the Drupal CMS. And just like every product, the moment this new CMS rolled out, it raised a lot of interest in the Drupal community as well as among Drupal users. The interest was to understand the new version of Drupal with a view to unlocking the new digital opportunities. Logically this interest gave rise to a number of questions in the head of users who were planning for Drupal 9, right from the ways to migrate to what this new release actually means to a user.

There are some common concerns about Drupal 9 that every Drupal user is battling with in some way or another way. Therefore, in this blog, we have initiated to unpack Drupal 9 FAQs which will put all your questions at peace and will surely help you unleash the best user experience on your website. 

Girl sitting right next to a big white tablet


1. What’s new in Drupal 9? 

Drupal 9 is an engine of innovation that has experienced the most straightforward update in the history of Drupal. As a matter of fact, Drupal 9 shares the same new features as Drupal 8.9. Thus, Drupal 9.0 will not include any new features. However, Drupal 9.1 will continue to receive new features biannually (within every six months) with a view to helping enterprises stay up-to-date. Check out the definitive guide to Drupal 9 to know more.

2. Did Covid-19 have any impact on the Drupal 9 release?

Covid-19 has impacted each and every sphere of our lives and the effect of this global pandemic is felt by everyone around the world. Drupal is no different and indeed there were certain challenges that Covid-19 generated against Drupal. However, despite all those hurdles that came across the way, Drupal 9 was released on its planned day i.e. on June 3, 2020. This launch of Drupal 9 is itself a milestone in the history of the open-source community that builds Drupal. 

3. Why was Drupal 9 built in Drupal 8?

Instead of working on Drupal 9 in its own git branch from the scratch, Drupal 9 was built in Drupal 8. Yes, you heard it right. Using the deprecations and optional updated dependency support, Drupal 9 was mostly built in Drupal 8 because of the following reasons:

  • All new (Drupal-9-ready) code was deployed on Drupal 8 sites before Drupal 9 came into existence. 
  • The community worked out the issues in the new code in Drupal 8.
  • Feedback was provided based on the new code so that necessary improvements can be made in Drupal 8.
  • Unlike previous versions of Drupal, building Drupal 9 in Drupal 8 helped the community to avoid ending up with an entirely reworked API.
  • It is important to note here that unlike previous versions of Drupal, Drupal 9 is not a reinvention of Drupal.

4. What will happen to Drupal 7?

Considering a large number of sites that would still be using Drupal 7 in 2020, Drupal 7  was originally decided to receive community support until November 2021. However, in the light of the impact of COVID-19 on the community, the association has now extended Drupal 7 support and moved the end-of-life date to November 28, 2022, which implies that Drupal 7 will be supported for close to 2.5 years after the release of Drupal 9. 

5. What will happen to Drupal 8?

Drupal 8 relies on Symfony 3, and Symfony 3’s end of life is November 2021. As a result, the community support that Drupal 8 receives- including security coverage, will last until November 2021. In other words, no new features will be added to Drupal 8, nor will minor releases be made available. After November 2021 users on Drupal 8 must upgrade to Drupal 9 in order to continue receiving support from the Drupal community.   

6. What are the benefits that Drupal 9 holds over Drupal 8 or even Drupal 7?

Drupal 9 is the culmination of all of the features that are developed over the course of Drupal 8. This updated technology helps Drupal 9 to continue Drupal 8's pattern of continuous innovation along with significant features that are released every six months.

Drupal 9.0 shares the same features as Drupal 8.9 (with the notable exception of updated dependencies). Further,

Drupal 9.1, 9.2, etc. will add new backward-compatible features every six months to Drupal 9.0. 

Drupal 9 platform will be supported with security fixes after November 2021 which makes it more advantageous than Drupal 8. Not to mention, Drupal 9.1 onwards will continue to add new features to Drupal core.

7. What is the best possible way to upgrade from Drupal 7 to Drupal 9?

Migrating from Drupal 7 to Drupal 9 is one of the recent advancements that took place in the world of Drupal. However, before the release of Drupal 9, the best path for Drupal 7 sites to upgrade to Drupal 9 was to upgrade to Drupal 8. This path of migration to Drupal 8 is still a good option for Drupal 7 sites, despite the release of Drupal 9.

Migration from Drupal 7 to Drupal 8

The Drupal 7 to Drupal 8 upgrade includes some pretty significant changes. Migrating Drupal 7 to Drupal 8 can be done in the following ways: 

  • Migrate everything, which includes content and configuration, into an empty Drupal 8 installation (the default method).
  • Manually create a new Drupal 8 site, set the content types and fields up as per the requirement, and then migrate your Drupal 7 content in it. 

Migration from Drupal 7 to Drupal 9

Migrating from Drupal 7 to Drupal 9 can be a possible jump in the world of Drupal. In other words, the Drupal 7 migration ecosystem is still available in Drupal 9, which can help you easily skip Drupal 8 entirely and migrate to Drupal 9. There are three factors that will likely shape this decision-making process that include time and budget, developer skillset and planning a release window. 

8. What is the best possible way to upgrade from Drupal 8 to Drupal 9?

Fortunately, migrating Drupal 8 to Drupal 9 is radically the easiest update that has happened in a decade. However, it is equally important to note here that the path of Drupal 8 to 9 is not a sudden jump, rather it is a compendium of several steps that are much easier to adapt and perform. 

Upgrade to Drupal 8.8 or Drupal 8.9: In order to update your Drupal 8 to Drupal 9, update your site to the most recent version of Drupal 8.x. Drupal 8.8 was a big milestone for API compatibility which is fully compatible with Drupal 9. That is to say, contributed modules that are released prior to 8.8 may not be compatible with Drupal 9.
 
Environment requirements: Ensure that your environment is well suited to Drupal 9’s requirements.  There are new minimum requirements for various databases like MYSQL and MariaDB. Also, your Drush version must be updated to Drush 10. 
 
Audit for conflicting dependencies: If there exist dependencies that are no longer in use, then you will have to find some way to remove those dependencies. This can be done by either rewriting custom code or finding alternative solutions to fix these issues.
 
Check and remove deprecated code: Your site includes deprecated code that needs to be removed. There are a few tools that can be used to check if your site contains deprecated code or not. Some of the common tools include Drupal Check, PhpStan Drupal, Drupal Quality Checker, Upgrade Status and Configuring your test suite. Further, in case your site detects deprecated codes, you can use tools like Rector for Drupal 8 and Upgrade Rector to fix the deprecated codes. 
 
Flag modules as Drupal 9 compatible: Once you have removed the deprecated code from your custom modules, do not forget to flag them as being compatible with both Drupal 8 and Drupal 9.
 
Update contributed modules: Make sure to update all your contributed modules to a Drupal 9-compatible version while your site is still on Drupal 8. This needs to be done before attempting an upgrade to Drupal 9.
 
Once that is done, update your Drupal core to Drupal 9 and run update.php.

9. What are the system requirements to run Drupal 9?

  • In order to run a site built on Drupal 9, your system must comply with the following requirements.
  • If you are planning to run Drupal 9 on Apache, you should have at least version 2.4.7 of the same.
  • PHP 7.3 is the minimum requirement of Drupal 9. PHP 7.4 can be supported too but it is not required. 
  • Despite the fact that Drupal core does not require Drush, many people do use it. However, as of now, Drush will only provide Drupal 9 compatibility in Drush 10. 
  • Besides these requirements, there are some other requirements which include:
  1. Version 5.7.8+is required if using Drupal 9 with MySQL or Percona.·        
  2. Version 10.3.7+ is required if using Drupal 9 with MariaDB.
  3. Version 3.26+ is required if using Drupal 9 with SQLite.
  4. Version 10 is required with the pg_trgm extension if using Drupal 9 with PostgreSQL. 

10. Has theming changed from Drupal 8 to Drupal 9? 

Drupal 9 has updated the Twig templating engine from Twig 1 to Twig 2. This up-gradation of Twig from version 1 to 2 implies that much of the work that has already been done to theme your site using Twig is completely reusable. 

11. Is there any update for third party dependencies in Drupal 9? 

Symfony 3 to 4.4:

The release of Drupal 9 is planned for security support for the most important third party dependency, called Symfony. Since Symfony 3's end of the date is November 2021, Drupal 9 is updated to Symfony 4.4. 

Twig 1 to 2:

Drupal 8 shows a heavy reliance on Twig 1.  Since there is no clear end of life date announced yet, Twig 2 has been launched for years which will be used by Drupal 9 users.

CKEditor 4 (not 5):

CKEditor 4 and 5 are two completely different codebases. Both Drupal 8 and 9 include CKEditor 4. Security support of CKEditor 4 will end around the end of Drupal 9’s life. Therefore, the community has decided to include CKEditor 5 in a future version of Drupal 9, deprecate CKEditor 4 in Drupal 9, and remove it in Drupal 10. 

jQuery and jQuery UI:

Re-evaluation of jQuery UI has resulted in the elimination of most of the components from the core. Only a limited number of components will remain as forked versions that can be used to repair future security issues. Drupal 9 will still be dependent on jQuery itself.

PHPUnit:

Drupal 8 diminished the very own SimpleTest testing system, giving support to PHPUnit. Drupal 9 requires PHPUnit 8 which is responsible for the updates of their PHP requirements strictly according to the support provided by PHP.

Doctrine:

Drupal 8 uses Doctrine's Simple Annotation Parser. However, this has received strong disapproval and will be discarded from a future release without any replacement. The part of the code is divided and included with the Drupal core. 

12. How much time will the contributed module and theme ecosystem take to be ready for Drupal 9?

The process of updating the majority of the top 200 Drupal 9 contributed modules is relatively simple. For this, the contributed project maintainer is required to remove deprecated code from the module or theme and further update the info.yml file in order to confirm compatibility with Drupal 9. Also, patches can be contributed by the developers in the Drupal community to make modules Drupal 9 compatible. 

13. Which modules are no longer supported in Drupal 9? 

The Place Blocks and SimpleTest modules have been removed from core in Drupal 9.

14. Is Drupal 9 difficult to use?

Is Drupal 9 difficult to use? Will I be able to work with Drupal 9? Will I be able to deliver easy access to regular users? You surely have these questions in your head if you are preparing for Drupal 9. 

Well, the answer is no. Drupal 9 is an upgraded version of Drupal 8 which is built on the true spirit to provide an improved user-friendly experience. With every update that Drupal undergoes, it comes as a more powerful and user-friendly approach and this is why Drupal has come a long way. Using the tremendous technical power that Drupal offers, Drupal 9 creates an ideal user experience. Regardless of the job profile (content creator, a website developer, or IT support) you hold, you can count on continuous innovation in usability from Drupal.

15. Why choose Drupal 9 over other CMS platforms?

The software should always support your business model and not the other way around. Saying so, Drupal is an ideal CMS that provides a platform to deliver ambitious digital experiences. As the digital landscape continues to extend to more channels and touchpoints, a CMS like Drupal 9 is all you need in your store. Not to mention, Drupal 9 has a hold on the creation of powerful content creation tools, and efficient workflows that can nourish customer journeys. While the true power of Drupal 9 lies in its flexibility and richness, other CMS platforms focus on pre-defined templates or industry-specific solutions. 

16. What ideal tools do Drupal 9 provide to manage content deployment?

Drupal 9 offers the Workflows core module to manage the content deployment as well as editorial workflows in Drupal. The workflows module being an ideal tool is leveraged by major media organizations throughout the world. In addition to this, there are 2 other modules, namely the Content Moderation module and Workspaces module which are responsible to enhance the capability to manage content deployment in different workspaces. 

17. What are the various accessibility features that Drupal 9 will have built-in? 

The Drupal community has always stuck to its root, which means providing the best to its members. The release of Drupal 9 is no different and this is the reason why Drupal 9 is carrying forward the commitment to accessibility which began with the advent of Drupal 7. The existence of Drupal's Core Accessibility Gate feature (responsible for the core changes) in Drupal 9 is itself evidence of dedication to accessibility efforts. Major accessibility features included in Drupal 8 like full keyboard support, voice-to-text for visually impaired users, and media and layout enhancements will continue to be refined and worked on in Drupal 9. 

18. Is there any important security change to expect in Drupal 9? 

One of the main reasons behind Drupal 9 up-gradation lies in security enhancements. Drupal has always shown itself as a secure and ideal choice and the launch of Drupal 9 ensures that Drupal is secure and compatible with modern system requirements. As a matter of fact, Drupal 9 discards deprecated data code, implying working on a smaller codebase, thereby improving security standards and reducing security risks or errors. 

19. Does Drupal 9 offer the same kind of multilingual support that Drupal 8 offers? 

Drupal 9 is graced with all of the robust multilingual features that Drupal 8 has and does not require any re-architecture when updating. 

20. How will Drupal 9 support API-first/headless/decoupled deployments? 

Drupal 9 is built on Drupal 8's API-first architecture and thus it continues to be a leader in headless and decoupled solutions in the CMS market. However, headless//decoupled solutions may differ widely depending on the front-end technology being chosen.

21. Will Drupal 9 enhance movement towards more robust headless support and non-web content? 

With the advancement in technology, there is a huge interest in headless and non-web content with things like chatbots and IoT devices. As of now, there are no plans set to expand into more decoupled features, but the community will always look for change and innovation. There are a myriad of contributed modules that are solely dedicated to decouple and headless support. 

22. How does the new Layout Builder feature allow content editors to build and modify pages?

Drupal's Layout Builder allows content editors to build and modify pages visually using drag-and-drop. Using this feature, a heavy reliance on developers can be eliminated and marketing workflows can be increased. Speaking of the role of Layout builder, this tool lays its entire focus on providing layout tools for non-decoupled Drupal installations. In order to expose Layout Builder components through Drupal's API, a hybrid approach could be used in decoupled implementations.

23. How will Drupal 9 work in combination with disruptive technologies?

Voice, visual search, AR and VR displays are effectively new interaction and presentation models that are responsible for dealing with already existing data. The fundamental content modeling expertise of Drupal and its API-first design makes it a perfect fit to prototype these aforementioned interactions, or to build production applications.

24. What can we expect in Drupal 9 in the upcoming releases?

Making Drupal intuitive is the foremost priority of Drupal 9. Automated Updates Initiatives, adapted during Drupal 8, is being actively worked upon, which would help organizations to keep their sites in a proper and maintained state without requiring a lot of dev resources.

Olivero, a new frontend theme is lined up that can be used optimally for accessibility and front-end experiences. Olivero is being created for people like marketers, site designers, and content editors. 
Besides this, Drupal 9 includes dependency updates and removing deprecated code requirements which were not possible in Drupal 8.9 due to backward compatibility. 

Drupal 9.1 will be open for feature development of all the issues that cannot get into Drupal 9.0. It will also be the place to introduce new deprecations for Drupal 10 and all changes that are only allowed in minor releases. Drupal 9.1 will be released in December 2020.

25. How long will Drupal 9 be supported?

As stated earlier, Drupal 9 heavily relies on Symfony 4 which has an end of life in November 2023. After this, security bugs in Symfony 4 are not possible to get fixed. As a result, all users of Drupal 9 will have to upgrade to Drupal 10 by the end of 2023. 

26. What about Drupal 10?

Drupal 10 is planned to align with the life cycle of third-party projects that are closely integrated with Drupal, for example, Symfony and Twig. Since the Drupal community wants site owners at least one year to upgrade from Drupal 9 to Drupal 10, the community is hoping to jump in and make the next release i.e Drupal 10 in June 2022.

Moreover, new functionality for Drupal 10 is actually added to Drupal 9 releases, implying easy adoption of any new APIs by module developers. Drupal 10 removes all deprecated code providing developers a chance to stay up to date with API changes and thus making the upgrade to Drupal 10 a lot easier. 

Conclusion

The best of the Drupal community has worked hard to produce and deliver this masterpiece to the digital world. Years of hard work and determination have given birth to this higher-performing, robust, and more flexible solution. The change from Drupal 7 or 8 to Drupal 9 is not that easy, however, once you embark on the journey of Drupal 9, life will surely get much easier. 

Skeptical about how to migrate your site to Drupal 9 at ease? Contact us at [email protected] and our experts will help you with the best possible approach towards a successful Drupal 9 migration. 

Oct 06 2020
Oct 06

As the number of mobile users are increasing rapidly on a daily basis, it is essential to provide a speedy performance and uninterrupted user experiences for mobile users. AMP (Accelerated Mobile Pages) helps in improving the page load time for mobile experiences. Launched in October 2015 by Google, the open-source AMP project has been remarkably successful at expediting content to mobile devices. In this article we will talk about how you can install and configure the AMP module for your Drupal website. The Drupal AMP module supports Drupal 8 and Drupal 9.

Drupal AMP

AMP is an open-source HTML framework developed by Google’s AMP Open Source Project. AMP Pages provides mobile users with faster loading pages. Because Google is a sucker for speed and high performance, AMP also helps boost your SEO ranking. Google serves the AMP pages directly without going through the website which makes the page load lightning fast. The Drupal AMP Module provides valid AMP markup and a way to match the standards required for an AMP Page. This module converts the CSS into inline CSS. Currently, the AMP module only supports the conversion of the node pages.

Installing the AMP module for Drupal

You can set up the AMP module by downloading it through the composer with the command composer require 'drupal/amp'.
To enable the Drupal AMP module, go to ‘admin/modules’ and enable Accelerated Mobile Pages.
Note: Enable AMP Toolbar If you have the core Toolbar module enabled. Enable AMP RDF If you have the core RDF module enabled.

Installing AMP Module

Configuring the AMP module

Once the module is enabled, you can use the Bartik AMP theme which is provided by the module. In the previous versions of the AMP module, the AMP theme needed to be used as a primary theme and you needed to extend a subtheme to customize how the AMP pages are displayed. However, the latest version gives you the ability to create an AMP theme as a subtheme of the primary theme.

The AMP theme should load the AMP library on every page and remove all the non-AMP JavaScript libraries and CSS. In the AMP theme, you can override the templates which violate the AMP standards.

After the installation, you need to configure the AMP theme and enable the content type for which the AMP subtheme can be applied. Go to ‘/admin/config/services/amp’

Configuring-the-AMP-module

Once the Content type is enabled, click on “configure” which will take you to the Manage display page of that particular Content Type. In the Custom Display Settings, enable the AMP view mode.

Manage display-in-amp-module


Once the View mode is selected, use the AMP formatter for image, text, or iframe.

To check the AMP page, insert ‘?amp’ at the end of the page URL. For example:
‘/node/258?amp’\ . Make sure you replace the blocks with AMP blocks so the page can meet the AMP standards. 

Next, the site needs to be added to the Google search console. Once the website has been indexed, the AMP pages will be served to users in the search results. It is important that the page meets the standards defined by AMP.

Validation

You can use the Google chrome extension AMP Validator to check the validity of the AMP page. It helps in instantly checking if the current page is valid by rolling out a report indicating if there are any errors that need to be fixed. If there are no bugs, it will display a Green icon. If not, you will see a red icon with a list of bugs and warnings that will point out what needs to be fixed by you.
Alternatively, you can also use the Google search console URL inspection to check AMP status and to find out if there are any AMP errors. This tool enables validation for both AMP and non-AMP URLs and provides information on both.

Schema.org Metadata Module for Drupal

The Drupal Schema.org Metadata module is not a must-have module to create Drupal AMP websites but will be necessary to create a valid AMP markup to enhance the AMP site for Google search. It is recommended by Google to comply with the Schema.org standards and use structured data for a rich mobile search experience. By adding structured data in the AMP markup, you will be making your AMP site easier to find and target the right audience. This Drupal module lets you render valid schema.org structured data in the head of the AMP web pages in JSON-LD method. 

Oct 06 2020
Oct 06

Justin EmondContinuing again with our 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 Justin Emond of Third and Grove. Here, they describe their project for Brown Advisory.

The COVID-19 pandemic may be the most sweeping, transformative global event since World War II. Coronavirus has changed the very nature of work for millions of people almost overnight. Organizations have had to virtualize any mass gathering events that were planned for 2020. As a leader in the industry, Brown Advisory was able to be one of the first financial services companies to virtualize a headline event, to pave the way forward for others.

Brown Advisory is a leading, independent investment and strategic advisory firm serving individuals, families, and institutions in all 50 U.S. states and in 39 countries and territories around the world. Across eleven worldwide offices, all 700+ Brown Advisory colleagues are equity owners who are focused on making a positive and material difference for their clients and communities. 

Brown Advisory launched the Navigating Our World (NOW) Conference in 2008 to mark its 10th anniversary as an independent firm. The conference, normally held live in Washington, D.C. every other year, convenes experts across disciplines who help the firm to learn alongside clients, and ultimately become better investors and contributors to the community. In 2020, the rapid onset of the global pandemic required the firm to shift the format for the NOW conference to an entirely virtual experience. The Brown Advisory team decided that pivoting to a podcast would give their clients access to the in-depth, interactive conversations that they would have experienced during the live event.

With a hard deadline and only weeks, not months, to design, create and launch the NOW podcast and website, the Brown Advisory team leveraged their existing investment in Acquia and Drupal to build a microsite in record time. Working with their agency Third and Grove, the company took the site from ideation to launch in just three weeks, bringing the NOW experience to the home offices of thousands of attendees across the globe.

Results

  • The podcast download goal was exceeded by 60%, and is on track to exceed by more than 100%
  • 30% of downloads took place on the website instead of podcast streaming sites
  • Podcast listeners exceeded the high water mark of attendees of any previous live NOW event
  • The website experience allowed for a smoother transition from a live conference to digital for non-podcast listeners
  • The NOW website has been a catalyst and provided direction for enhancements to the corporate Brown Advisory website
     

Screenshot of website

Oct 06 2020
Oct 06

Justin EmondContinuing again with our 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 Justin Emond of Third and Grove. Here, they describe their project for Brown Advisory.

The COVID-19 pandemic may be the most sweeping, transformative global event since World War II. Coronavirus has changed the very nature of work for millions of people almost overnight. Organizations have had to virtualize any mass gathering events that were planned for 2020. As a leader in the industry, Brown Advisory was able to be one of the first financial services companies to virtualize a headline event, to pave the way forward for others.

Brown Advisory is a leading, independent investment and strategic advisory firm serving individuals, families, and institutions in all 50 U.S. states and in 39 countries and territories around the world. Across eleven worldwide offices, all 700+ Brown Advisory colleagues are equity owners who are focused on making a positive and material difference for their clients and communities. 

Brown Advisory launched the Navigating Our World (NOW) Conference in 2008 to mark its 10th anniversary as an independent firm. The conference, normally held live in Washington, D.C. every other year, convenes experts across disciplines who help the firm to learn alongside clients, and ultimately become better investors and contributors to the community. In 2020, the rapid onset of the global pandemic required the firm to shift the format for the NOW conference to an entirely virtual experience. The Brown Advisory team decided that pivoting to a podcast would give their clients access to the in-depth, interactive conversations that they would have experienced during the live event.

With a hard deadline and only weeks, not months, to design, create and launch the NOW podcast and website, the Brown Advisory team leveraged their existing investment in Acquia and Drupal to build a microsite in record time. Working with their agency Third and Grove, the company took the site from ideation to launch in just three weeks, bringing the NOW experience to the home offices of thousands of attendees across the globe.

Results

  • The podcast download goal was exceeded by 60%, and is on track to exceed by more than 100%
  • 30% of downloads took place on the website instead of podcast streaming sites
  • Podcast listeners exceeded the high water mark of attendees of any previous live NOW event
  • The website experience allowed for a smoother transition from a live conference to digital for non-podcast listeners
  • The NOW website has been a catalyst and provided direction for enhancements to the corporate Brown Advisory website
     

Screenshot of website

Oct 06 2020
Oct 06

This blog post picks up where my previous post about exploring a Schema-First approach to Drupal and Content Management System left off. After more research and thought into the goals and processes for taking a Schema-First approach to the Information Architecture behind a Content Management System, I realized that what I was calling a "Schema-First" approach is more aptly-named a "Schema.org-First" approach because I am exploring using Schema.org to structure reusable data within a "Schema-First" approach to developing software.

To clarify…

Schema-first development establishes a contract between developers and the operational expectations from project managers. A schema is foundationally an agreed upon set of standards and approaches – and in establishing the schema as a constrained contract, you can ensure that no matter what comes out of development, it will align with the stated overall goals.

-- Using a Schema-First design as your single source of truth

Schema.org is a collaborative community activity with a mission to "create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond."

-- https://en.wikipedia.org/wiki/Schema.org 

Key to the success of a Schema-First approach is "an agreed-upon set of standards and approaches," which I believe for web content (i.e., structured data on the Internet) is Schema.org.

Previously, I highlighted some of the benefits of using Schema.org to structure a Content Management System's information architecture. The background, reasoning, and process for taking a Schema-First approach to API design is discussed in Kristopher Sandoval's blog post, Using a Schema-First design as your single source of truth. In this post, I want to spend some time talking about an overarching benefit for using a "Schema.org-First" approach to create a "single source of truth," leading to a unified content management system.

Single source of truth

The goal of Schema.org-First is to unify an organization's data, make it easy to author and distribute content, and to create a "single source of truth."

In information systems design and theory, single source of truth (SSOT) is the practice of structuring information models and associated data schema such that every data element is mastered (or edited) in only one place.

-- https://en.wikipedia.org/wiki/Single_source_of_truth 

To create a single source of truth for content, organizations need to create one place for content to be accessed and ideally edited.

Most enterprise organizations have multiple Content Management Systems and authoring tools for creating content. It is no surprise each department's schema for a blog post is different.

Reinventing the (information architecture) wheel when it comes to web-related content is unnecessary

Establishing that all web content within an organization should use Schema.org as the foundation for structuring the data pushes all departments to create homogeneous content. An added benefit of having Schema.org as the standard is it reduces duplicate work and costs related to building and maintaining a website's content architecture. Simultaneously, there is still a common problem that organizations with multiple departments most likely have various Content Management Systems.

In theory, each department could maintain separate Content Management Systems that transforms and pushes Schema.org data into a centralized Content Hub/Repository, which could result in a lot of repetitive work, additional overhead, and complexity. The most practical approach is to have a centralized and unified Content Management System using a Schema.org-First approach.

Unified Content Management System

Besides the immediate benefits of Schema.org improving Omnichannel publishing, SEO, and the syndication and aggregation of content, a Schema.org-First approach helps address one of the biggest channels to unifying content, which is "Governance."

Governance in this context is about unifying content and departments within an organization. Frankly, I find it easy to transform and migrate content between systems but always challenging to transform a team's approach to authoring and managing content. Sometimes it is hard for people within an organization to accept change unless it helps the organization and makes their lives easier. Having a unified Content Management System helps an organization establish better governance, improve the quality of the content, and reduce the costs of maintaining multiple Content Management Systems.

I want to pause and emphasize that reducing costs is about reducing the amount of duplicate work and money spent around maintaining multiple Content Management Systems, and not about eliminating people's jobs. My goal is to show how reducing redundant costs and would allow departments to be able to do more with their resources and people.

Simply put, a unified Content Management System makes it easier for an organization to produce higher quality content, faster.

Moving dozens of department websites into a unified Content Management System can be a daunting task. Addressing this challenge is where the "Schema-First" aspect of a "Schema.org-First" approach stands out when migrating content and people to a unified Content Management System.

A Schema.org-First Migration

Schema-First is an agreed-upon set of standards and approaches. Schema.org is the standard. Now let's talk about the process of migrating content to a unified Content Management System.

Migrations are a two-step process where the data must be mapped/transformed from the old system and then consumed into the new system. There are lots of ways to approach transforming and migrating data from one system to another. In this discussion, the destination system, which is the unified Content Management System, can pull data from each source Content Management System. One can also have the source systems push content into the destination system. Finally, there can be a collaborative migration, where the source system is transforming the data via an API, and the destination system is consuming the data. A collaborative migration can work out the best because an organization can have the developers and architects in the source system working in parallel with the developers and architects in the destination who are consuming the data.

The beauty of a Schema.org-First approach is that the source and destination content management teams know exactly how the migrated data needs to be structured before any code is created; the specification is available at Schema.org.

The source Content Management System's team knows the existing data architecture, and they have the immediate tools to transform it into Schema.org data. In most cases, the team should already know Schema.org, and they may have already started using it on their website. Because the source Content Management System most likely has a unique content architecture, each source team will have to write a custom data transformation. The good news is this could be the last time these developers ever need to write a data transformation script for the organization.

The even better news is the destination Content Management System's team only needs to write one script, ideally a microservice, to consume data from multiple Content Management Systems. Suppose the unified Content Management System development team spends the time to create a robust and stable Schema.org data aggregation system. In that case, the unified Content Management System will have a tool to ingest data from any internal or external content source. For enterprise organizations that might acquire a new company with a website, the unified Content Management System will have a well-defined process, as well as a tool for moving a website into a unified Content Management System.

I want to pause again and state the real value behind a Schema.org-First approach is not about technology or saving costs - it’s about making it easier for people to excel at their jobs. When I discuss how a Schema.org-First approach helps acquire a company's website, I think it also provides a way to onboard an acquired company's web content team. A successful and collaborative migration strategy provides an immediate and easy win for everyone involved and allows the acquired companies team to become part of the unified Content Management System.

Schema.org and Schema-first development's common goal is collaboration that makes it easier for people and organizations to be successful.

Conclusion

A Schema.org-First approach makes it easier to connect data and people.

Schema.org provides a standard to connect and structure web content. A Schema-First approach establishes an immediate connection between the people who are collaborating to build software. Using a Schema.org-First approach will create a single source of truth for an organization's web content and move its data and teams towards a unified Content Management System.

Getting organizations to leverage Schema.org while adopting a Scheme-First approach is a big challenge. The "API Evangelist" has some helpful thoughts and contemplations about "Why Schema.org Does Not See More Adoption Across The API Landscape?". I also highly recommend reading Kristopher Sandoval's blog post, Using a Schema-First design as your single source of truth.

If you are thinking about structured data and migrating to a unified Content Management System, which becomes your organization's single source of truth, my hope is that you will think about using a Schema.org-First approach.

Almost done…

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

OK

Oct 05 2020
Oct 05

Drupal 8 has lot of inbuilt functionality within it, one of the main important features is Configuration Synchronization. It will help us to migrate full setup properly on site deployment. But the main problem is that, According to the Drupal 8 CMI documentation,

The Configuration Manager module in Drupal 8 provides a user interface for importing and exporting configuration changes between a Drupal installation in different environments, such as Development, Staging and Production, so you can make and verify your changes with a comfortable distance from your live environment.

The same idea appears in this article,

Perhaps the most important concept to understand is that the configuration system is designed to optimize the process of moving configuration between instances of the same site. It is not intended to allow exporting the configuration from one site to another. In order to move configuration data, the site and import files must have matching values for UUID in the system.site configuration item. In other words, additional environments should initially be set up as clones of the site. We did not, for instance, hope to facilitate exporting configuration from whitehouse.gov and importing it into harvard.edu.

So Still we hardly depends on the Features module, But we can use the CMI (Configuration management Interface between two different sites with simple hacking solution.

The CMI works with based on the site UUID, If the sites have different UUID then, it won’t work, So changing destination site’s UUID with Source site’s UUID would solve the problem.

Just follow the below steps to use CMI between two different sites,

1. Export Configuration from your source site (Site A)

2. Extract the file, Open the system.site.yml file and get the Source site (Site A) UUID

3. Run the drush command in your destination site (Site B)

drush config-set "system.site" uuid "Your Source Site UUID here"

4. After that, try as usual Import Process in destination site (Site B)

It will accept the Site A configuration in Site B. So we can migrate all datas into our another site.

FYI : I am not sure, It is a effective / Proper way to do it.. If there is any problem with this method please mentioned in the comment.

Oct 05 2020
Oct 05

In such a time, i want to place blocks in sidebar region with the dynamic weight. It means the blocks should render in different position for each page request. I have searched and tried lots of method but unfortunately i can’t find proper method to do that. So i have decided to do that with some hacky way.

Drupal 8 is providing a hook to alter the region template_preprocess_region, it would prepares values to the theme_region. I have planned to use the hook to alter the block's position to be rendered in the region.

Adding the following codes in THEMENAME.theme file would solve the problems,

function themename_preprocess_region(&$variables) {
  if ($variables['region'] == 'sidebar_second') {
    $variables['elements'] = shuffle_assoc($variables['elements']);
    $content = '';
    foreach ($variables['elements'] as $key => $value) {
      if (is_array($variables['elements'][$key])) {
        $content .= \Drupal::service ('renderer')->render($value);
      }
    }
    $variables['content'] = array(
      '#markup' => $content,
    );
  }
}

function shuffle_assoc($list) {
  if (!is_array($list)) {
    return $list;
  }

  $keys = array_keys($list);
  shuffle($keys);
  $random = array();
  foreach ($keys as $key) {
    $random[$key] = $list[$key];
  }
  return $random;
}

It is working well in my site but i know it is the hacky way, not sure about the proper way to do that. If anyone of you know about this kindly share it in the comments :)

Oct 05 2020
Oct 05

Twig can be extended in many ways; you can add extra tags, filters, tests, operators, global variables, and functions. You can even extend the parser itself with node visitors. In this blog,

I am going to show you how to create new custom twig filters in drupal. For example we are going to create a filter to remove numbers from string, will explain with hello_world module.

Create hello_world folder in modules/custom/ folder with the following files,

1. hello_world.info.yml // It would contains normal module .info.yml file values, Check here for more details

2. hello_world.services.yml // It would contain following lines,

services:
  hello_world.twig_extension:
    arguments: ['@renderer']
    class: Drupal\hello_world\TwigExtension\RemoveNumbers
    tags:
      - { name: twig.extension }

3. src/TwigExtension/RemoveNumbers.php It would contain followings in that,

namespace Drupal\hello_world\TwigExtension;


class RemoveNumbers extends \Twig_Extension {    

  /**
   * Generates a list of all Twig filters that this extension defines.
   */
  public function getFilters() {
    return [
      new \Twig_SimpleFilter('removenum', array($this, 'removeNumbers')),
    ];
  }

  /**
   * Gets a unique identifier for this Twig extension.
   */
  public function getName() {
    return 'hello_world.twig_extension';
  }

  /**
   * Replaces all numbers from the string.
   */
  public static function removeNumbers($string) {
    return preg_replace('#[0-9]*#', '', $string);
  }

}

Enable the hello_world module and clear the cache, then you could use the “ removenum “ filters in your twig file,

{{ twig-value-with-numbers | removenum }}

It would remove the all numbers from the string, enjoy with your custom filters !

Download the hello_world module here

Oct 05 2020
Oct 05

One of the most favourite and  valuable features in drupal is multisite configuration, Drupal 8 provide simple way to create multisite it reduced lots of works. The following steps shows to configure multisite in drupal 8,

  • Should have more than one domain and databases, I am going to use the domain (www.domain1.com, www.domain2.com) and databases (domain1, domain2).
  • Create two folders in drupal-8/sites/ folder with domain1, domain2 name, the folder path would be like this drupal-8/sites/domain1/ and drupal-8/sites/domain2/
  • Create files/ folder in both the folder (drupal-8/sites/domain1/files)
  • Copy the default.settings.php file and paste it into the both folder then rename it as settings.php ( drupal-8/sites/domain1/settings.php, drupal-8/sites/domain1/settings.php)
  • Edit the settings.php file for domain1 to adding the database,
$databases['default']['default'] = array (
  'database' => 'domain1', // Change value to domain1 for www.domain.com and domain2 for www.domain2.com.
  'username' => 'root',
  'password' => 'root',
  'prefix' => '',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);
  • Copy the drupal-8/sites/example.sites.php file and paste in on the same location then change the file name to sites.php (drupal-8/sites/sites.php)
  • Add the following line in the bottom of the drupal-8/sites/sites.php file
$sites = array(
 'domain1' => 'domain1.com', // Folder name => Domain name.
 'domain2' => 'domain2.com',
);

Thats all, both domain would works well with the different db with a single instance.

Oct 05 2020
Oct 05

I needed a way to check the currect user has permission to view the currect/particular page, Searched lot finally got the exact way, going to show the tricks to you in this blog.

Drupal has an api called " drupal_valid_path " , Normally it used to test the url is valid or not. but the trick is that, It also check the user has permission to view the currect/particular page.

It will return TRUE If path is valid and user has permission to view the page, otherwise it will return FALSE,

For example,

$path = current_path();
if (drupal_valid_path($path)) {
  // Your code here.
}
Oct 05 2020
Oct 05

Most of the times developers don't like the GUI, It makes feel lazy. Drupal has a tool (Drush) to do some management work from command line.

And also the installing the drupal site makes very lazy while doing with browser, The Drush has an option to install the full site with a single command.

The Following command will install the drupal in standard method,

drush site-install standard --account-name=admin --account-pass=[useruser_pass] --db-url=mysql://[db_user]:[db_pass]@localhost/[db_name]
Oct 05 2020
Oct 05

argument-open-source

2020 has been a year full of unexpected surprises and challenges. In March, the coronavirus had reached the United States and had begun spreading quickly causing federal and state governments to take action to ensure public safety, including the development and passing of the Coronavirus Aid, Relief, and Economic Security Act (CARES Act). As the pandemic spread, many more eyes turned to the government to watch how they were navigating this new unmarked territory. 

The Pandemic Response Accountability Committee (PRAC) created PandemicOversight.gov to display the details of the $2.6 trillion coronavirus relief spending provided by the CARES Act. The website allows the public interactive tools for understanding who received coronavirus funding, how much they’ve received, and how the funds are being spent. The website also provides tools for the public to report fraud, waste, abuse, and mismanagement of coronavirus relief funding, as well as helpful information to protect yourself against fraudulent activity. 

Mobomo was brought in to perform the redesign and development of the website, which had initially launched as pandemic.oversight.gov earlier this year. The Mobomo team was able to do a complete overhaul of the legacy platform and re-launch the system in just over five weeks’ time with the new website having been officially launched to the public on September 10th. Since the launch, the website has received thousands of visitors interested in learning more about who, where, and how coronavirus relief funding is being spent. 

“Transparency in government is critical in these uncertain times and the mission of the PRAC strives to provide that public service. I’m very proud of what our team has developed and hope the website helps people see how relief funding is being distributed.” – Brian Lacey, CEO.

Not Your Average Government Website

The Mobomo team redesigned PandemicOversight.gov with the goal of incorporating modern theming and a clean design that many of your traditional government information sites lack, but did so while incorporating 18F and US Web Design Standards best practices.  Mobomo’s User Experience team worked with the PRAC to develop mobile-first, responsive design templates that mesh the innovative branding and theming with the high-fidelity interactive visualizations that are key to communicating coronavirus funding activity. 

Let’s Get Technical

The legacy pandemic.oversight.gov was developed in Drupal 8 and hosted in Amazon Web Services (AWS). For the redesign and re-launch of the site, the Mobomo team decided to rebuild the content management system leveraging the latest version of Drupal 9 and deployed the solution within the Microsoft Azure Websites platform-as-a-service (PaaS) environment. Mobomo developed a number of custom feature integrations with visualization partners Domo and Woolpert, enhanced search indexing for browsing various oversight reports and investigations, and optimized process for users to communicate instances of fraud, waste, and abuse through secure channels. 

In order to meet the tight five-week window for design, development, and deploying the new website – the Mobomo team leveraged containerization and Lando for streamlining local development and hooking into the continuous integration, continuous development (CI/CD) pipeline. Mobomo also worked with the Smartronix Azure Cloud team to architect a zero-downtime deployment procedure to allow seamless promotion of new code the public environment. 

“This is a great team on both sides of the table. For such an expedited delivery schedule, it is critical for all the contract partners and government stakeholders to stay Agile and collaborate effectively to succeed.” – Austin White, VP of Federal Services.

For more information on Mobomo’s work with the Federal Government click here.

About the PRAC

The Pandemic Response Accountability Committee (PRAC) was established by the CARES Act as part of the committee of the Council of the Inspectors General on Integrity and Efficiency (CIGIE). The PRAC has developed a Strategic Plan for the next five years that details how PRAC will serve the public by promoting transparency of funds and by preventing and detecting fraud, waste, abuse, and mismanagement of said funds. The committee will work closely with the Federal Inspectors General to support all affected by the pandemic. 

Our Partners
Pandemic Response and Accountability Committee (PRAC)
Council of the Inspectors General on Integrity and Efficiency (CIGIE)
Smartronix
Domo
Woolpert
Grant Thornton

Oct 05 2020
Oct 05

Online communities by definition are not meant to be static and they often redefine the meaning of an evolving digital experience for the rest of the internet.

As the size of communities grows, the members' needs will evolve and require a more dynamic and engaging experience. Choosing the ideal CMS that provides you with the flexibility to build a digital community that always enjoys the latest UX features and best practices will be critical to lay the foundation for a truly evolving community.

In this eBook, we take a look at the success story of the International Association for the Study of Lung Cancer (IASLC) who heavily relied on content creation and marketing strategy to promote their cause and engage their huge membership.

This eBook highlights the key issues and challenges that the IASLC overcame when they upgraded their CMS to ensure their digital community's growth and scalability.

Oct 05 2020
Oct 05

Websites by definition are not meant to be static and they often redefine the meaning of an evolving digital experience for the rest of the internet.

As the size of website traffic and membership grows, the website visitors' needs will evolve and require a more dynamic and engaging experience. Choosing the ideal CMS that provides you with the flexibility to build a website that always enjoys the latest UX features and best practices will be critical to lay the foundation for a truly evolving experience.

In this eBook, we take a look at the success story of the International Association for the Study of Lung Cancer (IASLC) who heavily relied on content creation and marketing strategy to promote their cause and engage their huge membership.

This eBook highlights the key issues and challenges that the IASLC overcame when they upgraded their CMS to ensure their digital community's growth and scalability.

Oct 05 2020
Oct 05

At DrupalCon Global 2020, Moshe Weitzman, Senior Architect and Project Lead at Tag1, and the creator of Drush (the Drupal Command Line), presented his case for a more robust command line tool for Drupal administration. Many Drupal developers and website builders rely on command line tools to get their work done.

[embedded content]

Drupal core today

The command line options in Drupal core are implemented as Symfony console commands, and have limited usage compared to similar commands available in Drush.

Core Drush analog DbDumpCommandsql:dumpInstallCommandsite:installServerCommandrunserver

There are several issues with the core commands - DbDumpCommand is only for MySQL and does not include --structure-tables, or --extra-dump. InstallCommand is Sqlite only, without support for multisite or install profile fields.

The proposal

Moshe’s proposal is to use a Composer-based approach to add Drush to every Drupal website by including it in the drupal/core-recommended/ project for Drupal 9. Current Drupal core commands remain Symfony Console commands and exist for testing core. This maintains the existing framework, while adding highly useful commands for general development work.

Adding Drush to the core-recommended project gives people the choice of starting with a plain Drupal core installation, or making the choice to use the community’s recommended modules and tools.

Why this works

Moshe presents a number of reasons why this proposal is an improvement for the community:

  • Improves the out-of-the-box experience by providing a robust command line for all sites.
  • When Drush is part of the package, Drupal documentation can be consistent, especially for installation.
  • Contrib and core developers will have confidence when they ship with Drush commands. There’s no confusion between deciding which commands to write: Drupal console, Symfony console, or Drush commands.
  • All sites can monitor their non-Drupal dependencies by using a standardized package. Drush ships with pm:security and pm:security-php, enabling website owners and developers to quickly see when PHP versions are insecure and need updates.
  • The new deploy command standardizes Drupal deployment. This command applies a best practice to deployment, making Drupal adoption quicker and easier.
  • Adding Drush to core-recommended leverages 10+ years of development as part of standard Drupal.

What to consider

While these items are far from downsides, they must be considered as part of this effort:

  • The Drush team would need to coordinate with Release Management. This happens already, and would not be a real change.
  • Security Team coordination is also imperative. Moshe is on the security team, so this work already happens.
  • Core and Drush have separate issue queues and repos. While some may want everything in the same queue, keeping the queues separated helps keep issues focused.
  • Drush is functionally tested for many installation permutations (PHP version, Drupal core version, DB backend, etc.) It’s tested with a real Drupal installation, not a mocked test case.
  • Developers who want to create sites without this tool can easily opt-out by using composer remove drush/drush.

Adding Drush to core-recommended may help projects by enabling them to add their module commands to Drush core. It would enable Drush commands to be more easily added to core modules.

Photo by Alexandru Acea on Unsplash

Oct 05 2020
Oct 05

# Overview

I am in the midst of migrating a very large Drupal 7 site to Drupal 8. The site has hundreds of thousands of nodes and I kept hitting bottlenecks while migrating the site. My migration processes would slow to an almost stop and it was very frustrating. We have migrated a lot of sites over the years and never had issues like this.

After some research and a little elbow grease, the migration runs smoother and exponentially faster. It was fairly easy to get these items hooked up. Here is what I recommend you do:

# Migrate Booster Module

When we would migrate Drupal 6 sites to Drupal 7, we used to be able to disable hooks via the disable_hooks key in your hook_migrate_api() declaration. Unfortunately that type of functionality was not ported To Drupal 8/9. However, I did find a sandbox module that can do pretty much the same thing for us.

The Migrate Booster module hadn't been touched in several years, but contained the functionality we needed. I ported the repo to our own GitHub , applied a patch, and then cleaned up the code some. I also offered to maintain the project on drupal.org as well since it hadn't been updated in so long.

The site we were migrating data back and forth to was almost fully built. There were a lot of modules enabled that were hindering our performance. Some of the biggest culprits with migrations are any modules that delete or add entities on node delete or save. When we are migrating a site, or testing a migration, there really is no need for this functionality most of the time. A lot of these modules have mechanisms to update themselves via cron.

So, after enabling the Migrate Booster module, I added this to my settings.php:

// Migrate boost settings.
$config['migrate_booster.settings']['modules'] = [
  'admin_toolbar_tools',
  'autosave_form',
  'pathauto',
  'search_api',
  'search_api_solr',
  'xmlsitemap',
];

Pathauto and Search API are notorious for being resource hogs during a migration. Since our site was already setup, we couldn't uninstall the modules. Instead, we can just disable them during our migrations when we run them via drush. This alone gave me an enormous performance boost when running my migration commands.

I added the other modules by searching through my contrib folder for modules with the docblock that contained Implements hook_entity_. I looked at each hook's functionality and added the modules to the settings array as needed.

This module alone solved a good chunk of my performance issues. Keep in mind, this module is only relevant if you are running your migrations via drush.

# Database Tweaks

While doing my research on migration performance; I came across this article on database performance during a migration . It looks like it is written for Drupal 7, but some of the tips still apply. Since I do work at Tandem, we are the makers of Lando . I use Lando to win all my migrations. It is much easier to test things locally than on a server in general, especially with migrations.

After reading through that article, I added a custom MariaDB config to my .lando.yml to adjust some of the settings. After looking through all the variables manually, here is the custom config I came up with:

[mysqld]
max_allowed_packet=32M
query_cache_size=128M
join_buffer_size=4M
tmp_table_size=92M
max_heap_table_size=92M
sort_buffer_size=4M

A slimmed down version of the Lando file:

name: the-site
recipe: drupal8
config:
  via: nginx
  database: mariadb:10.4
  webroot: web

services:
  database:
    type: mariadb:10.4
    config:
      database: config/my-custom.cnf
  d7db:
    type: mariadb:10.4
    config:
      database: config/my-custom.cnf
    creds:
      user: drupal7db
      password: drupal7db
      database: drupal7db
    portforward: true

This in turn will make our databases perform more efficiently while running a large dataset during a Drupal 8/9 Migration.

# Batching the Migration

If you have ever had a migration that runs of of memory, then keep reading. In the SqlBase class of the core migration module, there is some functionality that can be triggered by setting the batch_size key in your migration yamls. This is very useful if you are running your migration on an older laptop or a server with not a ton of memory installed. Just slap the following to your migration yamls:

source:
  plugin: d7_node
  node_type: stuff
  batch_size: 1000

Pretty easy and very effective to use.

# Other Tips and Tricks

# Updates

Your site should be updated to the latest versions of core and contrib modules at all times. The code base of Drupal is constantly getting added to. By keeping your site up to date, you could be increasing the performance without even realizing it. It also enables you to easily add patches to your code base that could contain the performance tweaks you need.

# Running in a Script with the --limit flag

If you are having a lot of memory issues, then I recommend creating a bash script and loop your migrations through it with the --limit flag on your migration. The fine people's over at Chromatiq created a gist that contains a good bash script already. You can use that and tweak it to your needs.

# Run Migration in Drush

While the UI can be nice for smaller sites, there really is no need to use it from my experience. Running all your migration via drush allows you to do so much more. It is also much more performant since you are just doing everything right at the server level.

# Conclusion

It is super frustrating when a migration is slow and you can't do your work properly. I hope these tips and trick will help you win at a higher level. If you need help with your migrations, please reach out, we love helping people out.

Oct 04 2020
Oct 04

Retrieving the image URL from an image field in Drupal 8 and 9 seemed pretty straightforward too. Even the solution for getting the image style URL from a simple image field can be found quite easily. Getting the image URL from a media field can also be looked up easily.

In case, if an image displays as a media with display mode:

{% if content.field_media|field_value is not empty %}
  {% set image_url = file_url(content.field_media[0]['#item'].entity.uri.value|image_style('inline_media')) %}
  {% set image_title = content.field_media[0]['#item'].title %}
  {% set image_alt = content.field_media[0]['#item'].alt %}
  {% if image_url %}
    <div class="media">
      <img alt="{{ image_alt }}" title="{{ image_title }}" src="https://makedrupaleasy.com/articles/drupal-8-how-get-drupal-image-style-url-media-field-twig-template/{{ image_url }}" class="contact-info__image"/>
    </div>
  {% endif %}
{% endif %}

In case, if an image displays as a thumbnail:

{% if content.field_media|field_value is not empty %}
  {% set file_url = file_url(content.field_media['#object'].field_image.entity.uri.value|image_style('inline_media')) %}
  {% set file_alt = content.field_media['#object'].field_image.alt %}
  {% set file_title = content.field_media['#object'].field_image.title %}
  {% if image_url %}
    <div class="media">
      <img alt="{{ image_alt }}" title="{{ image_title }}" src="https://makedrupaleasy.com/articles/drupal-8-how-get-drupal-image-style-url-media-field-twig-template/{{ image_url }}" class="contact-info__image"/>
    </div>
  {% endif %}
{% endif %}
Oct 03 2020
Oct 03


Image credit: Aaron Deutsch

The Drupal project relies on the open source community for funding, promotion, and other contributions. As we know, contributing to open source can happen in numerous ways including code, testing, training, mentoring, organizing, speaking, and more. All genuine contributions are valuable.

One way we organize and make progress on the Drupal project is to create "initiatives" for important Drupal features or other focused tasks. You are likely familiar with some initiatives as they are highlighted regularly in the DrupalCon "Driesnotes".

Drupal 10 Initiatives

At the DrupalCon Global 2020 Driesnote, Dries talked about the new initiatives for Drupal 10. All of but one of these are based on initiatives that have been active for some time.


Source: Screenshot of DrupalCon Global 2020 Driesnote on YouTube

Drupal 10 readiness

The Drupal 10 Readiness initiative, known as d10readiness in Slack, started in June of this year. It evolved from the Drupal 9 readiness (d9readiness) initiative since Drupal 9 launched June 3rd. The focus of this initiative is updating dependencies, removing deprecations, and helping contributed projects be compatible with Drupal 10.

An easier out-of-the-box experience

The goal for this initiative is to improve the "out-of-the-box" (OOTB) experience so users have the best first impression of Drupal. This initiative will be a combination of focus areas from one previous initiative (Layout Builder) and two current initiatives (Media and Admin UI / Claro).

Layout Builder was added as a stable module May 2019 in Drupal core version 8.7.0. The Media entity module was added as hidden in Drupal 8.4.0 and was unhidden in 8.5.0. The Media Library module was marked stable in version 8.8.0 last November. Claro is still an experimental module and the hope is to bump it to stable status for Drupal 9.1.

Note that there was a previous "Out of the box initiative" and this new one is called "Easy out of the box". Hopefully this doesn't lead to any confusion.

A new front-end theme (Olivero)

This front-end initiative began as an idea in 2019. Contributors have worked hard to create a modern front-end theme that should be added to Drupal 9.1 as an experimental theme. Then, it will take additional work to get the theme to a "stable" version that can be officially added to Drupal core.

Automated updates for security releases

The Automatic Updates initiative was first proposed in January 2018. It is currently focused on site readiness checks, code signing and verification, composer integration, custom bootloading, and automated security-release updates. This is the most requested feature and would help Drupal be more competitive with WordPress.

An official JS menu component for React and Vue

The new JS Menu Component initiative idea is born out of the popularity of JavaScript frameworks and headless/decoupled architectures. The goal for this initiative is to build menu components for both React.js and Vue.js. This initiative is in the beginning planning stages.

Drupal 9.1 Focus

Drupal 9.1.0-alpha1 is scheduled for release during the week of October 19th, so this is the last chance to get major things addressed for version 9.1. For many active initiatives, the Drupal core roadmap has goals documented for version 9.1.

If you are looking to make an immediate impact in the next two weeks, the following initiatives could use the most help, but any open issue on any Drupal 9.1 initiative roadmap is a good target. Since the timing is tight, the "get-it-in-before-9.1 issues" would be particularly good for people with prior contribution experience. Novices may want to focus on less time-sensitive issues unless they are being mentored.


Source: How to prepare for Drupal 9 by Dries Buytaert

Claro

A large number of Claro issues need finalizing before Claro can be marked as stable for Drupal core. They are documented in the "Must-have issues for stable release" section.

Olivero

A small number of Olivero issues need finalizing before Olivero can be added as an experimental theme in Drupal core. All "alpha" issues have been addressed so the focus is on the "beta" issues. The four remaining are documented in the "Olivero “beta” criteria (After Core Inclusion)" section.

Drupal Initiatives List

The Drupal project has a large number of initiatives to choose from if you are looking for a place to start contributing. These are grouped into strategic initiatives, core-related community initiatives, and other community initiatives. There are also initiative ideas that you can create, review, or refine.

A good way to get involved in an initiative is as follows:

  1. Read the initiative page, roadmap, and other documentation
  2. Look at several initiative issues to get a feel for the type of work
  3. Join the initiative Slack channel to see what people are discussing
  4. Attend an initiative meeting to observe and ask questions

Strategic Initiatives

Strategic initiatives are "official core initiatives" that have been chosen by Dries. These may be the ones you are most familiar with because of the Driesnotes. We've already touched upon a number of these above.

Admin UI (Claro)

Automatic Updates

Issues in this initiative are *not* well-suited for novices, but testing of the module by novices is welcome.

Composer Support in Core

This initiative is *not* well-suited for novices.

Drupal 10 Readiness

Media

New Front-End Theme (Olivero)

And the remaining three that haven't been mentioned yet are:

Configuration Management 2.0

Documentation and Help

This initiative is well-suited for novices.

Workflow

Core-Related Community Initiatives

Core-related community initiatives are "unofficial" community-led initiatives that focus on Drupal core.

Bug Smash Initiative

This initiative is well-suited for novices.

Accessibility

Usability / UX

Additional Community Initiatives

Here are a couple community initiatives that aren't core-specific.

Drupal Ladder

This initiative is well-suited for novices.

Promote Drupal

This initiative is well-suited for novices.

Thanks for your help!

If you have contributed to Drupal initiatives already, thanks for your help! If you haven't yet but are wanting to contribute to the Drupal project, initiatives are a great place to start. They provide structure and an existing team to get you started. Hope to see you in the issue queues soon. :)


Image credit: Aaron Deutsch

Apologies, my old website is still on Drupal 6 and looks particularly bad on mobile. I have started playing with the migration to Drupal 9 and hope to be done fairly "soon". :) Please ignore the cobbler's old shoes for now, thanks!

Oct 02 2020
Oct 02

The Mental Health First Aid workshop is an internationally-recognized, skills-based training course that teaches participants about mental health and substance-use issues. The goal of this course is to raise understanding and promote positive, effective responses to those in need. To date, more than three million people have completed this training worldwide. The Drupal Community Working Group (CWG) Community Health Team is pleased to announce that registration is now open for a virtual Mental Health First Aid workshop exclusively for Drupal community members on Tuesday, October 27, 2020, at 1500 UTC. Prior to the workshop, students will be required to complete 2 hours of self-study.

The Mental Health First Aid workshop is currently country-specific. The October 27th workshop will be based on the United States curriculum. All community members are welcome to attend, but if you'd prefer to pursue the workshop customized for another country, please fill out this form and let us know.

The CWG continually looks for opportunities to promote growth in our community. We believe that these types of proactive workshops will help improve our community's mental health literacy and awareness, as well as making it easier for us to have open, honest, and respectful conversations. We can all be empowered to potentially spot signs of when community members are in need of assistance.

The cost of the workshop is $80. If you need financial assistance, please contact us at drupal-cwg at drupal.org.

Participants will complete a 2-hour self-study followed by a 4.5-hour live-instructor Zoom session. The 2-hour self-study must be completed prior to the Zoom portion of the workshop.

Upon completion, participants have a better understanding of the impact mental illnesses and addictions have on a person, their family and communities.

Register for the course today - registration closes on October 20, 2020.

Notes about the registration process:

  • Time zone information is not displayed on the registration page. The virtual portion of the workshop takes place at 1500 UTC (11am ET, 8am PT).
  • On the registration form, there are several options that are not relevant to the virtual workshop. Please ignore (enter "not applicable" or "n/a").
  • In the automated email you will receive confirming your registration, there is a physical location for the workshop. Please ignore.
  • In the days leading up to the workshop, you will receive emails from both the MHFA instructor as well as the CWG Community Health Team with additional information.

Eight Quick Facts about Mental Health First Aid:

  1. Participants learn a five-step action plan to help loved ones, colleagues, neighbors and others cope with mental health or substance use problems.
  2. Mental Health First Aid is designed to provide temporary help to a person either developing or experiencing a mental health crisis until professional treatment is obtained or the crisis resolves.
  3. This is an evidence-based public education and prevention tool designed to improve knowledge and communication.
  4. Originally created in Australia in 2001, it is now international with programs in countries such as the United Kingdom, China, Canada, Finland, and Singapore.
  5. The National Council for Behavioral Health has the goal of making Mental Health First Aid as common as traditional First Aid and CPR are today.
  6. Mental Health First Aid studies have shown that the program:
    • improves people’s mental health,
    • increases understanding of issues and treatments,
    • connects people with care
    • reduces stigma.
  7. Trainees learn a five-step action plan to assess, intervene, and secure care. Trainees also learn risk factors and warning signs.
  8. Certification is valid for three years, after which an online recertification may be completed.

Over the past few years, the CWG has organized proactive community health events, including our on-going Code of Conduct contact training. If you are aware of an organization that provides opportunities you’d like us to consider please contact us at drupal-cwg at drupal.org.

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