Upgrade Your Drupal Skills

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

See Advanced Courses NAH, I know Enough
Aug 17 2021
Aug 17

10 minute read Published: 17 Aug, 2021 Author: Matt Parker
Drupal Planet , Migrations , Drupal

This is the second in a series of blog posts on writing migrations for contrib modules:

Stay tuned for more in this series!

Background

While migrating off Drupal 7 Core is very easy, there are still many contrib modules without any migrations. Any sites built using a low-code approach likely use a lot of contrib modules, and are likely blocked from migrating because of contrib. But — as of this writing — Drupal 7 still makes up 60% of all Drupal sites, and time is running out to migrate them!

If we are to make Drupal the go-to technology for site builders, we need to remember that migrating contrib is part of the Site Builder experience too. If we make migrating easy, then fewer site builders will put off the upgrade or abandon Drupal. Plus, contributing to migrations gives us the opportunity to gain recognition in the Drupal community with contribution credits.

Problem / motivation

As a maintainer of several modules, it really helps me when other members of the community review and test patches, and if they work, mark them with the issue status RTBC (“Reviewed and Tested by the Community”)!

Proposed resolution

One of the easiest ways that you can contribute is by testing migration patches as thoroughly as you can, reviewing the code, and marking the issue as RTBC if everything checks out.

Aside: Engaging with the community

Any time you’re engaging with the Drupal community, and especially in the issue queue, it is worth keeping a few things in mind:

  • The Drupal code of conduct — “be considerate; be respectful; be collaborative; when we disagree, we consult others; when we are unsure, we ask for help; and; step down considerately”;
  • The Drupal.org issue etiquette — “dos” and “dont’s” for making issues flow smoother; and;
  • The strategic initiative that you are working towards — in this case, improving the migration experience for Site Builders.

Steps to complete

These steps assume that you have followed the Steps to complete in in part 1 of this blog series at least once.

  1. First, we will need to find a contrib module with a migration patch in “Needs review” status. Read the issue with the patch in detail. Doing so will provide you with some insight into the intended scope of the patch, and also what to test. I suggest taking notes.

    For your convenience, here is a link to a search for the word migration across all projects, filtered to issues in “Needs review” status (but since this blog series is about contrib migrations, you can ignore the results for the project “Drupal core”)1.

    For example, let’s suppose that I found issue #3024040 in this list.

  2. Next, install the latest 7.x release of the contrib module you chose into the Drupal 7 site you set up in part 1 of this blog series (it is reasonable to assume that Site Builders looking to migrate are running the latest release of a contrib module).

    If you haven’t worked much with Drupal 7, the recommended place to install contrib modules is inside sites/all/modules/.

    Using our example issue #3024040; because it is a patch for the Tablefield module, I would install tablefield-7.x-3.6 into my D7 test site (because that was the latest recommended D7 version of the module at time-of-writing).

  3. Then, git clone the contrib module you chose into the web/modules/ folder of the Drupal 9 site you set up in part 1 of this blog series.

    You need to clone the branch specified in the “Version” field of the issue with the patch.

    For your convenience, Drupal.org can generate a git clone command for you to copy-paste: go to the module’s project page, and look at the top for a “Version control” tab… click that tab, choose the “Branch to work from”, and click the “Show” button.

    Using our example issue #3024040, the “Version” field in that issue’s metadata shows 8.x-2.x-dev, i.e. the 8.x-2.x Git branch. If we then click the module name (“Tablefield”) in the issue’s breadcrumb bar, then its Version control tab, then choose 8.x-2.x, and click “Show”, Drupal.org gives us the command git clone --branch '8.x-2.x' https://git.drupalcode.org/project/tablefield.git

  4. Next, we want to apply the most-recent patch in the issue — but before we do that, we should create a branch to apply the patch on (creating a branch will make it easier to generate interdiff files if we need to submit our own patch).

    If the issue is using an Issue fork instead of patches, then click “Show commands”, follow the instructions to “Add & fetch this issue fork’s repository”, then follow the instruction to “Check out this branch”, and skip ahead to the next step — the rest of the instructions in this step are for issues using patches.

    If the issue is using patches, then I usually create a branch named after the issue ID and comment number that I got the patch from. In our example issue #3024040, the most recent patch at time-of-writing is in comment #8, so I would name the branch 3024040-8, i.e.: I would run git checkout -b 3024040-8

    Now we can apply the patch.

    Important note: if you’re following along with the example in issue #3024040, be aware that at some point in the future, the maintainers of the Tablefield module will likely accept and commit the patch — trying to apply the patch after it has been committed will fail.

    If the patch applies successfully, commit the changes in the patch to the new branch. There’s no need to come up with a fancy commit message because we won’t be pushing it anywhere: I use branch name as the commit message (e.g.: git commit -m "3024040-8")

  5. Now, we run through essentially the same process we used in part 1 of this blog series to test the migration. That is to say:

    1. (Re-)install the D7 site using the Standard install profile.
    2. (Re-)install the D9 site using the Standard install profile.
    3. On the D7 site, install the Tablefield module, and set it up (i.e.: add a Tablefield to a node type). Then, create some Tablefield nodes as test migration content.
    4. On the D9 site, install the core Migrate, Migrate Drupal, and Migrate Drupal UI modules; and also install the Tablefield module.
    5. Make a database backup of the D9 site (so you can easily re-run the migration).
    6. On the D9 site, run through the migration wizard at /upgrade.
    7. When the upgrade is complete, check the migrated Tablefield nodes to ensure they contain the test migration content you set up on the D7 site.
  6. If the test migration content you set up on the D7 site did not correctly migrate onto the D9 site, see the “What to do if something goes wrong” section below.

  7. If the migration appeared to go correctly, then read the patch in more detail.

    Future blog posts in this series should make the patch easier to understand, but even now, you can probably get a vague sense of what is being migrated, and how it is being done.

    In particular, if you notice that the patch migrates some things that you did not test, it would be worth reverting to the database backup you made, and trying the migration again, so you can test those new things.

    If you find coding style issues in a contrib patch, I would refrain from pointing them out — let the module maintainer do that if they feel strongly enough about it! Many Contrib maintainers have their own style, or don’t feel strongly about coding style: the coding standards used for Drupal Core are only suggestions for Drupal Contrib. Furthermore, some module maintainers will accept the patch but fix the style issues in the patch when they commit it (this is what I do for modules that I maintain).

    Remember the strategic initiative we are working towards: we want to improve the experience for Site Builders — attaining coding standards perfection will delay the patch and prevent it from helping the Site Builders who need it!

  8. Finally, if you are satisfied with the patch after reading it and testing the migration, then it is time to add a comment to the issue:

    1. In the Issue metadata, set the “Status” field to Reviewed and tested by the community, and make sure the “Assigned” field is set to Unassigned.
    2. Don’t forget to “Attribute this contribution”.
    3. In the “Comment” field, clearly state that it worked for you, and describe what you tested.
    4. Finally, click “Save” to post your comment.

Note that the patch to Tablefield in issue #3024040 is just used as an example — please do not leave comments in that issue unless you have something specific and constructive to add.

What to do if something goes wrong

If the test migration doesn’t go the way you expect, this may not necessarily indicate a problem with the patch! For example:

  1. The D9 version of the module may operate or store data in a different way than the D7 version does;
  2. The D9 version of the module may have fewer or different features from the D7 version;
  3. The issue that you got the patch from intentionally leaves certain migrations out-of-scope; or;
  4. Your expectations might be wrong (this happens to me a lot!).

So, before leaving a comment in the issue, take some time to:

  1. Read the issue in depth (including earlier patch versions and interdiffs, if applicable), to understand what is, and is not, in scope;
  2. Skim the D7 and the D9 versions of the module’s code, to understand the differences between the two versions of the module and how they work; and;
  3. Read the patch, to understand what it is trying to migrate and to try to pinpoint the problem.

If you think that you can pinpoint the problem, then it’s worth posting your own comment on the issue. In your comment:

  1. Describe the steps you took,
  2. Describe how to create the content and/or configuration which did not migrate properly in D7,
  3. Explain what you expected the migrated content and/or configuration to look like in D9,
  4. Explain what you think the problem is.

Be aware that the patch author and/or module maintainer may be okay with things not working perfectly! Recall the Drupal code of conduct: be respectful (of the module maintainer’s decisions), and step down (i.e.: back off) considerately.

Next steps

As mentioned earlier, the best way to find Migration issues that need review is to search for them. As you may know, marking your own patches RTBC is discouraged, so you’ll probably run across patches that I’ve written floating out there in the issue queues!

If you’re reading through an issue, and you find it confusing to keep track of everything that changed, other people probably find it confusing too! You can help move the issue forward by simply updating the issue summary. But, be aware that, like coding standards, following Core’s issue sumamry template is just a suggestion in Contrib.

In the next blog post, we’ll talk about converting some of the testing that you’re doing manually right now.

  1. I’ve proposed officially adopting the migrate issue tag for contrib migration issues, but this needs to be approved by the Drupal.org administrators, so don’t tag issues with it for now. I’ll update this blog post if this proposal is accepted. ↩︎

The article Easy commit credits with migrations, part 2: Can we get an RTBC? first appeared on the Consensus Enterprises blog.

We've disabled blog comments to prevent spam, but if you have questions or comments about this post, get in touch!

Aug 16 2021
Aug 16

Drupal 9 have some awesome social media integration modules. These modules will help link your website to social media platforms easily like Facebook, Instagram, LinkedIn, Twitter, Pinterest, Tumblr, and other tools to your service. Here in this article let’s explore those Drupal social media integration modules now.

The advent of the internet has brought about a change in consumer behavior. Businesses are aligning their marketing strategies towards their online footprints. The website has been the path towards exponential growth. And it does not stop here! The website must be integrated with the social media profiles of the business too.

A large part of the audience frequents social media channels. Hence, all businesses have a social media plan that is integrated into their overall online strategies. You must integrate the website with your social media profiles. Are you aware that Drupal social media integration is easy? How is it? We will learn more in this article.

How can you Integrate your Website with your Social Media Profiles?

As businesses continue to spend heavily on marketing technologies, there is a need for every CMS to aid enterprises too. The CMS must help to seamlessly integrate the content and the technology platforms and provide the ideal customer experience.

Social media allows businesses of all sizes to amplify their outreach to the target market. CMSs like Drupal 9 can help immensely by allowing your organization to enhance communication with the audience and have better visibility. You can call in the experts to formalize your Drupal 9 social media integration strategy.

There are several ways to boost outreach, like using content sharing buttons, feeds, and counters, allowing links to your social media pages, or including tweetable phrases in the content. There is a need to build customized visitor profiles and recommend products that would suit them. You must streamline the campaigns and must optimize lead generation and tracking too.

Best Drupal Social Media Integration Modules for your Website

Let us have a sneak peek into some of the Drupal 9 modules for social media sharing via Facebook, LinkedIn, Twitter, Instagram, Flickr, Youtube, Tumblr, and a lot of other social networks.

AddToAny Share Buttons Module

The universal sharing buttons can look great on any background, and this module can allow you to make use of them. They are scalable and can fit high-PPI screens too. Apart from being vector buttons, they are lightweight too.

This Drupal social media icons module can help web admins integrate the website's social media buttons. The vector icons allow automatic dark mode and can be placed in an adjustable field on various pages and articles. They can also be placed on templates and themes.

drupal addtoany share buttons

Image Credit: Drupal.org

Social Auth Google Module

Several websites require visitors to register on the website to receive any service. However, an elaborate registration process erodes the visitor experience. It is better if they can use their Google account to register themselves. This module does exactly that! Visitors can log in to the website using their Google account.

The module is a part of the Drupal Social Initiative that ensures harmonizing the authentication with any external services in Drupal 9. The module is based on the social API that provides a proper blend of external services and authentication.

social auth google logo

Image Credits: Drupal.org

Social Media Links Block and Field

One of the essential functionalities of a website is to allow visitors to follow any updates on the site. Therefore, the module can allow a "Follow Us" feature. In addition, it will provide a configurable block to show the icons to your profile on different social networking websites.

The module has icon sets of different sizes. The developer can choose the icons from varying backgrounds and sizes. It is supported by major social networking channels like YouTube, Twitter, Facebook, etc.

social media links block

Image Credits: Drupal.org

Social Media Share Module

Another essential feature of a website is to allow visitors to share content. This module enables sharing a web page to various other social media platforms like Pinterest, Twitter, Facebook, WhatsApp, etc. You can place it anywhere on the site. The services can be disabled or modified from a config page.

The module allows the flexibility to add additional services, change the orders, or modify the elements before rendering them. The developer can also disable services from the config page. In addition, the module provides a unique social media field that is flexible to allow sharing of any web page.

Shariff Social Media Buttons Module

Are you looking for a feature-rich Drupal social media share buttons module? This module allows web admins to have a safer way to add the social sharing buttons on any Drupal 9 website. Of course, the websites must not leak the visitor's sensitive personal data. However, unlike other modules, it is safe and does not call any external JavaScript or inject iframes.

When it has been downloaded, it can display the buttons as a block. The module helps in improving site performance too. It can also help to show the sharing counter by using a Shariff back-end library. The developer can have the freedom to put an available back-end library outside the Drupal root, while they can reference the URL in the module setting.

shariff buttons

Image Credits: Drupal.org

Ridiculously Responsive Social Sharing Buttons

Your website must have social sharing buttons to help visitors share the content they like on your website. It is among the best Drupal 9 modules for social media sharing and allows you to share SVG icons compatible with most browsers. In addition, the icons are lightweight, and you don't need third-party scripts to use them.

The buttons are mainly designed as share buttons but can also be used as a follow button. Thus, it can entice the visitor to visit your social media page. The module allows the developer to configure the controls to be shown on the site. You can configure the number rows too and the sizes as well.

ridiculously responsive social sharing buttons

Image Credits: Drupal.org

Social Feed Module

Are you willing to show a live feed from your social media page onto your website? Then this is the module that can allow you to have this feature. It integrates data from your social media pages onto your website. The information will display according to the requirements set by you. It is relatively easy to configure, and you can show the feeds using the block system. The default layout is in simple text and is easy for your developers.

Like and Dislike

If you are looking forward to bringing more visitors to your articles, you must set up a feature to allow them to like your article. This module can help you to have this feature on your website. It will enable the developer to create a widget that can easily stick on the web page. You can also configure the bundles for which you need this feature to work. Then, all you must do is to change the settings!

like & dislike button

Image Credits: Drupal.org

Conclusion

With most of the audience online, businesses are revising their strategies and focussing more on their digital footprints. Social media is also increasingly becoming relevant in digital campaigns. Therefore, it becomes necessary for websites to integrate with their social media pages. Drupal social media integration can help in seamless integration.

Businesses opting for Drupal must bring experts to ensure visitors can effortlessly promote content from the website on various social media channels. There are several Drupal 9 modules for social share that can help. All you must do is to call in the Drupal experts. We would be happy to help!

Aug 16 2021
Aug 16

We are living in a digital era. Our lives have dramatically changed over the years. Such a digital transformation is also witnessed by the various business industries which are constantly striving to level up their work standards and ethics. Today, let’s look into one of the industries that is flourishing towards digital innovation and transformation: travel and tourism. This article will also give you an insight about how Drupal proves to be the best choice when it comes to technology in the travel industry. 

Emerging digital transformation trends in the travel and tourism industry

A diagram describing the emerging technology trends in the travel and tourism industry


The growing need of digital transformation has given rise to the following trends impacting the travel industry. Here are the following technology trends that are enabling the reshaping of the tourism industry. 

Rise of mobile Integration

Cloud technologies and international mobile plans have made mobile devices highly prevalent and an important part of the travel journey since it provides facilities like online booking, easy mobile payment, and acquiring destination information in real time. It is observed that the mobile’s share of total digital ad spending in the travel industry is gradually increasing over desktop ads and will cover the majority of the travel industry’s ad spending in the future. Due to the facility of mobile responsiveness, the consumption of digital travel content can be seen growing rapidly around the world via smartphones, the most feasible medium to plan the exotic vacations and choose the best travel destination. People are today seen spending hours over their phones scrolling the various social media platforms. Such social media platforms prove to be a good medium to inspire travel and also improve the travel business for the travel and tourism industry. 

Availability of AI and Chatbots

Artificial intelligence and chatbots help customers in digital check-in, voice assistants, easy access to digital concierge services and smart rooms. You can experience a seamless travel by this technology since it provides customised and personalized service according to your preferences. 

Integration of IoT

IoT helps in building a data rich tourism sector that leads to enhancing customer experience. The facilities like interoperability of data, sensors and automation that further helps in producing real time understanding and information for properly managing tourism can be obtained. It also brings improvement in the visitor experiences and increases the operational efficiencies that enable to successfully provide the best travel services to the enthusiastic travelers. One of the unique innovations of this technology is an IoT device called wearable. So, wearables or  wearable technology is adopted by travel agents across the globe to fulfill the growing need of personalized services from travelers. It enhances the communication with the travelers since all they look for is solutions in their fingertips and which is attainable with this technology. Therefore, wearable technology is rapidly growing among the people as it proves to be one of the significant travel innovations of the present world. The main motive of this technology is to  simplify the experience of a traveler and make it frictionless. 

Virtual Reality

Virtual reality helps in capturing the tourism destinations in an immersive and unique way. The users can feel the experience of “being there” with this special technology which the usual images and videos of various destinations cannot offer. A user can witness the most realistic virtual reality travel experience with the VR headsets. The travel agents use this technology to help their clients get a better experience than just viewing regular brochures and computer screens. Here is an example where VR is adopted. In the Marriott Hotels, the guests are offered VR experiences which can be enjoyed from the comfort of their rooms. 

Cloud-based solutions

The cloud-based infrastructure has various benefits. One of the most significant benefits is the cost reduction. For example, TUI, a European travel company, was able to reduce its technology costs at the time of COVID 19 by scaling down the cloud usage.  Another benefit of cloud computing is agility. It helps in reducing the time to deploy new products and services to customers and employees. Due to the pandemic, cloud-based technology proves to be a good option. Since majorly, employees are seen working remotely, this technology provides an easy access to critical information that helps employees to smoothly carry out their work responsibilities. 

Focusing on Data

Digitalization helps in the acquisition, collection and interpretation of the consumer data. This further helps in understanding the customer preferences and behavioural patterns that allows companies to offer best services and experiences to their customers. Here is an example of an Australian airline, Qantas who in partnership with unified customer data platform Umbel, has built a data hub focused on customer behaviours and preferences which will further enhance the customer experience. In-flight services, check-in process and real time ticket booking facilities are personalized for the customers. 

Building reputation

Brand reputation can be built with technology by providing the feedback facility to its customers. On receiving the best services, the customers can share their opinions through various mediums like Facebook, TripAdvisor, Yelp and travel review websites. This also works as an encouragement for the various brands to provide quality services to maintain a good relationship with their trustworthy customers. It is also found that ninety five percent of people majorly depend on the brand’s reviews before opting for it.

Providing safety and security

Safety and security have always been one of the top-most priorities for the travel and tourism industry. Technology should aim at creating innovation and enhancing security. A traveler’s journey can be made trouble free by providing seamless safety processes. For example, Aruba Happy Flow can be considered as an innovative scheme which requires passengers to show their passport only once on every journey. The primary means of recognizing passengers and helping them throughout the entire airport journey is via facial recognition. The governments of Aruba and the Netherlands, Aruba Airport Security, KLM, Schiphol Group and stakeholders consider it to be an important innovation in security clearance. 

How digitalization can help the tourism industry to recover from the pandemic, COVID 19?

Many companies have felt the need of adapting digitalization post the pandemic, COVID 19. The pandemic is encouraging companies to modify their approaches regarding various functionalities. They look forward to being more resilient. It is important to be able to withstand all the uncertainties that the business encounters because of COVID 19. The companies can find ways with the help of technology like increasing their remote workforce that will stabilize their current hard situations. And being agile is the key to sustenance for the present tough times. The agility in business helps in quickly adapting and scaling the business against the prevailing competition. The companies which have already integrated digital processes into their company culture even before the pandemic, weren’t seen struggling much like the companies which restricted themselves from adopting such essential digital procedures. Therefore, companies are seen embracing digitalization in today’s time. For example, Hyatt hotels are putting an effort to introduce their improved digital facilities via hyatt.com and the World of Hyatt app which will allow its customers to communicate better while revealing their preferences and choices over the different services offered by them. To know more, read about pandemic-driven digital transformation, how businesses are reimagining their business operations, and how to be digitally ready no matter what.

Why choose Drupal?

Illustration diagram describing the Drupal features


Drupal is a safe and highly reliable platform that provides a wide range of features that helps in creating rich digital experiences for the travel and tourism industry. So, let me take you through the exclusive Drupal features explained below.  

Open source

The Drupal project is fully open-source software. Anyone is free to download, use, work on and also share it with others.  It is based on principles like innovation, collaboration and globalism. It can be further distributed under the terms of the GNU General Public License (GPL). There are no licensing fees for Drupal.

The Drupal community is always ready to support its users by answering their questions and concerns. So, if you have any question, somebody will certainly answer it, since it’s a worldwide platform.

Learn more about open source here:

Content workflow

Drupal’s in-built tools enable content creation, workflow and publishing, also allowing the content creators or content managers to smoothly work on it. In this platform, editorial workflows can be managed effectively by permission and authentication that is easily available. The preview provision allows visibility of how the content will be displayed on a device even before approving and publishing the content. It helps in creating content with a WYSIWYG editor. You also get the facility to quickly track all revisions and changes, if you feel the need of maintaining the history of content changes. So, every stage of content, from creating, reviewing, and publishing can be viewed that further helps in managing your roles and responsibilities. Drupal has a special feature where you get the opportunity to create a structured content like describing content elements, tagging content based on any attributes, forming appropriate taxonomy for content so that it can be searched, used, reused if needed to improve the customer satisfaction. 

You get a chance to create a relevant content architecture utilizing the Admin Interface or also do it programmatically. It facilitates you with special mode tools and views, customized menus that provide a comfortable user experience, and also form pathways to content over several devices. 

Read about how layout builder and paragraphs module enhance content workflow in Drupal.

Security

Drupal CMS provides security from all types of web vulnerabilities and threats. It keeps robust security as a priority. You will find a team of security experts that look after all the security concerns with their well structured coding standards and strict review coding procedure. Since, security is given much emphasis by Drupal, it has a broad professional service provider security that makes it one of the most stable and secure open-source platforms. So, Drupal websites are built by maintaining all the required security and privacy for the users. One more important security aspect to be discussed is, ‘Drupal Commerce’ that supports the core payment API, for an easy payment collection process through the check out form while travelling via airways. 

According to the 2020 edition of the Acunetix, Web Application Vulnerability Report, Drupal was found to be the most secure CMS in the open source CMS market.

Illustration with a circle describing the minimal security issues of Drupal CMS Source: Acunetix

Scalability and performance

The in-built performance features of Drupal when combined with a modern CDN provider performs extremely well under the pressure of supercharged databases, load balancing and advanced caching. Even on the busiest days, Drupal's scalability allows your website to perform exceptionally well. To know more, read about Drupal’s performance optimisation offerings and how it scales with your needs to govern high web traffic.

Multilingual

Drupal’s automated language translation makes it possible to reach out to different audiences with the facility of localized content. Drupal is an expert in building complex multilingual web applications and customized sites in numerous languages. Drupal’s core modules help in complete translation of each part of a site, content types and their specific fields, users, menus, blocks, taxonomy, comments and contact forms. It further helps in specifying the preferred language in accordance with the user’s IP address, URL, session, browser settings and much more. Read more about Drupal’s multilingual capabilities here.

Accessibility

Drupal facilitates an exclusive feature of building websites that can be accessible by people with disabilities. It ensures that all its features conform with the World Wide Web Consortium guidelines (W3C) guidelines: WCAG 2.0 and ATAG 2.0. This a very significant feature as it helps in providing equal accessibility to everyone regardless of any discrimination. 

Learn more about accessibility here:

Personalisation

Drupal’s users get a special, personalized profile for each visitor like using geolocation, behavior taxonomies, browser history and device type. Drupal also provides a customized experience which helps in tracking and reporting with A/B and multivariate testing, improving ROI by target marketing and also segment users over devices with an aim on the significant user identity for your business goals.

Learn more about personalisation here:

SEO 

The users of Drupal get access to exclusive SEO tools that help in improving the site’s visibility. The tools and modules are discussed below.

To know more, read this definitive guide to Drupal SEO in 2021.

Multisite support 

You can handle various websites over your organization, geographies, brands and campaigns on a single platform, allowing easy, fast website creation and deployment with Drupal. Read this ultimate guide on Drupal multisite to know more.

Marketing automation

By using modules and tools in latest versions, Drupal enables smooth integration with the automation platforms which can collect customer demographics, and convert potential leads within the suitable time. Learn more about how marketing automation can be leveraged with Drupal here.

Mobile first approach and mobile apps

Drupal facilitates in creating web applications and responsive websites that further enhances the user experience. It provides the best practices of responsive design and also makes sure that your users attain excellent content experience each time, on every device. And, there are two ways of building mobile web applications which work with Drupal - integrated with Drupal at the theme layer, or a standalone mobile web app that communicates with Drupal using web services. Even though, both the approaches will work for building mobile web applications, it will be much easier to begin with integrating the mobile web app into Drupal as a theme. To know more, read about mobile-first design approach and mobile apps like that of Flutter-powered delivered by Drupal.

Integrated Digital Tools and Applications

Drupal smoothly integrates with a broad ecosystem of digital marketing technology and other business applications that enable you to select the right set of tools today and tomorrow according to your convenience.

Strong Stack Foundation

Drupal lives upon Linux, Apache, MySQL and PHP, the latest LAMP technology stack that meet the necessities of flexible, fast-moving agile companies and brands  which further creates the next generation digital platforms.

Facilitates Decoupled Architecture

One of the significant features of Drupal is the content flexibility that helps in easy flow of content over sites, native apps, which can be presented on third party sites and social networks. Since, many CMSes look for managing content in a back-end repository and move it to “front-end” which can provide an experience i.e mostly static. You get an option to to decouple the back and front ends, wherever it's required. Therefore, Drupal content remains as reusable chunks, which is free from presentation and is also ready for smooth delivery to sites and applications. With the help of Drupal’s presentation i.e. RESTful API and neutral content, the front end developers can build interactive sites and applications without facing any restrictions. There is availability of tools like Node, Angular, Backbone, Ember etc. The third-party content(eg. syndicators and aggregators) can be attained and made available to any site, application, or channel under this free and open source platform. With the help of Drupal’s content-as-a-service capability, the content of Drupal can be consumed easily by any other sites and applications. Additionally, Drupal’s front end developers also get the opportunity of designing content smoothly such as separating back-end content from front-end presentation according to their preferences. 

Learn more about decoupled Drupal here:

Web Hosting

You can select the convenient hosting vendor that suits your needs with Drupal. Also, you get the opportunity to change hosting vendors whenever you want and select to host the website internally. 

Migrations

Drupal upgrades can be considered easy and convenient. Upgrading Drupal 8 to Drupal 9 was very easy, confirmed by the makers. With these four simple steps, you can develop your present site’s functionality, and maintain proper safety standards of Drupal 9 by using the Upgrade Status. With Upgrade Status and Drupal Module Upgrader, the developers can easily make the upgrade themselves. Additionally, you also specify whether your themes and modules are competent for Drupal 8/9, and also convert your custom code suitably.

Learn more about Drupal 9 upgrade here:

Extensibility

Drupal facilitates its users with various essential modules, themes and distributions. Let us first discuss some of the modules offered by Drupal. The first module is IP Geolocation Views & Maps. IP Geolocation Views & Maps (IPGV&M) is basically a mapping engine. This module very easily helps you in creating views-based mapping solutions utilizing the map renderer of your preferred choice (Google, OpenLayers2 or Leaflet) with any location storage module of your wish, e.g., Get Locations, Geofield, Geolocation Field or Location. It enables you in bringing together both modules and feature sets which you wouldn’t be able to combine without this module. Then the second module is Baidu Map. In China, the Baidu Map is considered more accurate than the Google Maps and more complete than the Ali Maps. The Baidu Map module enables geographic and location information to be displayed via the Baidu Map API. It helps to attain geographic coordinates from textual addresses in China (Geocode) and display any type of geographic information via Baidu Maps. As Baidu Map presently provides support only for Mainland China, so the capacities of this module would be restricted to China. But it is still able to cover a vast market of more than 500 million internauts, bringing an availability of great applications starting from Logistics, to Tourism/Hospitality, going through E-Commerce or Real Estates.

There are some well-designed themes and templates which Drupal offers. Let us look into some of the Drupal free themes for travel websites. So, the first theme is Travel Zymphonies Theme. The travel agency or tour operating website are benefited by the Travel Zymphonies theme as it helps to focus on offering various adventure tour packages. This theme is compatible with Drupal 8 and it provides multiple layouts that help in creating multiple pages based on your contents. Also, it is responsive and can be used completely for free. Then next we have Guesthouse Lite. The Guesthouse Lite can be considered as a free mobile-first, Bootstrap 4 based theme for Drupal 8 which is based on the Drupal’s premium, Premium Guesthouse theme distribution that comes along with 200+ theme settings and enables you to build sites for small hotels, guesthouses and businesses in the tourism sector.

Finally, taking you through one of the Drupal distributions for travel i.e. Travel profile. Travel profile is a very modern-looking profile which is a great option for the travel agencies or hotels’ landing pages. The travel theme that is used in this profile is very responsive and looks great on any device.

Support and maintenance, hiring of developers, and partnering with digital agencies

There are numerous Drupal agencies you can opt for. According to your requirements, they tend to provide you with the quality services that will meet your expectations. Below are some of the top 4 Drupal agencies in the global Drupal marketplace.

Illustration diagram describing the top 4 Drupal agencies in the global Drupal marketplaceSource: Drupal.org

                                   
Supporting emerging technologies

Drupal proactively, uses the latest technologies such as artificial intelligence in the   form of chatbots, virtual reality, IoT and Blockchain, cognitive search and digital voice assistants like Alexa on Drupal sites to provide a better experience for it’s users. 

Inspiring stories

In this section, I will take you through some of the case studies that will help you in understanding why you should pick Drupal when it comes to building your dream website. 

Top Deck Travel

Top Deck Travel can’t only be considered as a tour operator but rather they can be addressed as travel enthusiasts who plan exciting trips to exotic destinations for people between the age of 18 to 39. They provide 330 different tours around 65 countries to the travellers and help them make beautiful travel experiences and memories. They wanted Drupal to create their new website that would increase the online presence, help in direct to consumer sales, reduce the reliability of third-party travel agents, availability of Single Sign On process over historical sites, applications, form a digital platform which could be utilized for sister brands, Back Roads Touring, Blue Roads Touring and align their applications architecture with the parent Group i.e. Flightcentre. Drupal successfully enhanced their site performance, reduced page load speed, increased consumer conversion rate, launched Back Roads and Blue Roads and generated incremental sales. 

Content Migration at Scale for Lonely Planet

Lonely Planet is a well known name in the travel industry. They facilitate travellers with extensive resources that include guide books, reliable web content, popular mobile applications and a flourishing online community. Lonely Planet wanted to upgrade their legacy website that was created over a decade and had been custom made on Ruby on Rails. They faced various challenges with caching and site scalability. It was a time-consuming and complex project since the volume of content had been accumulated over a decade. They wanted to streamline and migrate to Drupal 8. They had to take their next step, which was to migrate their custom platform onto Drupal. Some of the reasons why they wanted to migrate to Drupal were because of Drupal’s versatile migration API which helped them to conveniently migrate data from its source to the Drupal system. And, Drupal’s flexibility with numerous types of content modeling approaches makes it the best choice for their project. Eventually, part of the new system was successfully launched. They successfully migrated their WordPress-based portal to Drupal.

Final thoughts

From this article, it is clear that over the past two decades, the travel and tourism industry has experienced a fundamental transformation. Driven by new digital technologies, this industry is able to revolutionize the entire work culture and look forward to efficiently providing personalized customer services. This journey is made a lot easier by Drupal as it is the right technology helping the travel industry to not only retain customers but also win over new travelers by providing the necessary technical assistance with its incredible features and functionality.

Aug 16 2021
Aug 16

Tried browser-based development with on-demand environments on the fly, using gitpod.

There is an existing private github repo that contained code for a D9 site (this website). The objective that I set out with -

  • Pull the repo code onto gitpod
  • Make some code changes in code
  • Test the change on an on-demand environment
  • Commit the code change to the repo

Started by spinning off a workspace by using gitpod.io/#. Since the repo had the lando file that defined the environment recipe that was needed for this codebase, I was hoping that it would automatically spin up an environment. That, however, did not happen to be the case.

I was able to spin up the environment after pushing to the repo the .gitpod.Dockerfile  .gitpod.yml files, which I grabbed from this repo of Bassam.

Further which once the workspace was spinned up, I could run lando up on the terminal of the online VS code, and could access the Drupal site, make the code change, and commit.

image 5

Overall, that was good.

Would I be happy to swap it with my local workspace?
While this clearly would free your RAM, and probably save your Macbook's fan, which is always spinning due to Docker. And this could be a model to reduce costs for teams as well, by switching from high-end laptops to low-end Chromebooks for development. But at this point, the experience is far from being optimal.

  • There was clearly significant latency while typing commands in the terminal, or during the IDE's autocomplete.

Not sure where is the nearest endpoint for Gitpod near to my location in India, and if that would change anything if the app was being served from a location closer to me.

But this is just the beginning, and the experience will probably evolve with Gitpod and others creating native apps for Android Chromebooks, Windows and Mac, along with access via Browser. And considering the significant cost savings, this is the direction that web development would take in the days to come. This shift would be inevitable, and I am happy to see the tools are progressing in the right direction. But we aren't there yet.

Aug 15 2021
Aug 15

Moved this website (www.tanay.co.in) from an older version of Drupal 7 to Drupal 9. And switched the DNS to this new site, just a while earlier.

The migration was fairly straight forward using the Migrate Drupal UI module. I had attempted moving this site to D8 5 years ago. It was a bit messy, and I chose to leave it in Drupal 7. My observations from back then are detailed here.

I have been away from Drupal for over a couple of years now, until very recently. And I was expecting no smoother experience than last time. But it was surprisingly easy. Zero code. (Although this website doesn't have any custom functionality that I chose to port over.)

OpenLiteSpeed
I had some IMCE editor and upload plugins on D7, that allowed copy-paste of content and images directly by from Google Docs, where I used to draft my posts. And those plugins saved images and rendered them in a not so straight forward way, without extensions. I was expecting that these existing images wouldn't work out of the box, but they did, on Apache at least, with some htaccess directives. I initially setup on the server an OpenLiteSpeed (OLS) server instead of Apache. But these images wouldn't render. Had a thread with OLS team, that tried helping. But it wasn't a comprehensive fix and the fix was breaking a few other things. And after trying multiple things, I chose to stick with good old Apache.

image 6
A snippet from my conversation thread with the LiteSpeed team.

Litespeed is some tech I would watch out for in the years to come, although they are at this point far away from being a dependable Apache alternative. I am especially intrigued by their Drupal caching plugin https://github.com/litespeedtech/lscache-drupal/ - which claims to increase performance of Drupal by rendering cache from the webserver, without invoking PHP. Yet to try it out. Not sure if it works with Apache, probably not. Also, not sure if anything would be preventing it to be ported to work with Apache/Nginx, as well.

KeyHelp
Got introduced to panels that provide a UI on top of Linux servers, when I was trying out Litespeed. Because, the same company that created LiteSpeed web server also build this panel called CyberPanel.  I am not a big fan of such panels and would rather do things myself on the terminal. But wanted to try them out as they made me nostalgic of the days when I tinkered with Cpanel (yet another Panel) and WHMCS, selling small hosting packages via geniehost.com (a domain which I later sold away to the current owner, a hosting company with the same name based out of Australia). While Cyberpanel was nice and flashy, I had to switch to Apache for the reason mentioned above. Found KeyHelp while looking out for alternatives. Seems to work fine so far. Gives the feel of having a fully loaded shared hosting, with all the bells and whistles, while actually being a dedicated server. This server is a $6/month Debian box from DigitalOcean.
Web Hosting Control Panel Comparison 2019 | Woktron Hosting

Drupal Planet - Did the change in term IDs mess up Drupal Planet feed?
After I moved the site to D9, switched the DNS, and it has been a few hours. Then I realized, I may have sent some spam on Drupal Planet feed. Because, Drupal planet feed is based on RSS feeds, and I had used a specific term for tagging content that is relevant to Drupal Planet, and now, the terms IDs would have changed, and now my D9 site would have pushed a bunch of irrelevant posts to Drupal Planet. Was pretty sure this was an embarrassing situation to spam so many users with irrelevant posts. Fortunately, just realized the D9 site has the same term ids as the D7 site prior to migration. That is not the usual out-of-the-box behavior of Drupal Migrate module, back when I used it for migrating content on work projects. Whatever caused that to change, at least in Drupal Migrate UI, is a good change. This would have been a pitfall otherwise.

Setting up a LAMP stack
Setting up a LAMP stack from scratch is something I haven't done in the recent past. This was something I used to do day in day out, with my buddy Ramesh Babu (drupal.org profile), while we worked for Harvest Technologies in Hyderabad, back in the day like 2011-2012. Ramesh passed away due to Covid a couple of months ago, leaving his family in a tough situation. Definitely missing him. He would have been the first one I would have called when I messed up setting this server up right the first time. Working on web development these days makes your more abstracted from LAMP stack due to the likes of Lando, DDev for local, and the likes of Acquia, Pantheon for the cloud.

Feels good to have this site moved to D9. This was long overdue.

Aug 15 2021
Aug 15

The digital age has sparked an era of self-serve with more and more of the tasks that were once in the domain of the experts being handed over to lay people. Sometimes, the new ways of navigating are met with the resistance. Other times: relief and excitement concerning new possibilities for empowerment, efficiency, and control. 

Content editors are largely falling into the latter category as the days of relying on IT departments or web development agencies to keep a site updated and brand aligned are giving way to easy-to-manage, drag-and-drop flexibility for creating original pages that serve specific purposes beyond the limitations of standard templates.

Of course, the potential of better content editor UX goes far deeper than greater job satisfaction for this particular role. The ability for teams to easily update content, add new new pages, revise designs, and switch up layouts -- essentially take ownership of their websites -- positions organizations to ensure that sites to stay on track and seamlessly evolve as needed. 
 

Content Editing in Focus

The current content editing capabilities are a bit uneven, with multiple options within a range of platforms, plugins, modules, and tools designed to streamline and simplify content. 

Studies show that content editors and site admins want more control over their content and a more streamlined, intuitive UI, better tools for media management and page building, along with WYSIWYG. These types of enhancements closely align with the Drupal Community’s current focus.
 

Raising the Bar within Drupal

Until recently, Drupal’s content editing reputation lagged behind the other top CMSs, as Drupal was largely considered to be at the challenging end of the content editing spectrum. While a less-than-simple content editor experience might have gone hand in hand with Drupal’s longstanding position as a top pick for large, complex sites that require considerable customization, the Drupal Community has been steadily chinking away at the sources of content editing complexity. 

The June 2020 launch of Drupal 9, represented a significant step forwarded for content editor UX with features such as:

  • The availability of Claro as the default admin UI theme, which follows the new Drupal Admin Design System to provide a more intuitive, aesthetically appealing, and content editor friendly UI;
  • The ability to craft layouts with the built-in visual layout builder, reuse blocks, and customize all parts of the page;
  • Management of reusable media in the out-of-the-box media library;
  • Greater enhancements to a structured, content-based system; 
  • A customizable media library management system that allows content editors and designers collaborate on images, videos, and other assets in an intuitive interface;
  • Superior taxonomy handling that extends to the media library, allowing for easy organization of library assets;
  • The ability to make changes from mobile devices due to a mobile-first UI.
  • Enhanced content workflows beyond the previous two optional default states of “Unpublished,” and “Published.” The core Workflows module allows for the addition of custom states (such as Unassigned, Assigned, or Draft) to better align with existing editorial processes. 

Paragraphs, Layout Builder, Provus

Drupal 9, combined with the options within primary content editing modules -- specifically Layout Builder and Paragraphs -- have served to vastly streamline and simplify solutions for designing, laying out, and revising pages. 
Leveraging Layout Builder, the 2020 introduction of Provus, further raised the bar with a component based design system that allowed for built-in adherence to brand and style guidelines.

Provus has effectively leveled the content editing playing field among the easiest to create and manage SAAS solutions, such as WIX and Squarespace, and Drupal’s inherent scalability, flexibility and ability to accommodate complex content models.

Paragraphs Pros and Cons

Paragraphs is an extremely popular contributed module that provides content editors with a solid level of control with minimal clicks. It’s often considered the best option for web applications that call for a flexible content model, but not necessarily a range of layout options. 

With the Paragraphs, content editors essentially create Paragraph Types, each with their own set of fields that live within the parent content form. 

Paragraphs was originally designed to create collections of fields within a larger piece of content. Even though its original purpose was not specifically to manage layouts, Paragraphs has provided content editors in Drupal with a proven module to build pages with components that can be switched up as needed. 
 

Layout Builder in Drupal Core

Drupal Layout Builder is a drag-and-drop page-building tool in Drupal Core that can be implemented as a no-code, site-building tool. The current version of layout builder enables visual page editing using intuitive, block-style layouts. 

Key advantages of Layout Builder include:

  • The ability to build default page templates for different content types such as FAQs, news updates, or product pages;
  • The option to override default settings when needed; 
  • The ability to create structured landing pages for a one-time offer or event that don’t follow a template; and 
  • The representation of layouts in the back-end of the site, providing content editors with the advantage of preview functionality for viewing their layouts as they work. 

Layout Builder is ideal for providing content editors with a visual way to manage how content and layout fit together. This can be accomplished by configuring Block Types, similar to how Paragraph Types are configured, and then providing content editors with access to edit the layout of a page.

An essential difference between Layout Builder and Paragraphs is the ability within Layout Builder to add “Sections” for each page, with the potential for each section to function as a container for the page content. Each Section can have its own layout, which means the potential for a high degree of flexibility. 
Often the decision concerning Paragraphs vs. Layout Builder hinges on flexibility and the degree to which it’s viewed as a necessary or desirable feature.

When needed, the Layout Builder Restrictions and Block Blacklist modules to can inject a level of control over the block types and layouts that can be added to a page.

Provus for Drupal: Next-Level Solution

Further leveraging Layout Builder, Provus was designed by Promet Source as a new approach to designing, developing, and managing Drupal sites. Content editing capabilities incorporate an intuitive, no-code, drag-and-drop page building tools with a curated library of high quality components that enable marketers and content editors to easily layer designs, add functionality, and rearrange layouts.

Provus empowers marketers and content editors with the ability to revise and reconfigure their sites within a customized framework of brand guidelines that are determined during development. The result is the assurance that all design and layout options adhere to organization’s guidelines for brand and site governance, and that a consistent level of aesthetic and design standards is carried through to every page.

Developed for Drupal, Provus provides for varying permissions levels to be set for everyone who has access to the site. 

Design governance which offers the assurance that content editor empowerment does not translate into mismatched, crowded, or sub-par page designs is a key factor fueling the success of Provus. Additional differentiators include:

  • Self-adjusting features within components that create a foundation for both readability and ADA accessibility, by ensuring, for example, adequate contrast between fonts and background colors; 
  • Customization options presented within an expertly calibrated design framework for ensuring adherence to quality design and UX standards on all devices, without breaking layouts or straying from an organization’s brand guidelines; and
  • The ability of content editors to seamlessly edit components and change patterns within the view mode, eliminating time-consuming processes of re-entering content and switching back and forth between edit and publish modes.

Content editing capabilities have experienced a sharp upward trajectory recently, and as new possibilities emerge, there’s increasingly less patience for limited capabilities and cumbersome processes.

Promet’s Open Source, drag-and-drop, component based approach to content editing is changing the game for content editing within Drupal, and now is the time to explore what it can do for you. Interested in learning more? Let's talk.
 

Aug 13 2021
Aug 13

One of the problems in Drupal core "out of the box" is that you can pretty much use anything you want for a password.  And while your business might have a policy against weak passwords if Drupal doesn't enforce them, well, you know how people are. I get this question in training all the time, "How can we make users have strong passwords?" 

In this video, I want to talk about forcing strong passwords in Drupal 8 and 9. The solution is the Better Passwords module.

Keep reading to learn!

Hi and welcome to OSTips from OSTraining. My name is Rod Martin.

The Better Passwords module requires the installation of the zxcvn-php library, but if you install it with Composer, Composer will take care of that for you.  Here's the Composer command given in the directions right below, so that's really handy.

strong Passwords in Drupal 9 

  • install using the Composer command
  • click Configure link

strong Passwords in Drupal 9That takes you to Config >> People and passwords where you can set up:

  1. the minimum passphrase length
  2. how strong you want the passphrase to be (strongest/ strong/ moderate/ weak/ don't check)
  3. whether to allow Auto-generate passwords for new users when added by administrators

Auto-generate is a really nice feature, and for most business Drupal sites, this is exactly how their users get added.

 strong Passwords for Drupal 9

  • head over to People
  • click + Add user button

You'll see that the auto-generate password is checked for me.

If I click Create new account on a real site, that password would have been sent to the user.

strong Passwords in Drupal 9

What does it look like when we don't do that? Let's add another user and find out.

I'm going to

  1. uncheck auto-generate password
  2. put in a terrible password so the strength is weak even though they match

Now, If we try and create that password, it's going to tell us that it needs to be at least 8 characters long.  Let's try that again with a different password that is at least 8 characters long. And that says Fair, but that I've used the word "Admin" three times.  It's going say, "Sorry that's repetitive. It's not strong enough. 

strongPasswords5

Now let's type in a good password: at least 8 characters long with no repitition.  We get a password strength of Strong. We even get the strength indicator in the Confirmation dialog.

strong Passwords for Drupal 9

All right, so that was actually pretty simple. Thanks for joining us today. My name is Rod Martin, and this has been OSTips from OSTraining.

[embedded content]


About the author

Rod holds two masters degrees and has been training people how to do "things" for over 25 years. Originally from Australia, he grew up in Canada and now resides just outside Cincinnati, Ohio.
Aug 13 2021
Aug 13

What makes Drupal website development the best CMS for SEO-friendly websites? It is the Drupal modules that make it a robust system to achieve top search engine ranking. Here let's see how Drupal can control all the elements of web pages with the help of its already installed automation tools.

There has been a change in consumer behavior that has led to a shift in business strategies. Businesses are using their website as a means of collecting high-quality leads. Drupal is the CMS of choice for most feature-rich websites. It has a modular design that allows easy addition of features through the installation of necessary modules.

Drupal can be used to build any website, be it an e-commerce website or a corporate website. The CMS allows creating features and will enable you to implement your strategies with ease. When you are undertaking Drupal website development, you must also ensure that the SEO best practices are being followed. It will help to enhance mindshare and brand recall that will eventually lead to a higher conversion rate.

Drupal is the Ideal CMS for your Website

Drupal is an enterprise-level CMS and is a leader for complex projects. There is an increasing need for businesses to introduce features on the fly and cater to the changing behavior of clients. There is a need for improved client experience and interconnective elements and interconnective devices.

It is an open-source CMS, and the only price associated with it is the development cost of developing a website with Drupal. Hence, the total cost of owning the website decreases as there are no licensing fees. Furthermore, as it is open-source, your developers can benefit from global communities to help maintain and upgrade the website. So, several renowned entities use Drupal for developing their website.

Developers can receive information from others through the robust communities that exist across the globe. It also proves to be easy for businesses to integrate other third-party tools. Being open-source has other benefits like ensuring an open cloud, and you can readily request changes from other experienced members in the community.

Drupal can help build heavier websites and has several crucial modules that can help to add features faster. But can it help in website SEO? Yes, it does.

Drupal has Several SEO-Friendly Features

SEO Friendly URLs

One of the essential factors of SEO is that your website must have customized URLs. You must maintain a subtle balance in creating URLs which crawlers can understand and your visitors alike. There is a functionality that allows you to create individual URLs for various types of content. In addition, there are URL aliases, and you can have URLs like example.com/blogs/name-of-article.

If you have the time, you can manually create the URLs. A better option is to use the Pathauto module. It will allow you to make the URL that will match the content that has been created. The web admins can create user-friendly URLs in bulk too. The module can generate the path aliases for different users, nodes, etc., without anyone specifying the aliases manually.

The aliases are based on some pattern system that can use a token which the web admins can change. Hence, the website visitors can better understand what they can view on the web page. The module is compatible with Drupal 9 too.

Few In-Built Capabilities set it apart from Other CMSs

Are you aware that Drupal can do away with SEO plug-ins that other CMSs require? You can create customized meta tags that come automatically with this CMS. You must utilize different plug-ins to enable this feature in other CMSs.

We all know that a website must be responsive to enjoy SEO brownie points. There could be issues when you work with other CMS. However, you do not face such hassles if the website is designed on Drupal. It considers a responsive website design to be necessary for modern websites and covers this feature by default.

The CMS also supports Resource Description Framework (or RDF), which acts as the semantic web foundation. It can also integrate with Google Analytics easily.

Use Drupal Modules Readily to Improve SEO

One of the essential features of Drupal is that you can utilize different modules to include various om the website quickly. Therefore, you can develop a Drupal website and use the modules that can help in handling SEO.

The Redirect module in Drupal allows the creation of manual redirects. It also maintains a canonical URL for all available content and allows redirection of all the requests to that path. It is the API for deleting, loading, and saving the redirects. Also it automatically cleans the inactive redirects, and there is a redirect counter and the last used timestamp. The module can optimize the redirects and integrate them with the Drupal page cache.

The Metatag module helps in providing structured data automatically. The module also provides additional support for meta tags that will help to control how the content will show on social networks. It supports many commonly used meta tags, like the canonical URL, page title, description, etc. The user can take the help of global settings to control the meta tags across all the pages. There is multi-lingual support too.

The XML Sitemap allows the visitors to have an overview of the website and show the RSS feeds for the different categories and blogs. It is easy to set up, and you can include most of the URLs automatically. You can add custom URL links too. It is possible to manage the sitemap as you build the website. A sub-module can allow you to submit the website to search engines.

The Google Analytics module can tag the analytics tracking system to your website. You can ensure single / cross-domain tracking and can selectively exclude a few pages or users. You can monitor the links that are tracked and keep track of the files that are getting downloaded. In addition, it can track Drupal messages, track any errors like 404 pages not found, and 403 access denied.

Allows Customization Readily

Drupal allows developers to customize the website and quickly add features and stay ahead of the competition. But you will need capable developers to help you in designing the website. Drupal also helps the website adhere to global SEO best practices, allowing higher rank during keyword searches. The CMS also has some core features that help faster loading of websites and provides clean code. You must utilize Drupal website development services from a renowned services provider and stay acquainted with the SEO features.

Other Benefits of a Drupal Website Development

Drupal has an in-built taxonomy system that allows you to tag content and organize the rich keywords. SEO-friendly websites must have proper categorization to score high in search rankings. Drupal can also help design custom content templates and handle a massive amount of content. An SEO-friendly website must update its content regularly. In Drupal, you can quickly revisit the published content and modify it. It can also rectify any errors at the same time.

Conclusion

Businesses are increasingly facing competition from their peers. It becomes necessary that you use a CMS that can allow you to build a feature-rich website while ensuring it is SEO-friendly too. Most websites of the best brands are on the Drupal platform. You can develop a website using Drupal and improve your website SEO continuously.

The CMS is ideal for optimizing your website for search results. First, you must get in touch with a renowned Drupal development team. Our experts have several years of experience in designing and maintaining Drupal websites. We will be happy to help!

Aug 12 2021
Aug 12

Lynette has been part of the Drupal community since Drupalcon Brussels in 2006. She comes from a technical support background, from front-line to developer liaison, giving her a strong understanding of the user experience. She took the next step by writing the majority of Drupal's Building Blocks, focused on some of the most popular Drupal modules at the time. From there, she moved on to working as a professional technical writer, spending seven years at Acquia, working with nearly every product offering. As a writer, her mantra is "Make your documentation so good your users never need to call you."

Lynette lives in San Jose, California where she is a knitter, occasionally a brewer, a newly-minted 3D printing enthusiast, and has too many other hobbies. She also homeschools her two children, and has three house cats, two porch cats, and two rabbits.

Aug 12 2021
Aug 12

Install the latest version:

Versions of Drupal 8 prior to 8.9.x and versions of Drupal 9 prior to 9.1.x are end-of-life and do not receive security coverage.

Drupal 7 core is not affected, although Drupal 7, 8, and 9 site owners should review their site following the protocol for managing external libraries and plugins previously suggested by the Drupal Security Team, as contributed projects may use additional CKEditor plugins not packaged in Drupal core.

Aug 11 2021
Aug 11

A small leak can sink a great ship. ~ Benjamin Franklin

We have seen the basic setup and configuration for Mautic plugins that leverage the integrations bundle, in the previous blog post. The key part of any IntegrationBundle is handling the authentication mechanism.  

So in this blog post, we will be covering various types of authentication and using one authentication type in the plugin that we built in the last blog post. We will continue developing the same plugin.

IntegrationBundle from Mautic Core supports multiple authentication provider methods- like API-based authentication, Basic Auth, OAuth1a, OAuth2, OAuth2 Two-Legged, OAuth2 Three-Legged, etc. The IntegrationBundle provides all these authentication protocols to be used as Guzzle HTTP Client.

In this blog post, we will implement Basic Auth authentication with a third-party service.

The following steps enable our plugin to have the Basic Auth authentication:

  • Have a form with fields for storing the basic auth credentials Form/Type/AuthType.php.
  • Prepare a “Credentials” class to be used by the Client class.
  • Prepare a “Client” service class to be used by a dedicated APIConsumer class.
  • Use Client service and implement API call-related methods in APIConsumer service class.

Step 1

The plugin depends on third-party APIs to have data to manipulate. And these APIs are gated with the authentication and authorization mechanisms. For the course of this post, we have chosen  Basic Auth as the authentication method. 

Basic Auth needed a username and password to communicate with the API. So we need a form that accepts the username and password as a key. And this key is required when connecting with API endpoints.

Let's create a form and name it  “ConfigAuthType.php” under the “MauticPlugin\HelloWorldBundle\Form\Type” namespace. This class extends the AbstractType class of Symfony. We need to implement the "buildForm()" method to add the required field.  Example code should look like this:

You can see the full version here.

It's now time to tell Mautic to pick up this form during configuration. To do so, we have to define an Integration service class implementing ConfigFormInterface, ConfigFormAuthInterface. The ConfigFormAuthInterface is the interface that lets you specify the configuration form using the getAuthConfigFormName method. 

So we name this class "ConfigSupport" and place this under the "MauticPlugin\HelloWorldBundle\Integration\Support." Here are the snippets from the class ConfigSupport:

You can find the complete ConfigSupport class here.

Time to let the IntegrationBunddle know about our "ConfigSupport" class. To do so, add a service as integration or create a service listing with the mautic.config_integration tag. The following is the code snippet of the Config.php (the plugin configuration file).

Now, at this point, we have the following things ready:

  • A service class to register the configuration support class.
  • A class to provide the configuration.
  • One can view all the code changes for step 1 here in this commit.

Step 2

For the Basic Auth, the Integrations bundle uses the “HttpFactory” class to build the http-client. Now, this class needs an object called “Credentials,” consisting of all the required keys for authentication.

If you notice the “getClient()” method of HttpFactory class under the “Mautic\IntegrationsBundle\Auth\Provider\BasicAuth\” namespace, it needs an object of “AuthCredentialsInterface.”

So our next step will be to create a separate class for credentials and create a new custom client to use those credentials.

For that, create a new class called “Credentials” under MauticPlugin\HelloWorldBundle\Connection

The class should be like given below:

This is a trimmed version of the class, and you can find the full version here.

Now that we have completed the Credentials class, we need to create a client who will make HTTP requests. Typically, we don’t need to create a separate client class if we don’t have additional logic to handle. In such cases, we can just call HttpFactory class and get the client like:

In our case, apart from fetching data, we need to cache it and polish it to be easily used for Mautic’s Lead entity.

So we will create a new class called “Client” under the namespace MauticPlugin\HelloWorldBundle\Connection.

The job of the “Client” class is to get the object of ClientInterface (\GuzzleHttp\ClientInterface).

If you need the full class details, you can just follow this link here. Because we are kind and we want to share more, we will quickly review a few methods that interest us and work with the Credentials class we wrote previously.

Here in the “getClient()” method, we are calling the “getCredentials()” method, which is creating a “Credentials” object using API keys.

By using the credentials object, we will get the client via the HttpFactory service call.

So at the end of this phase, we have the following things:

  • Credentials object to pass into getClient() method.
  • New Client class to manipulate get() method and fetch other configuration.
  • New Config.php file inside the “HelloWorldBundle/Integrations” folder to bring configuration and different integration settings.
  • Commit.

Before you go ahead, make sure you go through and analyze what kind of Mautic development services Axelerant offers.

Step 3

We are now ready with the entire setup to store credentials and send the request. Now, it is time to use them in any other class or anywhere that we want to use.

In our current plugin, we have created a separate class called “ApiConsumer.” The reason is, we have several other get methods and API calls, so consolidating all the API methods into a single class is easier to manage.

To use our Client service, created via Client.php, we need to create a service that can use this class. That way, we can reuse this class without worrying about anything else.

Create a new service called “helloworld.connection.client” and add it to the Config.php in the other services section.

Similarly, we need to add additional services for the ApiConsumer class to call from other services.

You can refer to the source code to view the entire ApiConsumer class. Here is a snippet of the get() method.

As you can see, we are directly using the Client service’s reference and call the get method from the Client.php.

So at this point, we are done with the third step, where we used our authentication mechanism to fetch the data from the API.

You can refer to the commit to see the code for this step.

Conclusion

Now that we have the plugin ready to communicate with third-party API to churn out more leads, let us thank IntegrationBundle's authentication support. 

You can find about different authentication supports here.

Also, we have the third blog post coming up about how to manage and sync data coming from API. So stay tuned!!

Aug 11 2021
Aug 11

Introduction

The concept of Headless CMS has been a rage for quite some time. At Axelerant, we have been using Drupal as a Headless CMS in many projects. Headless drupal provides a JSON API for accessing the published content of Drupal, including menus via the Drupal Decoupled Menus module.

Since we will be building a cross-platform menu so it becomes necessary to talk about the mobile application ecosystem, which has changed considerably since the introduction of cross-platform technologies like React Native and Flutter. These technologies have made mobile application development a lot more accessible to web developers, both of them have generated strong momentum in recent years. React native has been easier to get started with for web developers due to its React roots but Flutter on other hand uses Dart, which also draws its syntax heavily from JavaScript, however, still has some differences.

In this tutorial, we will use the Flutter framework to render a material design-styled menu across Android, iOS, Web, Windows, and macOS. 

You might be inclined to ask why we choose Flutter instead of using React Native. The simple answer is we feel that Flutter is more polished as a framework. For more in-depth comparisons between the two frameworks, you can check this.
 

Getting Started

Head over to flutter.dev and follow instructions to install flutter on your machine & also install VS Code if you haven’t got that already. Let us create a flutter project by running:
flutter create drupal_flutter_menu

Open the drupal_flutter_menu  folder in vs code. The moment you open it inside vs code, you will be prompted for installing flutter and dart plugins, well go ahead and install them.

On the Drupal side, we need a Drupal instance running with Decoupled Menus module installed and enabled Before we move further let us first look at the JSON returned by Drupal menu API if you navigate to the Drupal menu endpoint (https:///system/menu/main/linkset)  and look for any menu, in this case, “main” menu, then the response JSON will look something like following:

The output will vary depending on what links are present in your specific Drupal menu.

If you look closely at this peculiar-looking JSON representation, it is a special media type called application/linkest+json which has been recently introduced by IETF. This media type is a special way to represent a set of links and their relations in JSON format. In order to know more about this representation head here. Our next step would be to parse this JSON in our flutter code and then create a simple Abstract Data type that will represent the parsed drupal menu, but wait wouldn’t it be better that we have something prebuilt that makes over lives easy, well we have already gone ahead and created a simple flutter package drupal_linkset_menu which takes a drupal menu API URL or a JSON string and returns a Menu object and then render it in Flutter.

Let’s add this package by running from the command line.
flutter pub add drupal_linkset_menu

This command will add the package to our package.yml file. The package.yml file is just like your composer.json file which is used to manage dependencies. Your updated package.yml should look like this,
The source code for a Flutter-based app resides inside the lib folder. We will be only working with the specially named file main.dart inside this folder. Let us delete all the code in the main.dart file and Replace with the following code, which will display “Hello World” in the center of the screen.

In order to run, click on the run and debug button inside the Run and debug section side menu section in vs code, choose dart and flutter on the next step, and then choose chrome on the next step.

Another way is to just type following the terminal /cmd:
flutter run -d chrome

Using Drupal Menu API To Create A Cross Platform Menu

This will run the app inside chrome browser, if you want to run on android you need to have android SDK and for iOS, you need to have Xcode installed, if both of the things are installed then you can use:

flutter run android && flutter run ios

to run on corresponding platforms, for more information on this head over to flutter.dev

Using Drupal Menu API To Create A Cross Platform MenuUsing Drupal Menu API To Create A Cross Platform Menu

Everything in flutter is a Widget! There are stateless widgets & stateful widgets, we will be working with stateless widgets today.

The code that we have put in the main.dart files does the following:

  1. It creates a Material app. Material is a visual design language that is standard on mobile and the web. Flutter offers a rich set of Material widgets.
  2. The main method uses arrow (=>) notation. Use arrow notation for one-line functions or methods.
  3. The app extends StatelessWidget, which makes the app itself a widget.
  4. The Scaffold widget, from the Material library, provides a default app bar, and a body property that holds the widget tree for the home screen. The widget subtree can be quite complex.
  5. A widget’s main job is to provide a build() method that describes how to display the widget in terms of other, lower-level widgets.
  6. The body for this example consists of a Center widget containing a Text child widget. The Center widget aligns its widget subtree to the center of the screen


Now update the code in main.dart  with the following code: 

 Also, add a package called url_launcher by typing:
flutter pub add url_launcher

This package will allow us to open a URL, when any link in the menu is clicked.

Let us break down step by step what the code adds:

  1. In the MyApp widget’s build method instead of showing a “Hello world” text at the center, we have introduced a new widget called HomePage that will show two menus “main” & “footer” menu of our drupal site.
  2. The HomePage widget is another widget that houses the necessary build method that describes how to show the two menus and a couple of helper functions.
  3. The getMenu function is responsible for interacting with the drupal_linkset_menu packages helper method called getDrupalMenuFromURL which takes API URL and the menu name/id and returns a Menu object which is used to construct the UI.
  4. The two functions buildMenu & buildMenuItem are used to recursively build the ui for the menu,A special flutter material inbuilt widget called ExpansionTile is used to create the menu items.
  5. The build method of HomePage contains a Column widget that lays out children in a vertical fashion, it is analogous to how flexbox works on the web. The column has two FutureBuilder widgets that call the getMenu function, till the getMenu function returns a Menu object, a CircularProgessIndicator widget is shown, and when the Menu object becomes available the menu is created.
  6. In buildMenuItem we are using a GestureDetector to listen to taps and when a mouse click or tap is performed on a menu item the URL is launched.

Run again or hot reload again by pressing “r” on your command line to see the changes.

Conclusion

The aim of this tutorial was to give a sense of how quickly we can build a native cross-platform app with Flutter and the new Decoupled Menu API. Now you might be wondering that we didn’t talk about running the project on Windows and macOS- the support for both these platforms is still in beta but as an exercise you can still run the project on Windows and macOS by changing the Flutter stable branch for which more information can be found here.  

All the code for this project can be found on GitHub.

Aug 11 2021
Aug 11

Open-source has the power to change the world, but, as we depend on it for democratic innovation, open-source also depends on us to thrive. At Axelerant, we know and own this; hence we’re constantly engaging in different open web communities, including Drupal’s.

Why are we writing this? First of all, we are always keen to shine a light on our team members because our people-first culture makes Axelerant succeed. Second, in a knowledge sharing spirit, we are willing to put out what has worked for us (and what we struggle with) regarding contributing and our community involvement.

We are celebrating Drupal’s 20th Anniversary, and we are proud of being part of that history for over a decade. What better way to celebrate than recognizing and sharing the stories of the people involved, the makers that keep the ball rolling.  

Hussain Aabbas

Hussain Abbas
Director of Drupal Services

"Celebrating our people and the community has been among our values since the beginning. Drupal’s 20th anniversary is one of those occasions where both of these values come together in demonstrating Axelerant’s commitment to be a productive part of the amazing Drupal community through its team."

Here, we want to share a few stories from team members who recently contributed and inspired us with their Drupal journey.

Lessons learned in our Monthly Contribution Meetups

We started Monthly Contribution Meetups in 2019 to foster a culture of mentoring and giving back. Our goal is to get more people contributing to Drupal consistently and provide the tools to those who want to do it for the first time. These meetings are an excellent space to seek out support, share findings, learn, and bring the opportunity to know other team members, their Drupal journeys, and motivations. From these sharings, we continue to grasp the familiar obstacles people encounter when contributing, ideas on how to surpass them, and the benefits that come with getting involved. 

screenshot of Axelerant team's zoom meeting

November’s monthly contribution meetup

Thirst for learning overcomes time constraints

Hansa-Pandit

Hansa Pandit
Frontend Engineer - L2

“I was first introduced to Olivero reading about it on different blogs. That caught my eye. I read the documentation, got my set up ready, jumped right into a coding sprint, and assigned myself an issue. I wanted to work on a feature, so when the theme went into the core, I would be able to say: that is the part I built.”

Hansa has been on Drupal.org for over two years, and besides other contributions, she’s been actively involved with the Olivero theme initiative

Time management was a big challenge for Hansa, especially since she gave Olivero the same priority level as other work-related projects. But the logic was clear; she knew that if she was investing her time towards contribution, she needed to benefit from it by learning.

And she declares the experience made her technically stronger, “I learned a lot of new skills. Other projects I worked on supported specific client's needs. Still, for Olivero, we had to make sure we were theming every single module supported by Drupal while making sure we met all the accessibility standards.”

And Olivero is now in core, we are proud of Hansa, and we celebrate her and everyone involved in this achievement.  

Find the right initiative, and don’t do it for the credit

mohit-aghera

Mohit Aghera 
PHP/Drupal Architect - L1

It is important to focus on learning and exploring instead of doing it for the credits: “I decided to focus on this initiative because I was interested in learning about writing test cases for Drupal Core. It was a quick way to get introduced to this, and also a great opportunity to explore almost every feature of the core, instead of focusing on a specific module.”

Mohit is one of our most experienced Drupal engineers and contributors; hence he’s continuously mentoring the team. In our last meetup, he explained his motivations and experience with the Bug Smash Initiative; “it’s a great initiative to devote energy to, because it is well managed. Maintainers do an excellent job triaging issues,” he argued. We often hear that not knowing where to start or feeling overwhelmed by the issue queue translates into demotivation within weeks. Counting on careful planning and mentoring makes life easier for everyone, which is why finding the right initiative becomes essential.  

A second factor to consider while contributing is the right motivation. We always remind ourselves of the opportunities that come with contributing for personal branding, sharing your work, showcasing a visible portfolio, and “ultimately if you want to learn Drupal Core, contributing is the best way to do it” he insists. 

Clear expectations help first-time contributors

Abhay-Saraf

Abhay Saraf
PHP/Drupal Engineer - L2

When asked what could be done differently to motivate others to join these sprints, he told us, “being clear about expectations and providing resources that display a step by step before the event would make the experience less intimidating.”

As founding members of the Drupal India Association, we also look to align our mentoring and contribution efforts with India’s larger Drupal community. Organizing and hosting monthly contribution weekends is one way to boost a sustainable contribution culture, and Abhay recently joined this initiative for the first time. From his experience, we confirmed that meeting folks, running into smiling faces, and having the space to give back without the pressure of getting lost or making a mistake is fundamental to onboard newcomers. “I had a good experience because I already had a list of prioritized issues. I could work with a free mind since I knew that I'd get the guidance needed if I had any doubts. Also, I liked the flexibility of this event, it goes on for a day, you can dedicate any amount of time you can, even if it is just an hour, it would still be worthwhile,” he shared.

Contribution = Recognition = More contribution

Gaurav-Kapoor

Gaurav Kapoor 
PHP/Drupal Engineer - L2

Gaurav's efforts were rewarded with a scholarship to attend DrupalCon Amsterdam 2019. Through this contribution journey, he gained vast Drupal knowledge, “now I focus on mentoring and sharing knowledge, so others can also leverage all you can gain from contributing,” he says. 

Gaurav’s Drupal journey started right after college when he decided to leverage his spare time by joining a two-person startup. After learning Drupal, he soon realized that contributing to the community would build the company’s reputation as trusted experts, and that was the initial driver. Eventually, what sparked a community spirit was getting noticed and recognized. He’s been ranked among the top 30 contributors and recognized in Dries’post about Who sponsors Drupal development? for the past three years.

Events and the power of networking

kunal-kursija.jpg

Kunal Kursija
PHP/Drupal Engineer - L3

Kunal has the habit of surfing through different channels that list upcoming events (DrupicalDrupal.orgDrupal Slack), so when we found out about BADCamp 2020’s call for papers, he decided to go for it. A two-way process started, “I began to review everything I had learned recently or topics I wanted to learn about”, from there Kunal came up with a list of topics and submitted them.

 

Speaking at events has many benefits, especially to those interested in being seen as an authority in their fields. Presenting sessions nourishes the community with knowledge and best practices and builds the speaker’s reputation and network. That was certainly the case for Kunal. “I first heard about BADCamp while attending DrupalCamp London. Someone I met there told me BADCamp is one of the best Drupal events. That image struck me and has stayed with me since then.” 

 “Of course, it was exciting to learn my session had been selected. I was disappointed I couldn’t attend the event in person. However, I enjoyed getting introduced to other BADCamp speakers, and it was great to participate in such a big and important event.”

To many more years of Drupal

We recognize our monthly meetups serve the purpose of keeping an ongoing conversation around contributions, inspire and support team members and promote those who actively get involved. Our team works with a contribution-first approach, and this practice grants us a place at the top of the ranking of organizations supporting Drupal. And yet, there's more we need to do to build up a sustainable contributing culture. We still find that most people that haven't contributed before can judge the onboarding process as too arduous, and time constraints follow soon after. Even with mentorship support available, the steep learning curve poses a hurdle to conquer.

We are continually discussing and exploring initiatives to encourage contribution, from creating a role for a full-time contributor to gamification aspects around tracking contributions or mentoring team members on the bench between projects. 

Today we introduced a selected few stories, evidence that sustains again and again that the key ingredient and the strength of this 20-year-old open-source project are people.

We are excited to be part of this celebration and would love to hear about your contribution strategies and ideas. What’s your preferred way to give back to Drupal?

Don’t forget to join the celebration on social media!

P.S. See you at the Global Contribution Weekend happening 29-31 January 2021.

Aug 11 2021
Aug 11

In our recent project, we had a requirement from one of our clients where we need to validate data in CSV files based on custom requirements. This validated CSV would need to be imported into Drupal 8 into various content types.  

In this article, we will look at the requirement, the library, the architecture of the custom module, the different components of the module with some code samples and finally adding some ideas on how this module can be made more reusable and even contributed.

Introduction

Our client is a well known international NGO with offices worldwide, each with different types of data management systems and frameworks. They wanted a centralized system to manage the data from each of these offices. Having concluded that Drupal 8 was the ideal solution to implement that centralized system, the challenge was to set up a migration pipeline to bring in data from all of the offices and their varying frameworks. Consequently, the files generated by these systems needed to be validated for specific constraints before being imported into our Drupal system.

Challenges and Goals

Following are the goals that the system should meet:  

  1. The CSV files were in a custom format and there were multiple files with different structures and needed to be handled accordingly. Each column needed to have another validator. 
  2. The files needed to be validated for errors before they could be imported and the errors needed to be logged with line numbers and relevant error messages. 
  3. The validation had to be triggered automatically when the files were downloaded from a central location. 
  4. Notification emails had to be sent on successful and failed validation to the IT admins. 
  5. After successfully validating the files, the validator needed to trigger the next step of the process, which is importing the files.

The main challenges

  1. The validation had to cross-reference the incoming data with existing data and also with data in different files (referential integrity checks). 
  2. We also had to check the uniqueness of certain columns in the CSV files. Doing this in a database is pretty easy and straightforward, but this had to be done before inserting it into the database.

Step 1: Choosing a CSV reader library

The first step was to figure out a PHP based CSV reader library. League CSV was found to be the best option due to the below reasons:

  1. It was managed by composer and was already being used by the Migrate module in Drupal core and hence no additional code needed to be added for the library to work.
  2. The library covered many common scenarios like iterating through rows of the CSV, getting the field values and headers, and streaming large CSV files.
  3. And finally, it was implemented in an object-oriented way.

Step 2: Architectural requirements

Below are the requirements we had concerning the architecture of the code:

  1. The code needs to work as an independent service to call it at different locations of code and thereby invoke validation wherever required.
  2. The validations need to be as generic as possible so that the same validation rule can be reused for different fields in the same CSV or in others.
  3. We need to have an extensible way to specify the validation to be done for each field. For example, whether a specific field can be allowed to be blank.

Step 3: Designing the components of the validator

To satisfy the above architectural requirements, we designed the validator module into the following sub-components:

The main service class

Below are the main responsibilities of this class:

  1. Load the CSV library and loop through each of the files in a particular folder.
  2. Use the methods supplied by the CSV league to read the file into our variables. For example, each row of the file will be stored in an array with an index containing each column data.
  3. During processing, the filename is taken in and checked to see if the validator method in the Validator class matching the filename exists.  
  4. If the method exists, then validation is done for the file and errors are logged into the error log table.
  5. If there are no errors, the class triggers the next event, which is migration using a predefined custom event via the Event API of Drupal. 
  6. This also passes the status of the import to the calling class so that emails can be triggered to the site admins.

The Validators class

Here, we basically assign constraints for each file type in a method. The input to the validator class would be a complete row.  

The Constraints class

This class contains the individual constraints that check if a particular type column meets the required criteria. These constraints are methods that take in the column value as a parameter and return an error message if it does not meet the criteria for that column type. This class will be invoked from the validators class for each column in every row.

The Error log

As its name suggests, the validator needed to capture the errors and log them somewhere. We defined a custom table using the database hooks provided by Drupal. A custom view was defined in code to read the data from this table. The errors captured by the constraint class were logged into the database using this logger.

Eventsubscriber and mail notification

We needed the validation to be auto-triggered when the files were downloaded. To achieve this, we tapped into Drupal’s EventSubscriber and Response APIs. 

Referential Integrity checks

Most of the columns did not have any relation with existing data and could be validated on the fly. However, some of the data had to be validated if it has corresponding references either in the database or in another CSV file. We did this as follows.

  1. For those values which act as a parent, dump them into a temporary table, which will be cleared after validation is completed.
  2. When we arrive at another CSV with a column that references values dumped above, then we query the above table to check if the value is present. If yes, return TRUE.
  3. If the value is not present in the temporary table, then we search the Drupal database as the value might have been imported as part of the previous import. If not, then we throw a referential error for that row in the CSV.

The code snippets are available here.

We used the migrated data as a source for a headless backend using REST. For more details on the specifications, refer to our blog on how to validate API response using OpenAPI3.

Future scope and ideas to extend this as a module by itself

We have written the module with an architecture where the validators can be reused but require some coding effort. Below are changes that can be done to make this module a contribution.

  1. Add configurations to have a list of files that need to be validated.
  2. Each file will have an option to add the fields that need to be validated and the type of data (similar to what you have when creating content type).
  3. Based on the above list of files and field types, we can validate any number of CSVs with any number of columns. 
  4. We would need to modify the above classes to fetch the columns' data type and call respecting constraints for each CSV.

As a result of doing the above changes, anyone will be able to use this module to validate CSV files with their own columns.

Hope this blog helped you with this module and how it can be made more reusable and even contributed. Share your experience in the comments below! 

Aug 11 2021
Aug 11

As expected, Drupal 9.1 was released on schedule at the closure of 2020. We have already talked about the Drupal 9 release and how it’s a testament to the predictable and reliable nature of the Drupal release cycle. Drupal 9.1 takes a step forward by adding more features and releasing them as predicted.

In this blog, we will be discussing the new improvements and more that will follow. 

Is it worth upgrading?

The Drupal 9.1 stable release was out as expected on Dec 2nd, 2020. We previously advocated that if you are on Drupal 8.9, you needn’t hurry to upgrade to Drupal 9.0 as you would not see many new features. But that’s changed.

Drupal 9.1 adds exciting features and updates along with support for PHP 8 (we have previously written about making Drupal 9 compatible with PHP 8).

It’s also worth upgrading as Drupal 9.1 brings significant changes in the user interface for both sighted users and assistive technology.

New features

Olivero theme

The much-awaited beta experimental frontend theme Olivero has been added to the Drupal core. As a replacement to Bartik, this is a modern and clear theme planned to become the new default Drupal theme later.

This particular theme is named after Rachel Olivero (1982-2019), the head of the organizational technology group at the National Federation of the Blind. She was a well-known accessibility expert and a Drupal community contributor.

Additions to the Claro theme

Claro was added as an experimental theme in Drupal 8.8. And now, Drupal 9.1 has added designs for various key pages like the extensions administration page, views administration, and status report. Also, the media library received Claro styled designs too.

Composer 2 and PHP 8 support

Drupal 9 fully works with Composer 2, and it is strongly recommended to update. Many of the popular plugins have also been updated. If the one you use doesn’t have updates, please help the plugin author with a PR to add the support (it’s quite easy). The new release comes with a significant improvement in performance and also reduces memory usage.

Drupal 9.1 has added support for PHP 8. PHP 8 brings in a lot of newer languages, and even though Drupal core isn’t using any of them (it still supports PHP 7.3), you could use features like union types and more in your custom code. Further, it’s likely that PHP 8 could be a requirement for Drupal 10 due to release in 2022.

Additionally, the user experience has been improved by making the content load faster as the images rendered by Drupal with known dimensions will now be set to lazy-load automatically. 

How to update from a previous version of Drupal

Now, this begs an important question: how will the current users of Drupal 7 or 8 migrate to Drupal 9.1? And also, if users have already migrated to Drupal 9, is there anything for them to execute with this release?

Every version of Drupal demands a different approach to migration. The idea is to pick the right Drupal migration strategy. Let’s look at how to migrate from different versions in this section. 

Upgrade from Drupal 7

Drupal 7 users can easily continue to migrate to Drupal 8.9 or migrate to 9.0 or 9.1 directly. Migrating directly to Drupal 9/9.1 will help them skip a step. The upgrade path for multilingual sites remains stable in Drupal 8.9, 9.0, and 9.1!

For more on how to upgrade from Drupal 7, check out the ultimate guide to Drupal migration

Upgrade from Drupal 8

For Drupal 8 users, there’s still time to step up to the latest 8.9 version until the end of Drupal 8, i.e., in November 2021. The bug fixes will continue, and the next one is scheduled for January 6, 2021. 

Sites on Drupal 8.8 will no longer receive security coverage. This means moving to Drupal 8.9/9 becomes crucial from this update onwards. 

According to Drupal.org, of the top 1000 most used drupal.org projects, 85 percent are updated for Drupal 9, so there is a high likelihood that most of the modules and themes you rely on are compatible.

Upgrade from Drupal 9

Drupal 9.1 is a minor release of Drupal 9. It can be updated from Drupal 9 versions for utilizing these new features without breaking backward compatibility (BC) for public APIs. While Drupal 9 will keep requiring Symfony 4, Drupal 9.1 has adjustments required to support Symfony 5 already. 

All these updates are underway to make Drupal 9 forward-compatible with Symfony 5 and 6 (not yet released). And also, as Drupal 10 is planned for mid-2022, these new upgrades target an excellent growth curve.

Running the update

We will only talk about updating from Drupal 8.9 or Drupal 9 in this section. Updating multiple versions is possible but needs additional care and consideration, which we won’t cover in this section.

  • First of all, if you are already using the Olivero theme in your project, remove that by running this command. We need to do this as Drupal 9.1 includes Olivero in the core.

$ composer remove drupal/olivero

  • To begin an upgrade from Drupal 8.9 or Drupal 9, run the following command:

$ composer require drupal/core:^9.1
drupal/core-composer-scaffold:^9.1 --update-with-dependencies

  • If your project is using drupal/core-recommended, use that instead of Drupal/core in the command above. Also, for the above, your project must be using the recommended Drupal Composer template. It is quite likely that the command might throw some dependency related errors. 

Since there are a wide variety of possible dependency issues, we won’t cover everything here. But to get started, try replacing the --update-with-dependencies flag with --update-with-all-dependencies flag in the command above and try again.

Drupal 9.1 seems to be a promising update for users ready to take the plunge. If you are still not sure, give us a chance to convince you why upgrading to Drupal 9 is crucial now.

Share your Drupal 9 experience with us and watch this space for more insights!

Aug 11 2021
Aug 11

Traditionally, Drupal web applications are built using various entities like Content types, blocks, components using Layout Builder, and then the product is made available to the end-user on the front-end using HTML, CSS and JavaScript. The team usually starts with backend stories related to building various content types, related roles, and permissions, and then the frontend team picks it up to make the site more usable and accessible as per the design requirements. 

Of course, with component libraries like Storybook, Fractal, PatternLab, and with designs in place, the frontend team can start implementing them as component libraries in parallel, which are later integrated with Drupal. 

In this blog, we will be talking about testing the application and the following topics:
 

01. Automated Testing in Drupal

02. Applitools and Drupal

03. Interpreting the automated test execution results

04. Other tools in the market

05. The Applitools Advantage

06. What next?

Automated Testing in Drupal

BehatPHPUnitDrupal Test Traits (DTT), and NightwatchJS are the most widely used tools for automating tests with Drupal. There are several reasons why these tools are popular within the Drupal community, such as all these tools are PHP-based frameworks (apart from NightwatchJS), offer ready to use Drupal extensions/plugins and have huge community support. With these tools, one can automate unit, integration, and acceptance level tests.

But what about automating the visual tests? That’s the missing tip of the pyramid, which we will address through this blog post. 

We have used Cypress to automate the browser and Applitools for AI-based visual validation. Our reasons for using Cypress over other tools are many, including the following:

  1. One can quickly get started with writing actual tests with Cypress as compared to Selenium.
  2. Cypress enables fast-paced test execution.
  3. Our POC with Cypress + Drupal proved that testing the Drupal side of things can also be achieved with Cypress. 
  4. Cypress offers harmonious integration with Applitools. Having said that, please note that Applitools does have SDKs for Selenium PHP and NightwatchJS and many more just in case you have your existing automation functional suites written using any of the other testing frameworks.
  5. Since Cypress is a JS-based framework, developers can also contribute to writing automated tests.

The site to demonstrate the concept is called Drupal Umami, the major advantage being that the site is already constructed and we can directly focus on writing automated visual tests without having to worry about creating these pages.

NOTE: If you are completely new to the concept of automated visual validation testing, then please refer to the course “Automated Visual Testing: A Fast Path To Test Automation Success" on Test Automation University from Angie Jones.
 

Applitools and Drupal

Applitools provides an SDK for Cypress, which makes it very easy for us to integrate automated visual validation tests in the same functional test suite created using Cypress. The steps to configure Applitools with Cypress are straightforward and you can refer to their official documentation for more details. Let’s take a look at the test written for the Homepage. The gist is shown below:

The test in the above example launches the Homepage and verifies the UI using the “checkWindow()” command. The checkWindow() command takes in the following parameters:

  1. tag: The name of the test.
  2. target: Shall the window be targeted or a particular element?
  3. fully: Identify the scope, whether it is the current viewport or the entire window. 

That’s it! And you are ready to execute the first automated visual test. So, let’s execute it using the command `npx cypress run`, assuming that the baseline image was captured correctly on the first run.

Here’s a small screencast for the same.


Interpreting the automated test execution results

Now that the tests have been executed let’s look at the execution results, which brings us to the Applitools dashboard. Here’s the passed test result. 

test results passed

The tests passing is a good thing. However, that’s not the primary reason for having automated tests. You want the tests to correctly detect the discrepancies as close as the point of introduction. For the purpose of this demo, we have intentionally introduced a couple of CSS bugs on the Homepage through Cypress’s invoke command. Once the script launches the Homepage, CSS changes are made at run-time in the browser and then the screenshots are captured as below:

Let’s re-execute our test to see how the tool catches these bugs. The tool has correctly highlighted the three errors (in pink color) below that we introduced on purpose:

  1. “Search bar” in the header has shifted from its original position.
  2. The font color for the “View recipe” button on the banner has changed.
  3. “Find out more” link in the footer.
      reference image
test run image

We confirm that these indeed are bugs, and reject the image marking the test as failed and then report bugs in Jira directly from Applitools. Additionally, the root cause analysis feature from Applitools helps us quickly identify the visual (UI) issues, in this case, caused by CSS changes, as shown in the images below: 

RGB bug margin bug

Until now, it was only about one browser. However, if we really want to leverage the automated tests written for validating the UI, then the true benefit lies in having the ability to execute these tests across several browsers, Operating systems, and devices. Verifying that the UI looks correct on one browser/device doesn’t guarantee that it would look exactly the same on all other browsers/devices because the rendering of the UI might be different on other browsers/devices. 
 

Cross-browser/device/OS testing using the Ultrafast Test Cloud

Now that we have seen and understood how automated visual testing is done with one browser, let’s discuss some points that need to be accounted for to scale up your automated testing:

  1. Configure your suite to execute automated tests across several browsers and devices. However, not only the test authoring time increases but also creates a dependency on the technical staff as the logic for tests to run all tests across several browsers and devices need to be coded.
  2. Linear automated test execution increases execution time, thereby resulting in larger build times and delaying the feedback of the application to the entire team. 
  3. Maintain an in-house grid for parallel execution or purchase additional subscriptions provided by Cloud-based solutions for parallel execution of automated tests.

This brings us to discussing the Applitools Ultrafast Test Cloud, which inherently takes care of the above points.

By using Applitools Ultrafast Test Cloud, you would be able to execute the automated visual validation tests across several browsers, operating systems, and devices of your choice and at lightning speed as although the test runs once on, say Chrome (assuming Chromedriver is configured in the tests), the capturing of the pages occurs in parallel, in the background for all the configured browsers and viewports.

So, let’s write some more tests for Articles and Recipes landing and listing pages on the site. Let us also execute these tests in parallel on several browsers/devices as configured below using Applitools Ultrafast grid solution:


Here are the Ultrafast Grid Test Results across several browsers and devices. 

test results

To be precise, here are the details:

  1. Number of browsers and devices = 7
  2. Total number of functional tests = 6
  3. Total number of visual tests = 7*6 = 42
  4. Time taken to complete execution on Ultrafast grid - 5 minutes 2 seconds

Execute once and see the results on so many browsers and devices. Now, that’s what I call truly automating your visual tests.

Also, notice that using the Applitools Batch feature, we have logically grouped the Test Results to make it extremely readable. 
 

Other tools in the market

There are many other Open Source tools like BackstopJSShoovGeminiVisual regression service for WebdriverIO to name only a few, but none of the tools has the Applitools advantage and we will look at a few of many reasons in the coming section.
 

The Applitools Advantage

  1. The AI-driven image comparison algorithm is incredibly accurate and avoids false positives, which otherwise occurs in a pixel-to-pixel based comparison. The amount of time it would take to troubleshoot false positives, especially on full-page screenshots, would be time and cost-prohibitive. Pixel-based is ok for verifying small components across a short period of time; otherwise, it breaks down.
  2. Seamless integration with your existing functional automation suite through several Web, mobile, screenshot, desktop, and codeless SDKs available for testing and automation frameworks like Cypress, Selenium, Nightwatch, WebdriverIO, Appium and also languages like PHP, Java, Javascript, C#, Python only to name a few.
  3. With the help of Ultrafast Test Cloud, your entire web application can be tested for visual accuracy at a fast speed (as the tests run only once whereas the visual rendering validations happen in parallel on several browsers and devices in the background) with guaranteed reliability and security.
  4. Applitools also provides out of the box integration with the Storybook component library for React, Vue and Angular.
  5. Learn more about the following Applitools Eyes integrations on their site:
    1. Integration with GitHub
    2. Integration with Microsoft Azure
    3. Integration with GitLab
    4. Integration with BitBucket
    5. Integration with Jira
    6. Integration with Email and Slack for notifications
       

What next?

Signup for a free account with Applitools and feel free to clone this repository to try it out on your own. Integrate automated visual validation tests in your project that will help you build and release visually perfect web applications or websites confidently at a faster rate.

Want to know more about automated testing? Learn how early Automated Testing design helped us in upgrading a Higher Education platform. The OpenScholar's product with its own complete layer was built above Drupal and needed the customizations to be thoroughly tested. The objective was not just to verify functionality accurately but also to achieve faster feedback at all levels of the implementation phase.

Aug 11 2021
Aug 11

In the last article, we discussed the changes required to get Drupal 9.1 running on PHP 8. At that time, we got the Drupal 9.1 dev release working on PHP 8.0.0 RC4 with a few patches. Since then, a lot has changed with many of those patches being committed and Drupal 9.2 dev open for development. But we’ll talk about all of that at a later date. Today, let’s look at getting some of the common PHP extensions and configure it to run with Drupal.

We left off at a point where we have plain Drupal 9.1 running on a plain PHP 8 RC4 setup. Drupal doesn’t require any extensions, not in PHP core, and that means we only had to enable extensions like gd, MySQL, and others to have Drupal 9.1 running. With that, we were able to install Umami and use the site without any problems at all. To enable those extensions, we only needed our docker-php-ext-enable script, which is part of the PHP base Docker imageSee the Dockerfile in the reference repository for the source code (lines 41-52). Installing other extensions that are not part of the PHP core is not quite that simple. Think of it this way: if a module is present in Drupal core, you can install it right after downloading Drupal. But if it is a contrib module, you have to download and install it separately. It’s the same thing with PHP extensions.

Why test with extensions?

Just as you probably wouldn’t have a Drupal site with at least one contrib module, you probably wouldn’t have a PHP installation without a few of the common extensions. Drupal core utilizes some of these extensions when they are available (such as APCu and YAML), which yields better performance. This means that even though the extensions are not technically required, you would most likely have them.

I started with extensions, which I almost always install on sites I work. These are APCu, YAML, and Redis. Drupal core doesn’t use Redis, but I almost always install the Redis module for caching, which requires this module. It made sense to test if it worked on PHP 8 (both the module and the extension). As for the other two extensions, Drupal core uses APCu and YAML extensions for better performance if they are available. Again, it is a good idea to test Drupal with these extensions installed.

Installing extensions

Typically, we would use PECL to install any extensions we needed. PECL is a repository for PHP extensions, very much like a composer for PHP packages. With PECL, we would just need to run a command such as pecl install Redis to install the extension. You can see this being used in lines 53-58 in the Dockerfile.

pecl install apcu redis yaml

This is not as simple with PHP 8. PHP 7.4 removed default support for PECL and the official Docker image removed the command in PHP 8 images (it applied an explicit option to keep it for PHP 7.4).

Alternative tool to build extensions

I found another tool called pickle, which was intended to replace PECL but became dormant as well. I noticed some activity on the project, including a relatively recent release, and I tried that first.

The tool worked very well for APCu and Redis extensions. However, for YAML, it failed because it could not parse YAML's beta version number (2.2.0b2). I found that this was fixed in a recent commit but that would have meant that I would need to build pickle in my Docker image rather than just downloading and using it. I was not looking to go that route.

Building the extension manually

This left me with only one option: building the extensions myself. Fortunately, this turned out to be much simpler than I thought. You can see the steps required for each extension in lines 54-67 in the reference repository’s Dockerfile. For each extension, there are essentially just two steps:

  1. Clone their source code of the extension
  2. Run phpize, make, and make install to build the extension

We need the PHP source available to use the above tools and this is easily achieved using a helper script in the Docker image. You can see it being used in line 39 in the reference repository. Once we build the extensions, we clean up the PHP source to keep our Docker image size small. This is what the complete step looks like:

docker-php-source extract;
git clone https://github.com/krakjoe/apcu.git; cd apcu;
phpize; make; make install; cd ..;
# ... Install other extensions same way
docker-php-source delete;

Enabling extensions

Now that the extensions are installed, we can use the same script (docker-php-ext-enable) as earlier to enable the extensions. In our reference repository, you can see this done on lines 69-72. Thanks to these helper scripts, we now have our extensions enabled and configured for both the PHP module (for Apache) and the CLI. This can be verified by running the following command:

php -m

The above command will list all the enabled PHP extensions (internal ones as well) and you should be able to find apcu, redis, and yaml in the list.

Bringing it together

Now, we need to make sure that Drupal works with the above extensions. Since APCu and YAML extensions are used by the core, we should see any issues immediately. We can even verify that Redis is connected and APCu is being used by looking at the status report page, as shown in the following screenshot. 

Tweet from Hussainweb

For Redis, we need to install the Drupal module as well as the Drupal core doesn’t use it directly. We will discuss installing modules in another post.

PHP 8 remains an important milestone in PHP history, not just because of cool new features but also because it established a trusted release cycle promised at the release of PHP 7. A predictable release cycle helps build trust and also consistently brings new features and innovation to the product. We saw that with Drupal 8’s regular six-monthly release cycle and we will see that with PHP as well.

Aug 11 2021
Aug 11

I joined Axelerant with the thrilling purpose of cultivating and fostering their participation and contribution to the Drupal community. And I did, with a defying obstacle: I don’t code and until then I had only heard a few things about Drupal.

As soon as I began this journey, I verified that Drupal (the technology) is completely interlinked with the community that sustains it. To understand one you must know the other. Though you can get a kick out of reading about the advantages of headless Drupal or the improvements that will come with the release of D10, it is obvious that what holds the project together is the willingness of its members to advance, connect, and share knowledge. Hence, the motto “Come for the code, stay for the community.”

Everybody has their first time

In every community, face-to-face encounters are essential to solidify our personal and professional bonds. They are mandatory to get the true sense of a community. Therefore, as soon as I embarked on this endeavor I knew I needed to add an event experience to my Drupal immersion.

Yet, the global crisis unleashed by the COVID-19 pandemic is forbidding us all to attend large and exciting live events. Was I supposed to meet this need online, while surfing a context of widespread virtual fatigue? The truth is that, although we are all a little tired of facing our screens, technology has proven its capability of bringing us close, even eliminating borders. As a result, I decided to sign up for free for my first Drupal Camp, and I was lucky to have debuted with my attendance at the Bay Area Drupal Camp, or BADCamp, which describes itself as the world’s raddest Drupal camp.

Pierina at BAD Camp 2020

Travelling from Buenos Aires to the world’s raddest Drupal camp

The Bay Area Drupal Camp is “An annual celebration of open-source software normally based in Berkeley, California” that has already trained over 3,000 Drupalers. This year, for their very first time, they went the extra mile and went fully virtual from October 14th to 17th.

From day one, the organizers ensured the attendees were aware of the Drupal Code of Conduct, and indeed all the interactions I had and the overall environment were imbued with respect and collaboration.

The first couple of days were exclusively for summits and training. I joined for the last two days of the event to attend sessions. The schedule offered a wide variety of topics for all levels of experience, which allowed me to achieve my goal: understanding the full range of knowledge-sharing and learning that happens in these events, without feeling like an outsider. I was able to participate in meetings related to non-code contributions from which I earned valuable resources.

Thank you for making it happen!

Thanks to the organizers and volunteers who made it happen. Surely it would have been easier to suspend the event until next year, but you took the time and effort to carry it through and the result was impeccable.

609

Registrations

515

Attendees

32

Countries

Congratulations!

What I experienced at BADCamp 2020

Two experienced Drupal contributors from Axelerant participated at BADCamp as speakers: Mohit Aghera and Kunal Kursija. Obviously, I wanted to watch them in action. Their sessions were tagged as “Drupal for beginners”, and they both had over 20 attendees to their meetings. It was very compelling to see how they interacted with the audience, covering concepts as well as practical tips and showcasing live-demos. They answered all questions and provided further examples when needed, and of course, in an open-source collaborative spirit, shared their slides and links to the sample code repositories.

Go ahead, relive the sessions, and check out the resources.

 

 
This will be helpful both for site builders and developers. 

  

Learn about the very tiny, mighty and hidden gems of Drupal, "filters", that process and display the user-submitted content. 

As I was planning my schedule, I literally felt this session title was talking to me. Baddy did a great job explaining specific ways you can contribute to Drupal beyond code. And she managed to make it appealing, sharing her own journey choosing non-code contributions even though she has the needed technical skills. Thanks to her inspiring talk, I realized I can offer valuable support by pitching in with these kinds of contributions. So, if you like to design, you’re good at organizing projects or events, you enjoy writing, reviewing, or translating content, find out how you can help here

This session offered valuable insights towards building the marketing arm of an open-source project, highlighting the importance of storytelling, both within the community and towards external audiences. Suzanne stressed the need to pinpoint whom the Drupal community is talking to, and how to adapt marketing efforts to different personas (from developers encountering Drupal for the first time, but also to marketers and evaluators that won’t ever install Drupal but occupy decision-making positions in organizations). I personally engaged with the idea of telling better stories around code contributions within the community. Good stories are easier to amplify, and knowing the people behind the code makes it straightforward to relate and is always inspiring. Stories boost empathy, motivation and sense of belonging; all things that foster a healthy culture in any community.

The Promote Drupal Initiative already produced valuable resources in this direction: the Drupal brand book (setting design elements but also the tone of voice and the brand personality) and marketing materials such as press releases, pitch decks, and one-pagers. Visit the Promote Drupal page to download the resources and/or if you want to contribute to the Drupal brand.


Overall, I had a rich experience, I witnessed first-hand the power of innovation and knowledge-sharing behind Open Source and I now have proof that the Drupal community is guided by a culture of openness, respect, and collaboration.

P.S 1: If you’re interested in web content accessibility, I recommend you watch this session to learn interesting insights, tools, and distinctions between accessibility, usability, and authentic digital inclusion. Check out the video here.

P.S 2: Thanks again to the BADCamp organizers for including the farm tour and the pet meet & greet, it was a creative and conscious way to mitigate virtual fatigue.

Check out all the recorded sessions of BADCamp 2020 here.

Aug 11 2021
Aug 11

With the launch of Drupal 9 in June 2020, the topic of Drupal migration is fresh on everyone’s mind. We will be delving deeper into the nitty-gritty around the topic in this blog. 

Migration is the process where the content from the old site, converted into the desired format and is saved in the new site. Sometimes, migration is a simple activity of mapping the source content to the destination content types, and sometimes, it is a bit more complicated.

Let's take a comprehensive look at the Drupal migration process in context to the recently launched Drupal 9, and what’s involved in migrating from different versions.

Drupal 9 is here, and regardless of being on Drupal 7 or 8, you can start preparing to upgrade. Find out how the migration process will affect your site and how to prepare!

01. Drupal 7, 8, and 9

02. Migrating Then and Now

03. Drupal to Drupal Migration

04. Migration from external sources

05. What’s More?

 

Drupal 7, 8, and 9

Drupal has earned a reputation as a great choice for enterprise-level websites and web applications. Drupal 7 was launched in 2011, and its improved JavaScript and CSS optimization made it so popular that a large number of businesses are still on it. 
 

Introduction of Drupal 8

Drupal 8 was introduced with numerous benefits, boasting extensive support for accessibility standards, with Semantic HTML5 that creates more usable interactions and adopts more WAI-ARIA practices, and much more.

Find out what to look for in Drupal 9 based on what we saw during the Drupal 8 journey and why migrate to the latest release.

Drupal 8 also said goodbye to PHPTemplate and rely on readable code when theming with Twig. However, these technical advancements came with a bit of a migration challenge.  
 

The Transition

It’s no secret that the migration process from Drupal 7 to 8 involved a number of challenges. Many questioned the need to migrate from Drupal 6/7 as they were hesitant about the migration process itself. The community has taken a huge leap in the migration process from Drupal 7 to Drupal 9. 

Read about the importance of migrating to Drupal 9 for Drupal 6 & 7 users and the consequences of not migrating to Drupal 8 before its end-of-life.

The infamous Drupal 7 to 8 migration challenged teams' technical capabilities and relied on the business priorities too. However, the Drupal 8 to 9 migration has no such hassles. If you are at the latest version of Drupal 8, then transitioning to Drupal 9 is very similar to a minor upgrade. 

Migrating Then and Now

The most important part of migration is planning and preparing. As a business, you should be able to assess the feasibility of performing a successful migration. To give an overview, it starts with analyzing your source data, managing important files and content, lots of testing, and so on.

The community recommends updating the core to the latest version available to ensure the site’s security and uninterrupted functioning. Using the dependency manager for PHP, Composer, you can update and install packages (modules) in Drupal.

Drupal to Drupal Migration

While moving your Drupal 6/7 site to Drupal 8, most of your time would be spent working in the Migration or Migration Group config. Also, you’d want to declare the different Process Plugins to be used and the Destination Plugins for all of the core entity types included in Drupal core. 

Drupal has reached the highest level of scalability and efficiency with object-oriented code, the latest PHP standards, more unified APIs to add power to your site. 

The entire Drupal 8/9 content migration process is also a brief series of easy steps and offers greater flexibility to tweak the content architecture.

Learn the importance of data and how to execute the content migration with a plan and available modules.

Migration from external sources

If you are on a non-Drupal CMS, like WordPress, then the process starts with Setup Migrate Demo Site and Source Data for data migration. The well structured Drupal 8 makes the execution easier and manageable. An average Drupal developer will have no issue understanding the database structures of both sites, and they can write a series of SQL queries that copy the content from any non-Drupal database to the Drupal database.

Also, there are contributed modules to migrate your non-Drupal website to Drupal. For example, the Migrate API provides services for migrating data from a source system to Drupal 8. Even the Drupal theming is a breeze now with the new Twig template engine. 

What’s More?

Drupal 7 and Drupal 8 are reaching end-of-life in November 2021 and 2022, respectively. This will leave Drupal 9 as the standalone version in the community with support. It won’t be too long before Drupal 10 makes an entry after that, so do make sure you complete your migration well in time.

Read about how we migrated millions of content items to Drupal for Lonely Planet. Axelerant team members helped familiarize Lonely Planet’s team with Drupal 8 migration best practices and streamline the migration process.

Aug 11 2021
Aug 11

After over a year of planning, the Discover Drupal 2021 student cohort began their journey in July! This year we have eight students. We will be highlighting each student who has opted in to share their personal journey. This month we welcome Nadia Faucon as our featured student! 

Nadia currently lives in Arizona and is completing the Discover Drupal site-builder pathway.  She joined the program with some experience using Drupal 7 as a website technician for 3 years. Below is a brief interview with Nadia.

Tell us a little about you.  What are your hobbies and interests?
I enjoy traveling abroad and within the US, I visited 7 Countries and 6 States and still have plenty to visit. I enjoy cooking, hosting parties with my amazing friends who are from different cultures and backgrounds, and attending cultural events.

What is your ultimate goal in learning Drupal?
Obtain a Drupal Acquia Certification Site Builder, Front end Developer, and start building my portfolio.

What are you most excited about regarding this program?
The program is taught by a panel of Drupal experts like Mediacurent, Evolving Web, and Drupal Easy.  More than 20 Mentors at our disposition to help us learn and grow. Isn't that amazing!!! I feel so lucky to be part of this program and grateful for the opportunity!!!!!!

Where would you like to take your career in Drupal?
I’d like to be able to do freelance work for Drupal agencies and give back to the Drupal community by sharing the knowledge I learned and learn more from other Drupal experts.

If you see Nadia online in Drupal Slack or at any upcoming Drupal events, please give her a warm welcome.  Her Slack user name is Nadia Faucon. 

Thank you to our Partners and Sponsors

We want to thank our founding partner, Kanopi Studios, and especially Allison Manley for her hard work and dedication to the program.  We also want to thank our platinum sponsors: Lullabot and Elevated Third for the financial support that has been instrumental in launching this program.  Finally thank you to our excellent training partners, Drupal Easy, Evolving Web, Mediacurrent, and Drupalize.me .

If you’d like more information about the program or would like to become a supporting donor, please reach out to us a [email protected]

Aug 11 2021
Aug 11

Decoupling separates the system that stores the content from how that content is displayed on other independent systems. This can come with many benefits but also some downsides and tradeoffs. Go in with both eyes open as you decide whether to decouple or not.

With progressive decoupling, you can get some of the benefits of decoupling while avoiding some of the downsides. 

There are several ways to decouple a website progressively, but this article makes the case that widgets provide the most flexibility.

What are widgets?

Widgets are stand-alone JavaScript (JS) applications that are framework-agnostic and are designed to be embedded and configured by CMS editors.

Widgets can be vanilla JS or use frameworks like Vue or React.

Why JS over server-generated HTML?

Better reactivity and interactivity

The pages can be static or served from cache (very fast), and JS can be sprinkled on top.  The server can provide the unchanging parts, while the JS application adds interactivity. 

This reduces the load on your servers while increasing website performance. You keep the benefits of built-in CMS performance tooling.

Distributed delivery

Different development teams can write software independently. They can publish software on the same platform without coordinating complex deployment efforts.

  • Teams write the JS code in isolation
  • The browser executes the JS
  • Different deployment pipelines and servers can be used.

One team works on the navigation, one team works on the main feature set, and one team works on a price calculator.

Biggest talent pool

According to extensive surveys, JS and TypeScript (a superset of JS) are the most commonly used languages, based on Stackoverflow’s yearly survey.

By building pages and experiences in JS, you can pull talent from a bigger pool. You have more options.

Better developer experience

Since JS is so popular, your developers can leverage many tools, services, and frameworks. Jest, Storybook, Husky, Gulp, for things like unit testing, component management, setting githooks, etc. Many services integrate with the technology.

Many platforms will give you better support, which leads to better workflows, which hopefully leads to better code—things like visual diffs, code quality analysis,  and code deployment. Popularity leads to a flourishing ecosystem.

In addition, frameworks like Vue can take care of some of the rough edges.

Should we just build JS applications then?

Yes and no. We still care about the content. Content is the heart of the web. You can have a great user experience, but without content, your project is doomed to fail.

To manage content, you need a CMS. Especially if content is your product or is central to your business. A CMS provides many features that are hard to build from scratch.

  • Managing pages and setting up URLs
  • Users and access restrictions
  • SEO metadata
  • Media library
  • Security patches
  • Editorially controlled layouts
  • Moderation and previews

Why widgets?

We have a CMS. We know we want to use some JS. Why not put JS in our CMS templates?

This works. You can certainly go that route. But widgets have some advantages over JS in the template.

They require no CMS deployments

A developer creates a new widget in the registry, and it appears in the CMS editorial interface for embedding. No additional effort. Bug fixes and enhancements are also instantaneous.

Here is what a traditional deployment might look like:

  1. Develop JS app
  2. Integrate it with a CMS template (and with the content model if you want the app to receive editorial input)
  3. Deploy both in conjunction since they are coupled together
  4. Editors can expose the JS app to end-users

Widgets allow you to skip the two middle steps. When you use the existing CMS integrations, development is only done in JS, and it can be deployed on its own. No need to call in a CMS developer to add new widgets or update existing widgets.

A widget deployment looks like this:

Embedded and controlled by editors

JS developers can create flexible applications that allow for tweaked experiences and configuration. A single widget can act as multiple similar widgets.

JS developers define the input data they expect from editors, and the CMS creates a form for the editors to input that data. This allows many instances of the same type of widget to be embedded with different configurations: different content, color palettes, external integrations, etc.

The following example defines a customizable button that the editor can configure.

settingsSchema: {
  type: 'object',
  additionalProperties: false,
  properties: {
    fields: {
      type: 'object',
      properties: {
        'button-text': {
          type: 'string',
          title: 'Button text',
          description:
            'Some random string to be displayed.',
          examples: ['I am a button', 'Please, click me'],
        },
      },
    },
  },
},
title: 'Example Widget',
status: 'stable',

The CMS integration, which can be defined up-front, reads the definition and presents the proper form elements to the editor.

Embedded anywhere

Since widgets are not embedded at build time, but editorially, they can be placed anywhere. If the JS is in the template, you can’t choose, for example, to insert the JS app between two paragraphs of the body field. And changing the position would require a CMS deployment.

With widgets, editors can insert them anywhere.

  • Using layout building tools
  • Using WYSIWYG integrations
  • Using content modeling tools (entity reference field that points to a widget instance)
  • Using 3rd party JavaScript

And the same widget can work for any CMS. As long as the CMS subscribes to the registry and can read the schema, it can embed the JS application. When you change or fix something in the JS app, it is distributed to all CMSs. Widgets can also work in static HTML pages and Optimizely pages. Anywhere.

When are widgets a good fit?

Structured content is still the way to go. You don’t have to use widgets everywhere, but they are useful in several contexts.

  • Interacting with 3rd party APIs - reviews sites (g2crowd), commenting
  • Interactive tools - pricing calculators, checklists saving progress
  • Data visualizations - maps, charts of COVID data
  • Adding some pop to a page - you can do some things with JS that may be difficult to achieve when limited to HTML and CSS

How to get started

Create a widget

From a technical perspective, a widget is a function that takes a DOM id and renders JS in it. A widget can also receive arguments as HTML data.

Here is an example of rendering a React component:

window.renderExampleWidget = function(instanceId) {
  const element = document.getElementById(instanceId);
  const title = element.getAttribute('data-button-text');
  ReactDOM.render(
    ,
    element,
  );
};

It is very easy to port existing components and re-use them.

Upload the app code

The code needs to live somewhere accessible to the internet (Github pages, Amazon s3 bucket, etc.). The CMS can use this to either download the files or serve them from there. We don’t want to bundle the files within the CMS because that introduces coupling again.

Publish the metadata

This is the tricky part. Without the metadata, this is just another JS application in some repo. 

We need a registry, which is just a JSON document containing the metadata about all the available apps that can be downloaded from the internet. An array of objects. This includes the “directoryUrl,” which defines exactly where the files live. You can also see the “settingsSchema” property, which defines the shape of the input data this widget will accept.

[
  {
    "repositoryUrl": "https://github.com/js-widgets/example-widget",
    "shortcode": "example-widget",
    "version": "v1.0.4",
    "title": "Example Widget"
    "description": "This is a widget example that showcases some of the features of the JS Widgets project."
    "directoryUrl": "https://static.mateuaguilo.com/widgets/sandbox/example-widget/v1",
    "files": [
      "css/main.css",
      "js/main.js",
      "media/logo.png",
      "thumbnail.svg"
    ],
    "availableTranslations": [
      "en",
      "de",
      "es",
      "pl",
      "pt",
      "zh-tw"
    ],
    "settingsSchema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "fields": {"type": "object"...}
      },
    },
  },
]

This file will need to be uploaded somewhere that is accessible via HTTP.

The CMS pulls that JSON object and knows about all the widgets and where to grab their assets. You’ll start seeing widgets appear in your editorial tools.

Ok…but where do I actually start?

There are lots of existing tooling and examples at https://github.com/js-widgets. It includes a registry boilerplate and catalog, widget examples, and CI/CD integration.

If you fork it, you’ll get a lot of nice things out of the box.

Stakeholder-ready catalog

The same registry that provides information to the CMS can provide information to a single-page application that is browsable and searchable. This requires zero effort. Everyone involved can see what is available: editors, developers, stakeholders, etc.

The catalog can also render a widget as a live sample, even if the widget requires editorial inputs. Examples utilize the “examples” key as shown in the widget definition above.

Governance like you need it

All of this might seem like a governance nightmare. Do you really want JavaScript updated in a remote location and immediately deployed to your live site?

Of course not. 

You decide what registries to accept into your CMS. You decide what widgets and updates go into your registry. You decide who has access to change those widgets and registries.

Production-ready dependencies

We want these widgets as light as possible. What if there was a way not to bundle big dependencies in every single JS app? We don’t want to download React for every widget, for example.

Shared dependencies are possible with this paradigm. Widgets can be configured to pull certain dependencies from the parent container. This requires some Webpack configuration and telling the CMS where to find the excluded libraries. Read the documentation for external dependencies here.

Conclusion

We hope this makes you excited to start taking advantage of widgets and progressive decoupling. For more videos on the specifics of setting this up, take a look at these additional videos:

Lullabot has been helping companies take advantage of progressive decoupling for years and on websites that get a lot of traffic. This paradigm is battle-tested. If you want help getting started, please contact us.

Aug 11 2021
Aug 11

Everybody needs healthcare at some point of their lives. Typically, a patient (also read as consumer) will resort to the internet to choose a healthcare provider. Once they choose a suitable or hight-rated provider and before they make that call, your potential patient will want to know more about your services, specializations, nearest locations, and doctors. They might also want to find out from the portal about their previous health records, schedule/re-schedule appointments, check on their prescriptions, etc.

Like every organization, healthcare providers too need an online representation for healthier marketing. Being open-source, extensible, secure, and highly customizable, Drupal seems to be the ideal choice of CMS for any healthcare organization looking to stay ahead of the competition. Not surprisingly, healthcare organizations like Pfizer, Moderna, The BMJ, Children’s hospital LA, Johnson and Johnson, Inova, Aster hospitals and others, rely on Drupal to meet their digital experience demands.

Let us delve deeper into some of the features that healthcare websites must have and how Drupal aligns with the requirements. See how we helped Aster Hospitals, a global healthcare provider, enable a cohesive web experience across their multiple regional websites.

Drupal Healthcare

Intuitive User Experience Design

A well-designed and intuitive user experience is a must-have for all websites providing services/products to consumers. Healthcare websites need special attention as it proves to be a great marketing asset. Most of the website visitors arrive on a healthcare website to look for information like the number of branches available, their locations, what specializations are offered, doctors’ information and more. Being able to provide this information aesthetically and intuitively should be of primary focus for any healthcare website.

With tons of compelling UX capabilities that Drupal offers, it is easy for healthcare providers to stay on top of their competition. Drupal offers responsive web design right out of the box so that customers can view healthcare information beautifully on any device. With features that can enable page caching and optimized image, you can offer fast-loading websites to your customers. If your healthcare system is spread across the world, you can leverage Drupal’s multilingual feature to deliver translated content easily. There are many modules that can elevate your site navigation like the Menu block module, Easy Breadcrumb module, Superfish module, Cheeseburger menu module and many more. To assess how well your design is performing, Drupal also provides you with many A/B testing modules like the A/B test JS module and the Webform A/B testing module.

Fine-tuned Searching

Customers or patients are always looking for information when they visit a healthcare website. And offering only an intuitive navigation system is not always enough. A simple yet fine-tunable search functionality can be an added benefit that can put your visitors at ease. 

Searching

Drupal offers many ways to integrate powerful search functionalities like the Search API module which is an out-of-the-box module providing a framework to build searches using any search engine. It also supports facetted search for more polished search capabilities. Elasticsearch and Apache Solr are other search integrations provided by Drupal for high performing searches.

Cohesive Web Experience

More often than not, healthcare sectors have various regional websites that need to function independently and individually but yet come under one umbrella. These independent healthcare units also need to be able to exchange patient information within themselves be able to assure quality and minimize any medical errors. 

Drupal’s multisite feature allows healthcare organizations to do all of this and more. It allows independent sites to be served from a single codebase while each of them can have their own databases and configurations. With Drupal 8’s component-based development, regional marketing teams can create individual webpages or functionalities without worrying about UI/UX inconsistencies and defined UX discrepancies. 

Third party Integrations

Health Care web applications need to integrate with third party APIs to be able to connect better to databases of information and to link between different sectors of health care for smooth transmission of information. Oftentimes, healthcare websites will need to connect with third part sites for managing appointment booking, video consultation, health record management and other services.
 
Drupal is supremely extensible and can integrate with third party API’s seamlessly and efficiently. For an experienced Drupal developer, it is very easy to write API’s and create custom integration points for any third-party platform.

Accessing and Creating Content

For a healthcare website with multiple branches, content creation, access and workflow need to be managed carefully. Marketing teams for various regional branches will need to have access to create compelling content as and when required. All of this without having a dependency of one another. 

Drupal’s strength lies in its capabilities of managing multiple sites with multiple users handling multiple content types. Content management and creation is easy with rich text editors like the WYSIWYG and modules like Paragraphs and Layout Builder. Modules like the Media module allows users to embed and manage rice media content. Drupal’s content access and role-based access system offers marketing teams with required control over their content. Modules like the Workbench module helps build a systematic workflow system for site contributors to create and find their own content. Drupal supports a configurable workflow system that can be programmed and administratively overwritten.

Securing HealthCare

With a number of critical healthcare and personal information being passed on from one health sector to another, there’s an absolute necessity for this information to be secure and to avoid privacy violations.

Drupal is famously known for the security it provides and this is proven when government sites like the Whitehouse, Department of Defence (DOD), NASA, etc. are powered by Drupal. It safeguards patient data with a HIPAA compliant encryption system. A high level of permission control can be set to be able to access sections of the website. These security permissions are also customizable to suit your exact security requirements. Drupal’s granular user access control system, database encryption, strong password protection modules and policies are a few top security features to name. The Drupal Security team also constantly monitors and responds to security issues that are reported. When a security issue is found, they make sure fixes and patches are released asap.

The Impact of the Acts

The Health Information Technology for Economic and Clinical Health (HITECH) Act, Affordable Care Act and Meaningful Use are administration mandates passed in 2009 in the United States of America that promotes the use of IT in the health industry. All health care providers across the U.S were encouraged to adopt an interoperable Electronic Health Records (EHR) system to improve the quality of health care, reduce medical errors, reduced costs etc. Let’s face it.  EHR systems are expensive, sometimes costing millions of dollars up front. There are a lot of overheads like hardware costs (servers and computers), software costs, training costs, maintenance costs etc., which a healthcare organization will need to splurge on.

However, implementing EHRs means higher expenses, workflow changes, loss of productivity temporarily during adoption of the EHR system and many more challenges that the healthcare industry would have to face. Being an open-source platform, development costs are drastically reduced while the quality and stability of the website soars high. There are over thousands of contributed modules that are free and that are specifically built for the healthcare industry, thus also reducing development time.

Aug 11 2021
Aug 11

Drupal Diversity & Inclusion, an independent working group within the Drupal community, is holding the first ever Drupal Diversity & Inclusion (DDI) Camp! The aim of the working group is to bring new voices and important topics together into a relaxed and fun virtual conference. You are invited to join Addi, Ashley, and myself online this weekend, August 13 & 14, for two days of fantastic content from community speakers.

There is something amazing about attending a conference and feeling like you've found your people. In the case of the DDI Camp happening this weekend, I think it will be amazing to discover something--rather, someone--new in a community I thought I knew pretty well after over a decade of involvement.

Drupal folks have been putting on events for ages now and you might think that in such a "mature" community, there really isn't anything new to learn or anyone new to hear from. Or you might feel that while you're steadily learning more about Drupal, you've yet to find a career path or a niche in the community where you can get involved in a meaningful way.

I think that the DDI Camp will be a place where you can hear about important topics from a variety of perspectives and in doing so refresh your understanding of a subject important to you and your work. I think it will also be an opportunity to learn about promising career pathways that reinvigorate your aspirations for the future.

Browse the 2-day program here, which includes topics such as:

  • Career pathways in Drupal
  • People management
  • Supporting various communities and causes
  • Personal growth and tools for success
  • Accessibility
  • Finding a niche in the community
  • Lightning talks

My impression of the program is there is something for a range of folks, whether you are coding all day or managing teams (or both!). I'm excited to learn something new and also connect with amazing folks in the Drupal community.

Register now and plan to attend a relaxed and fun 2-day virtual conference.

Tickets are affordably priced and still available. Three of us here at Osio Labs will be attending (our CEO, Addison Berry; People and Technical Support lead, Ashley Jones; and myself, Trainer and Production manager for Drupalize.Me). Feel free to say "hi" in the event chat room!

Get your ticket and we'll see you (virtually!) this weekend at the 2021 DDI Camp!

Aug 10 2021
Aug 10

Our schedule is now live online so you can review the sessions, plan out your schedule, and then register so you won't miss a thing! Thanks again to all the fantastic session submissions. We think we have a great line up for you folks.

Register now

Drupal Diversity & Inclusion, an independent working group within the Drupal community, is holding the first ever Drupal Diversity & Inclusion (DDI) camp! Our aim is to bring new voices and important topics together into a relaxed and fun virtual conference. Join us in #diversity-inclusion on Drupal Slack for real time updates on DDI Camp 2021! An alternate view of the programming can be found using our session list.

Contribute to the AMA session

We have a very awesome guest, Katie MacGonigal, at DDI Camp doing an AMA (ask me anything!) on inclusivity and hiring: Getting hired, hiring diverse talent, building diversity at your org, all the things. She’s got tons of experience in the field and lots of wisdom to share. 

Let us know what you’re curious about related to getting hired, writing your resume, hiring marginalized candidates, and building an inclusive culture. 

Submit your questions today


 

Aug 10 2021
Aug 10

The new security firewall from the Drupal Association is already protecting thousands of sites, and is now available to any Drupal site owner.

After a successful first year, the Drupal Association’s web application firewall, Drupal Steward, is launching a new community tier, making the enhanced security available to all Drupal site owners. 

Drupal Steward provides Drupal-built websites with an additional level of security, bridging the gap between the time when a security release is announced and a site is fully updated with the new security patch. This gives IT teams flexibility to implement site updates on their own timeline, without disrupting other priorities. 

"Acquia hosts the most demanding Drupal applications for global enterprises," said Robert Former, Chief Information Security Officer at Acquia. "Our participation in Drupal Steward provides them with a valuable layer of additional security that helps ensure that any vulnerabilities are handled quickly, without disrupting application in production. Acquia's support for this important program also supports all Drupal users, benefiting all in the community."

The globally distributed service provides seamless, immediate protection by routing a website’s domain to Drupal Steward, which automatically filters requests through the firewall. Any malicious requests are automatically blocked, giving IT teams the time they need to test and implement security updates.

New community tier extends protection to all Drupal site owners

Drupal Steward’s founding partners, Acquia and Pantheon, have implemented Drupal Steward protection across their entire platforms, protecting thousands of sites worldwide. Both founding partners have renewed their participation, and their support has made it possible for the Drupal Security Team and the Drupal Association to launch a new community tier of the program. This new tier makes Drupal Steward protection available to any Drupal site owner, with affordable pricing on a sliding scale based on the number of requests a particular site receives. 

How to sign up for Drupal Steward protection

Site owners who would like to join the community tier can sign up for Drupal Steward by creating an account on drupalsteward.org, where they’ll also find a calculator to estimate pricing. Drupal agencies can also purchase protection on behalf of their clients, enhancing the security service they provide and giving their clients peace of mind that their data and end customers are protected from malicious actors.

Thank you to our founding and supporting partners

The Drupal Association and the The Drupal Security team would like to thank our platform partners, Acquia and Pantheon, as well as our supporting partners, whose support of the Drupal Association makes them eligible to offer Drupal Steward to their clients at preferred pricing levels. Their early support has made it possible for us to launch the community tier and make Drupal Steward more widely available.

Closing the gap between patch release and the time it takes an IT team to respond has been one of the last hard problems in working with open source software. Drupal Steward not only solves that, so that IT leaders who depend on Drupal can sleep soundly. 
Tim Lehnen - Drupal Association, CTO 

About Drupal Steward

Drupal Steward is a web application firewall that protects sites from breaches in the vulnerable time between when a security release is announced and a patch can be implemented. The globally distributed service provides immediate, affordable protection while giving IT teams the flexibility to address vulnerabilities on their own time — without needing to be on-call or working overtime to stay ahead of hackers. Funding from Drupal Steward directly supports the Drupal Association and its mission to help the global Drupal community build with and contribute to the Drupal platform. 

About Drupal and the Drupal Association

Drupal is the open source digital experience platform used by millions of people and organizations around the world, made possible by a community of 100,000-plus contributors and equipping more than 1.3 million users with resources and support on Drupal.org. The Drupal Association is the nonprofit organization focused on accelerating Drupal, fostering the growth of the Drupal community, and supporting the project’s vision to create a safe, secure, and open web for everyone.

###

For more information contact Tim Lehnen, [email protected]

Aug 10 2021
Aug 10

8 minute read Published: 10 Aug, 2021 Author: Matt Parker
Drupal Planet , Migrations , Drupal

This is the first in a series of blog posts on writing migrations for contrib modules:

Stay tuned for more in this series!

Background

Besides helping small teams do big things at Consensus Enterprises during the week, I also work part-time for a small family business. Naturally, I built the business’ website in Drupal (initially Drupal 6, now Drupal 7), and, like many other small sites, I took a low-code approach by assembling its functionality using configuration and 63 contrib projects. To make the best use of my budget, I focused my custom development efforts on making a unique theme.

But, 8 years on, the website’s theme is looking a bit dated, Drupal 7 is quickly reaching the end of free support, and the small family business I built it for doesn’t have a budget for paid Drupal 7 support. I want to upgrade the site to Drupal 9.

Happily, Drupal 8 and 9 have a simple Drupal-to-Drupal migration wizard, and the community has a fantastic Core migration team, so migrating from D7 Core to D8+ Core is easy and has a great user experience! (seriously — the past and present Core migration team deserves a lot of credit!)

Problem / motivation

While migrating Drupal 6 or 7 Core to Drupal 8 or 9 Core is extremely easy, there are still many contrib modules without any migrations. Any sites built using a low-code approach likely use a lot of contrib modules — and are therefore blocked from migrating because of contrib!

For my small business website, when I went through the migration wizard, and reached the “What will be upgraded?” step, I saw 104 “Modules that will not be upgraded”, compared with only 32 “Modules that will be upgraded”1!

Honestly, I felt pretty discouraged when I saw that, even though I have the knowledge and experience to write the migrations myself!

I don’t think it would be too much of a stretch to imagine that other Site Builders faced with the same situation might consider putting off the upgrade, or abandoning Drupal for a closed hosting platform.

As of this writing, the official Usage statistics for Drupal Core show that there are around 600,000 other Drupal 7 sites — Drupal 7 still powers about 60% of all Drupal sites! (This fact should, perhaps, garner more attention than it does.)

Anyway, During the April 2021 DrupalCon, when Dries said that we need to go back to our Site Builder roots and make Drupal the go-to technology for site builders experience, he hit the nail on the head… Migrating contrib is part of the Site Builder experience too!

How can I help? Why should I help?

Hopefully, your thought is, “I work with Drupal too, and I want to help the Drupal community achieve its strategic initiatives — Can I help?” The answer is, “Yes!”

It is actually pretty easy to write migrations! This makes them a great way for you and/or your employer to gain recognition in the Drupal community through contribution credits. Plus, you’ll get some valuable experience with both Drupal 7 and 8.

Proposed resolution

In this blog series, I will walk you through the ways that I contribute to improve the migration experience for Site Builders, so that you can do those things too! Hopefully, by combining our efforts, you and I can make things easier for anyone who needs to migrate a Drupal 7 site to Drupal 8 or 9 (myself included), and help the Drupal community to achieve our strategic initiatives!

This blog series will be geared towards people who:

  1. know how to download and install Drupal 8 or 9 and contrib modules on their workstation (with or without composer),
  2. know how to apply a patch,
  3. are comfortable doing a little bit of development work (mainly writing YAML files),
  4. are self-motivated to read publicly-available documentation and code,
  5. want to help, and,
  6. don’t mind engaging with the Drupal community.

Steps to complete

Let’s start off this blog series with something easy: setting up test sites and running a simple migration of Drupal core.

Setting up your test sites

First, you need to set up a Drupal 7 site to be your migration source. If you haven’t set up Drupal 7 before, it’s pretty easy: download the tarball or zip from the Core project page, extract it into a folder, set your HTTP Server (ideally Apache) to serve the folder containing index.php (there is no web/ or html/ folder in D7), and visit the site in a web browser to begin the installation process (which looks a lot like the Drupal 8 or 9 install process). Install the D7 site using the Standard install profile in the first step.

You’ll also need to set up a Drupal 9 test site to be your migration destination. This blog series assumes you already know how to do this. Install the D9 site using the Standard install profile in the first step.

A note about Drupal 6

Drupal 6 has much less usage than Drupal 7 (about 17,000 sites, or about 1.7% of Drupal’s total market share, as of this writing), and it requires a version of PHP between 4.3.5 and 5.3.

You can certainly test migrations with Drupal 6 if you want, but be aware that it has already reached end-of-life and has known security vulnerabilities (so only install it where it can be accessed by people you trust, i.e.: not visible to the Internet), and while its install process is similar to D7’s, its PHP version requirements are not, and switching PHP versions will make it annoying to work with.

Preparing data and config to migrate

Once you’ve got the Drupal 7 site set up, enable some modules (core modules for now - we’ll talk about contrib modules in a future post), configure them, and create a small amount of content. Keep track of what you’re doing, so you can see how it gets migrated later.

Running the migration

Here’s where it gets interesting! On your Drupal 9 site,

  1. At /admin/modules, install core’s Migrate (migrate), Migrate Drupal (migrate_drupal), and Migrate Drupal UI (migrate_drupal_ui) modules (in the “Migration” group).
    Make sure any other modules that you installed/enabled on the Drupal 7 site (i.e.: when you were creating data to migrate) are also installed/enabled on the D9 site.
  2. If you wish, make a database backup of the D9 site, so that you can easily re-run the migration process (at time-of-writing, rollbacks were not yet supported through the user interface - although you could run them from the command-line).
  3. Start the migration wizard by going to /upgrade:
    1. Read the first page and click Continue
    2. On the second page, select Drupal 7 as the version of Drupal you’re migrating from, choose the database type (note MariaDB is roughly equivalent to MySQL), and enter the D7 site’s database connection information (i.e.: so the D9 site can connect to the D7 site’s database directly). Set up the Source files section if applicable, and click Review upgrade.
      • If you’re using [Ddev][ddev], make sure both the D7 and D9 projects are running; then the “Database host” should be ddev-D7_PROJECT_NAME-db, and the “Port number” should be 3306
      • If you’re using Lando, make sure both the D7 and D9 apps are running; then the “Database host” should be database.D7_APP_NAME.internal, and the “Port number” should be 3306
    3. If you see an “Upgrade analysis report”, read it and click I acknowledge... (multilingual migrations can be flakey)
    4. Read the “What will be upgraded?” report, and click Perform upgrade
      • If you enabled some modules on D7, but you didn’t enable the corresponding modules in D9 before starting the upgrade process, they will appear as “Modules that will not be upgraded” here.
      • Contrib modules without migrations — what this blog series is intended to help change — will appear as “Modules that will not be upgraded” in this step of the migration wizard.
    5. When the upgrade is complete, you’ll be returned to the site’s front page.

Congratulations, you’re done: you can now explore the D9 site and see the users, content, configuration, etc. that was migrated from the D7 site!

If you go back to /upgrade, you’ll see “An upgrade has already been performed on this site”, and a button to “Import new configuration and content from the old site”, i.e.: things that had changed on the D7 site since the last migration.

Next steps

If you’d like to test out some already-working contrib migrations, try out the Recipe module.

In the next blog post, we’ll talk about reviewing migration patches.

One last thing: a Proposal for a migration issue tag

To close off this blog post, I’d like to propose that the Drupal.org issue tag maintainers add an official migration issue tag to the list of official issue tags.

A migration tag would make it a lot easier for Site Builders to find patches for their modules; and for contributors to write and review those patches.

You can weigh in on this proposal in issue #3227012

  1. I thought you said “63 contrib projects” earlier! Where did 103 modules come from? Recall that a project can have sub-modules/sub-themes - turns out 25 were sub-modules. 17 more were Features (i.e.: what we used before the Configuration Management Initiative). Another 5 were custom modules - I’ve gotta write migrations for those ones myself. ↩︎

The article Easy commit credits with migrations, part 1: Migrating Drupal Core first appeared on the Consensus Enterprises blog.

We've disabled blog comments to prevent spam, but if you have questions or comments about this post, get in touch!

Aug 10 2021
Aug 10

Every nonprofit organization is established with some definite goals and objectives that it opts to achieve. But are the nonprofits able to achieve their set up goals without facing any challenges? Not really. In this highly competitive world, these organizations find themselves struggling in finding ways to turn their vision into reality. So, in a situation like this, digital innovation can be the savior for the nonprofits. Updating to the latest technology is the smartest step a nonprofit can take to justify its organization’s mission, also successfully accomplishing the expected results and outcomes. Therefore, in this article we will discover how Drupal can pave the way to greater success in a nonprofit organization. 

The emerging need for nonprofit digital transformation 

Illustration diagram describing the ways in which nonprofits organizations are benefited by digital transformation


There are various angles to a digital transformation that it can be difficult for nonprofits that have been using similar IT systems for years. It is totally comprehensible to not know exactly where to start your digital transformation journey, or how each new technology will be beneficial to your organization. Therefore, these are the areas where your organization can be improved by adopting digital transformation. 

Building a digital first donor funding strategy

Digital transformation helps in availing innovative user experiences that enable in meeting new digital expectations of the nonprofit organizations. Modern technology has entirely transformed the digital expectations for employees, donors and other beneficiaries. Digital interaction is made easy by the help of smart devices, mobile apps, social media, artificial intelligence, Internet of Things and ecommerce that are majorly beneficial for these organizations. Online portals can be built for beneficiaries to contact the nonprofits, providing full transparency that would encourage the donors to contribute, making an easy access to organization services leading to trust building. Therefore, all these experiences bring a positive impact on the various fundraising programs conducted by the nonprofits to improve the user engagement and satisfaction. 

Online strategies can be developed to enhance the donors’ participation and reach them on their preferred channels to let them witness a great experience with the nonprofit organizations. 

There is an example, where Accenture helped a national microfinance organization on donor analytics by facilitating data capacities and advanced insights. The nonprofit gained various benefits like immediate visibility into donor demographics, improved funding behavior, lifetime value and many more. 

Empowering employees by using digital tools 

The COVID 19 brought a major transformation in the field of digital technology. There was a complete shift in the overall operation methods of the nonprofit organizations due to this pandemic. They started embracing new operating models, using the right digital tools and encouraging new ways of working to maximize performance. Along with the employees who endeavour to perform their work in the new environment, the beneficiaries should also learn to communicate with the organization in the new operating model. Some organizations tried making the digital tools easier for the beneficiaries to use and witness a seamless experience. 

One significant thing the nonprofits can do is to provide the front-line-employees with the correct data and insights , as it will help in serving the stakeholders more efficiently, who overall support the movement of a nonprofit organization in various ways. 

Since the digital economy is changing, it is crucially important for nonprofits to ensure that the operations they are working on are efficient and effective enough to achieve their organizational goals and objectives. To know more, learn how the Covid-19 pandemic propelled businesses to reimagine their businesses and how pandemic-driven digital transformation looks like.

Developing strategic partnerships

In the middle of the pandemic, the nonprofits receiving support from the profit earning organizations have taken a positive shift towards growth and development. Since some nonprofits fall behind in their digital capabilities, several technology companies have stepped in to provide free services for a limited time to get through this current crisis. The nonprofits have gained benefits from these corporate partnerships in many ways, huge marketing exposure, increased funding, shared resources and the capability to increase more volunteers. 

Some nonprofits abstain from getting involved in such partnerships without realizing the positive impact which can be obtained from it. And one important thing to be aware of is the selection of the right partners to work with. Since changing digital providers might lead to various inefficiencies in the long-term. But by choosing the right partnerships, nonprofits can sustain their operations and succeed in attaining their work plan and targets.

Providing support with the emerging technologies

Adopting the emerging transformational technologies by the nonprofits proves to be one of the best decisions as it helps in meeting the growing digital expectations. Such technologies are listed below.

  • Augmented Reality
  • Virtual Reality
  • Blockchain 

Augmented reality 

Augmented reality provides a live view of something in the real world. It basically blends the real world and virtual reality to improve the viewer’s insight of his or her surroundings. By adopting this technology, the nonprofits can gain many benefits. Firstly, it transports your organization’s constituents to the center of your cause. This helps in establishing a personal relationship between the organization and potential donors and volunteers, also building the necessary trust. For better understanding, a NPO, charity:water provides an example. In the December 2015 annual black tie fundraising banquet, by using augmented reality, the guests of the events were provided augmented reality headsets that virtually transported them to a small village in Ethiopia. They were taken through a week in the life of a 13-year-old Ethiopian girl through this technology, where they saw her family’s struggle for clean water firsthand.  By watching such a heart-breaking story, the guests were so moved by the experience, that they ended up contributing a total amount of $2.4 million. This technology also provides viewers real-time information. 

Virtual reality

We will understand this technology by the help of an example. A nonprofit organization, Pencils and Promise aims at providing education to children by building schools in the rural communities of less developed countries like Nicaragua and Laos. It is difficult to convince donors and investors to contribute while the construction is still half-a-world away. If by any chance, they contribute, a part of the donations are automatically funnelled towards the travel costs. So, virtual reality can be a perfect solution for such a problem. By using this technology, a one minute-and-a-half film was shot and the organization could surprisingly, raise a sum total of $1.9 million.

Blockchain

Blockchain helps nonprofits in various ways. It provides full transparency regarding tracking the transfer of funds from the donor to the beneficiary, scrutinizing the usage of funds and the overall activities of the organization. It helps in trust building between the donor and the beneficiary by providing the clarity of the necessary tracks and services. It is found that some donors wish to remain unknown, they want to support the nonprofits without revealing their identity. The traditional funding method failed to provide that facility, while blockchain is able to maintain confidentiality by providing the digital wallets facility. The intermediaries like banks and payment services do not fit in the architecture of the blockchain technology, so it helps in reducing the administrative costs of the nonprofits and also helps in smooth transfer of funds to the beneficiaries. Also read, how blockchain is revolutionising the education sector and digital media sector. 

Providing safe and secured user experience

You will not use technology, you don’t trust. Isn’t that obvious? So, this rule will be applicable for everyone, from volunteers and donors, to employees and beneficiaries. Though nonprofits come across cybersecurity attacks, recent studies revealed that nonprofits fall behind in adopting the robust policies and practices required to suitably secure their IT environments. 

Here is an example: Between 2016, December and 2017 April, the UK’s privacy regulator publicly exposed and charged 11 large charities for failing to follow UK privacy rules with regard to usage of donor information.  

Discovering new ways of working to secure your nonprofit’s future 

It is understandable that nonprofits go through a lot of challenges in this highly competitive world, but they can take all these situations as an opportunity to be creative and grow tremendously. Some organizations surrender and fail to overcome these challenges and others courageously adopt innovative new business processes and technologies to succeed in their mission. This process of adoption can be termed as digital transformation. The nonprofits can have a better understanding of digital transformation by observing the transformation journey of the leading private sector companies. Some of the ways in which the nonprofits can thrive in the digital world is by building flexible and robust technology service platforms that can free themselves from maintaining high-priced infrastructure which requires important levels of man-power and expertise.  

How can nonprofits kickstart their digital transformation journey

Illustration diagram describing the steps that can be followed by the nonprofits to start the digital transformation


Now let us take a glimpse of how a digital transformation takes place. Here are 5 major steps you can follow to get started.

Step 1

Establishing a common frame of reference. The first step is to build a common language and also frame a reference which all your stakeholders can look upto. The NGO Reference Model can be adopted and it will help you in visualizing the major connection points between process, people and technology in your organization.

Step 2

Assessing your present approach to digital technology to recognise gaps and opportunities. It is advisable to assess your present approach to technology over the four necessary outcomes of nonprofit digital strategy as discussed above. You can get started by completing the Nonprofit Digital Strategy Assessment to recognize current gaps in your approach to digital technology, also prioritizing opportunities for development, and get insights about exactly what the next level of transformation will look like. 

Step 3

Building consensus by explaining how digital strategy will transform your impact. The successful digital transformation strategies need strong support from the senior leadership, since the digital transformation impacts every single role within the organization, therefore, everybody has a role to play. A transformational digital strategy can be formed by building consensus and obtaining support from program teams, middle management and senior leadership to enhance the culture of innovation at the workplace. The leaders will have to take responsibility in actively engaging the volunteers, employees, donors and the beneficiaries to contribute their part in the process of this transformation. 

Step 4

Identifying ways to increase your security in the cloud. The nonprofits can improve their security by adopting the right cloud platform without any huge upfront investment. It is important for both cybersecurity and data-protection compliance. In fact, a major necessity of most comprehensive data-protection laws that includes the EU Data Protection Directive and the GDPR, is that companies handling personal data should take organizational and technical steps to maintain the security of any personal data they gather or process. To know more, read about GDPR and CCPA


Step 5

Start your digital transformation. After building the agreement that digital transformation is required, you can follow the respective process of Dream, Design, Deliver to form a transformative strategy. 

Dream. You can run a design thinking workshop to visualize the innovative scenario with your team.

Design. You need to align technology, process, and organizational change management plans into a time-phased common roadmap to deliver emphasized scenarios and impact.

Deliver. You need to execute process reengineering, technology solutions and organizational readiness, making sure that closed-loop measuring of learnings and impacts can be further utilized in the next stage of transformation. 

Drupal: The first choice for non-profit organizations

Illustration showing multiple squares describing the features of Drupal for nonprofits


Nonprofits need a platform that can simplify the donation procedure, build a secure site, share the organization’s mission through blogs, and set up online communication among the site organizers and visitors. Therefore, Drupal is the perfect CMS for a nonprofit website as it implements all types of functionality without any concerns. It further provides a wide range of exclusive features that meets all the expected standards of a nonprofit site. So, the below Drupal features prove that Drupal for nonprofits is the best choice.  

Open source

The Drupal project is entirely open-source software. You can download it completely free of cost, then use, work or share it with someone else too. It is based on some principles like globalism, collaboration and innovation. It can be further distributed under the terms of the GNU General Public License (GPL). There are no licensing fees for Drupal.

The Drupal community always supports its users by answering their queries and concerns. That means, if you have a question, someone surely will have the answer, as it's a worldwide platform. The Drupal developers get access to the worldwide community experience. 

Learn more about open source here:


Content workflow

Drupal’s in-built tools help in content creation, workflow and publishing, also letting the content creators to work on it easily without any concerns. Editorial workflows can be managed efficiently by permission and authentication available in this platform. The provision of previews gives the visibility of how the content will be displayed on a device before approving and publishing the content. It allows you to create content with a WYSIWYG editor. The facility of quickly tracking all revisions and changes are available, if you require to maintain a history of content changes. All the stages of content, from creating, reviewing, and publishing can be viewed, to help you manage your roles and actions. Drupal has an exclusive feature where you can create a structured content i.e. describe content elements, tag content based on any attributes, form suitable taxonomy for content so that it can be observed, used, reused if required in a manner that can enhance customer satisfaction.

Drupal gives you an opportunity to create the relevant content architecture using the Admin Interface or even do it programmatically. It provides you with unique mode tools and views, customizable menus that give a comfortable user experience, and create pathways to content across various devices.

Read about how layout builder and paragraphs module enhance content workflow in Drupal.

Security

Drupal CMS is free from all kinds of web security vulnerabilities and threats as it is completely safe and secure. Robust security is kept as a priority by Drupal. Drupal has a team of security experts that take care of all the security concerns with their well built coding standards and strict code review process. It also has a vast professional service provider security as they don’t want to take this important aspect, ‘security’ for granted. 

According to the 2020 edition of the Acunetix, Web Application Vulnerability Report, Drupal was found to be the most secure CMS in the open source CMS market.

Illustration with a circle describing the minimal security issues of Drupal for nonprofitsSource: Acunetix

Scalability and performance

Drupal built-in performance features that, combined with a modern CDN provider, performs exceptionally well under the pressure of supercharged databases, advanced caching and load balancing. Drupal’s scalability allows your website to perform remarkably well even on the busiest days.  To know more, read about Drupal’s performance optimisation offerings and how it scales with your needs to govern high web traffic.


Multilingual

The automated language translation of Drupal helps in reaching different audiences with localized content. Drupal specializes in building complex multilingual web applications and customized sites in various languages. Core modules in Drupal enable complete translation of every part of a site, content types and their specific fields, menus, users, blocks, taxonomy, comments and contact forms. It allows in recognizing the preferred language as per the user’s IP address, URL, browser settings, session and more. Read more about Drupal’s multilingual capabilities here.

Accessibility

Drupal provides a special feature of building websites that are accessible by people with disabilities. It makes sure that all its features conform with the World Wide Web Consortium guidelines (W3C) guidelines: WCAG 2.0 and ATAG 2.0. Such a feature of accessibility is very important as it is able to accomplish one of the most desired objectives of serving all the citizens without any discrimination. 

Learn more about accessibility here:

Personalisation

Drupal provides its users with an exclusive, personalized profile for every visitor such as using geolocation, browser history, behavior taxonomies and device type. You can get a customized experience that will help in tracking and reporting with A/B and multivariate testing, enhancing ROI through target marketing and also segmenting visitors over devices with an aim on the important user identity for your business goals and objectives.  

Learn more about personalisation here:

SEO

Drupal provides exclusive SEO tools that can enhance your site’s visibility. Below are the tools and modules.

To know more, read this definitive guide to Drupal SEO in 2021.

Multisite

With Drupal you can manage numerous sites across your company, geographies, brands and campaigns on a single platform, enabling smooth, quick website creation and deployment. Read this complete guide on Drupal multisite to know more.

Marketing automation

Using tools and modules in recent versions, Drupal facilitates easy integration with the automation platforms that can assemble customer demographics, also converting potential leads within the appropriate time. Learn more about how marketing automation can be leveraged with Drupal here.

Mobile first approach and mobile app delivery

Drupal helps in building responsive websites and creating web applications which can provide excellent visitor experiences. It provides responsive design best practices and assures your users receive the ultimate content experience every time, on each device. You will find two ways of building mobile web applications which work with Drupal - integrated with Drupal at the theme layer, or a standalone mobile web app that communicates with Drupal using web services. Although both the approaches will work for building mobile web applications, it will be much easier to begin with integrating the mobile web app into Drupal as a theme. To know more, read about mobile-first design approach and mobile apps like that of Flutter-powered delivered by Drupal.

Integrated Digital Tools and Applications

Drupal easily integrates with a broad ecosystem of digital marketing technology and other business applications that can help you choose the right set of tools today and also according to your comfort, flex with new tools tomorrow. 

Strong Stack Foundation

The latest LAMP technology stack like Linux, Apache, MySQL and PHP are the ones upon which Drupal lives since they meet the requirements of flexible, fast-moving agile organizations and brands that help in creating the next generation digital platforms. 

Decoupled Architecture

One of the features Drupal provides is the content flexibility that allows an easy flow of content over websites, native apps, connected devices which can be displayed on third party sites and social networks. As, many CMSes seek to manage content in a back-end repository and move it to “front-end” templates that can provide an experience (mostly static). There is a facility to decouple the back and front ends, wherever it's necessary. Hence, Drupal content remains as reusable chunks, that is free from presentation, also ready for smooth delivery to websites and applications. Content becomes future proof as well. Due to Drupal’s presentation i.e. RESTful API and neutral content, the front end developers can come out of the restrictions, helping them build interactive websites and applications, according to their convenience. Tools like  Angular, Node, Ember, Backbone, and others are available. You can obtain  third-party content(eg. syndicators and aggregators) and make it available to any website, app or channel under this platform. Drupal’s content can be easily consumed by other websites and applications with the help of Drupal’s content-as-a-service capability. Also Drupal’s front end developers can smoothly design content like for example, separating back-end content from front-end presentation according to their conveniences. 

Learn more about decoupled Drupal here:

Web Hosting

Drupal helps you to choose the best hosting vendor that suits your needs, you can change hosting vendors whenever you want, and also select to host the website internally. 

Migrations

The Drupal upgrades are referred to as easy and reliable. The upgradating of Drupal 8 to 9 was simple, as said by the makers. By following a four step guide, you can prepare your present site’s functionality, also maintaining proper security standards of Drupal 9 by utilizing the Upgrade Status. With the help of Upgrade Status and Drupal Module Upgrader , the developers are allowed to make the upgrade themselves. And it also further helps you to recognize whether your modules and themes are competent enough for Drupal 8/9 and convert your custom code accordingly.

Learn more about Drupal 9 upgrade here:

Extensibility

Drupal has various modules, themes and distributions to extend the functionalities.

Below are the examples of Drupal modules for non-profit:

Orcid

According to ORCHID.org, ORCID is an open, non-profit, community-driven effort to create and maintain a registry of unique researcher identifiers and a transparent method of linking research activities and outputs to these identifiers.

The Orchid module helps a user to create an account and login with ORCID OAuth2.

Campaign Kit

It is a flexible donation system that helps you to engage your supporters in the fund-raising activities. The Campaign Kit module is compatible with Drupal 9. It allows:

  • To create standalone campaigns (donate toward a specific goal)
  • Let your supporters create peer-to-peer Campaigns; that will allow the end user to create a child campaign (with a URL different from the parent campaign) and the amount raised rolls up to the parent campaign.
  • To create excitement with team competitions.
  • The site can display a donor wall.
  • Campaign queuing.
  • Availability of payment processors using the plug-in architecture.

There are many exclusive themes too that Drupal presents, like. 

YG Charity | Bootstrap based Drupal 9 theme for NGO

The YG Charity is the most suitable drupal theme for NGO, charity and non-profit organizations. The features of this theme include:

  • Drupal 8 and Drupal 9 core
  • Bootstrap v3.3.5
  • Causes and events sections
  • Team
  • Testimonials

Charity Zymphones Theme

The Charity Zymphones theme is specifically designed for charity, nonprofit, non-governmental organization (NGO), donation and fund-raising campaigns with exclusive features. You will find all the required features for a charity site with a complete responsive mobile-first layout. This theme perfectly fits in many displays and resolutions desktop screens, tablets, iPads, iPhones and small mobile devices. It is also compatible with Drupal 9.

There are various distribution options that Drupal has. Let’s now take a look at the Drupal distribution for nonprofits. 

Open Social

You can create digital spaces which allow your members to share with Open Social's out-of-the-box solution for your online community. International organizations around the world like The United Nations, Greenpeace, the European Commission, FIFA and many more use this distribution. With the help of this community engagement platform, the NGOs, governments and many organizations can connect to their members, volunteers and customers. 

Campaignion Starterkit

The Campaignion Starterkit is a Drupal Distribution for non-profits. It basically specializes in eCampaigning, online fundraising and also applies digital marketing best practices. It helps in:

  • Setting up online actions such as petitions, email protests or other landing pages with forms to capture leads.
  • Creating donation pages and allowing visitors to pay through paymill, stripe and direct debit.
  • Managing supporters in a CRM system (based on Redhen CRM, heavily customized)
  • Managing subscribers of your email list with third-party email marketing tools integrated.

To get more information, you can visit the Campaignion website and for documentation, you can  start with Campaignion core module

Drupal Commons

Drupal Commons is a "community collaboration website in a box" built on Drupal. The following are the help which you receive from this distribution.

  • You can answer the question, “How do you get started?”
  • By downloading a nightly snapshot, you can take a test of the development version of Commons.
  • You can provide e feedback on documentation, and also make requests for additional documentation.
  • Finally, it helps to work on an issue in another project with the commonslove tag.

Open Outreach

Open Outreach is an inexpensive and a quick way for nonprofits and community organizations to operate using Drupal with the web tools which they require for effective public engagement. It basically comprises the latest version of Drupal core and other modules and configures in advance the features frequently used by organizations such as events calendars, image and video handling, social media integration, and contact management. With this distribution, you can save a lot of time and money while building your non-profit websites.

Support and maintenance, hiring of developers, and partnering with digital agencies

There are various Drupal agencies you can go for. They try to provide quality services according to your requirements and choices. Here are the top 4 Drupal agencies in the global Drupal marketplace.

Illustration diagram describing the top 4 Drupal agencies for nonprofits in the global Drupal marketplaceSource: Drupal.org


Supporting emerging technologies

To deliver a better user experience, Drupal actively uses the latest technologies like artificial intelligence, machine learning, IoT and cognitive search and digital voice assistants like Alexa on Drupal sites. More on futuristic websites powered by Drupal here.

Hence, with the above features, Drupal nonprofit websites can be built according to your project's expectations and standards.

Success stories

Taking you through some case studies that proves Drupal as the best option to opt for in order to build a secure and user-friendly website.

The National Council for the Blind in Ireland (NCBI)

A screenshot of the National Council for the Blind in Ireland (NCBI) website's homepage


The National Council for the Blind in Ireland (NCBI) is a part of the project, Bookshare by Benetech. The council provides learning opportunities to those who struggle with visual impairment across the globe. It aims at providing accessibility for nearly 1.3 billion people worldwide. NCBI is actively working in their field but since they don’t have a website of their own, they are not able to let their constituents get access to their content in a digital format. Therefore, they wanted to share their materials easily in an online format to make people understand their vision and goals, and to make the site AAA compliant. After the large Bookshare platform was made available, NCBI could utilize the platform to partner with publishers in Ireland and share their materials. Availing strategy, design, front and back-end development of the platform in Drupal, Bookshare could be tailored to NCBI’s requirements and audiences to get access to reading. Now, by working with Kanopi, NCBI could provide excellent features like synchronized text and audio, searchable text and customizable font size and contrast to help visually impaired people with learning and literacy. NCBI finally has a AAA compliant site, with 800,000+ titles available to users. This was a big achievement for the team as they could manage to give such great accessibility to people around the globe with learning and education.

Drupal 8 Redesign for Non-profit, Synergos

A screenshot of the Synergos website's homepage


Synergos, a global nonprofit, has been committed to systemic change solutions to fight against poverty for over 25 years. The Synergos team was ready to rebuild their website for better engagement with the donors and supporters. The project aimed at bringing optimum exposure and audience engagement to Synergos.org, enabling users to smoothly find and engage with content, creating simple ways for users to learn about Synergos’ mission, activities, increasing support in the form of donations and email subscriptions, services and the easy ways of getting involved with them. Drupal brought a huge transformation by providing a fresh approach to digital strategy, a new design, allowing to engage with new partners, making funding secure, strengthening services. Drupal provided Synergos some exceptional results like the bounce rate improved by 19%, pages/sessions increased by 27%, session duration increased by 63%, and finally page load time was enhanced by 52% on tablet devices and mobile. Synergos overall got a very customized platform that helped in enhancing the user engagement and increasing their audience as well. 

Website Redesign in Drupal 8 Helps a Rockstar Nonprofit Get an Edge

A screenshot of the Youth on Record website's homepage


Youth on Record empowers high school students, the ones  who are underprivileged to prosper in their lives through the help of musical programs. It actively partners with local and national musicians, schools and treatment centers to provide them credit classes that are inspirational, engaging and culturally suitable for students. There was a problem with their website since it was unable to display the tangible impact of providing children access to get a learning experience from real artists and couldn’t support fundraising and event awareness endeavours. A new website information architecture, with an improved user experience and a responsive design was built on Drupal 8. There was a lot of content that Youth on Record had but it wasn’t well organized. So, along with choosing the right content, media too had to be well looked after or else it could lead to confusion. Here, Drupal 8 handled the situation by allowing an easy integration of external libraries. Therefore, it was pretty easy to include a library to handle execution of the Twitter API, that saved long working hours and cost, and also allowed Youth on Record’s content to be relevant. So, all the desired project’s outcomes were achieved such as the new Youth on Record website now acts both as a media center and resource for every aspect of the company. It enhanced fundraising, partnerships, more engagement of partner artists and followers. Drupal 8 provided a complete, future-proofed site that was launched on time within the planned budget and could also reach the client’s expectations. 

A Reimagined Rainforest Alliance on Drupal 8

A screenshot of the Rainforest Alliance website's homepage


Reimagined Rainforest has developed a repository of well structured content to support their vision and mission. The content is majorly displayed in long form text, there is also a broad variety of metadata and assets related with every piece of content. One of the major goals of the new site was the availability of the provision to discover new content on the website through automatic selection of similar content navigated by the metadata of the content the user was observing. Also, RA had a future plan for advanced authorization and publishing workflows to allow stakeholders, who aren’t from the web team to play a part in the content lifecycle. So, Drupal 8 was chosen for this project. Firstly, the focus on structured data suits Rainforest Alliance’s requirement for movable and searchable content. Secondly, due to the integrations with Apache Solr permitted for a nuanced content relation engine. Also Solr was utilized to power the several search interfaces. Thirdly, Drupal possesses strong workflow tools for managing content. Although the tools weren’t ready for Drupal 8, when they built it, the Drupal team knew that the tools would be easy to integrate, once they are completely ready. Therefore, it was proved that Drupal was the best choice for the project’s immediate need, and Drupal 8 was successful in meeting the organization’s long-term goals and aspirations. 

Conclusion

With the help of digital transformation, nonprofit organizations are able to enhance their impact on the society, reach their target audience and be prepared for any challenges that they might come across in the path of meeting their clear goals and objectives. In this digital transformation for nonprofits, Drupal plays a major role in turning their mission into reality, providing them the opportunity to work confidently in the field of technology and successfully help in achieving their work aspirations.

Aug 10 2021
Aug 10

In the first part of the series on Drupal security audits, we described how to review modules and libraries. However, modules and dependencies will be useless if any user will be able to see our custom routing where we display all the client information. Therefore, in this article we'll look at the configuration of our website. Correct configuration is one of the key elements affecting security.

Checking the Drupal configuration

For this part, our list will include checking the role permissions, access to the Drupal views and routings, among other things. We'll also verify the correctness of the text formats configuration and perform other checks to find the largest number of potential vectors of attack on our application.

Role permissions audit

By going to /admin/people/roles, we’ll see the list of all available roles.

The list of all available roles on our Drupal website, visible on the Roles page

 

In the list on the right (the OPERATIONS column), after clicking we can select the edit permissions option, which will redirect us to the page /admin/people/permissions/[machine_name_of_the_role] (example for the Anonymous role: /admin/people/permissions/anonymous). After going to the permissions edit, Drupal will list all the possible permissions that have been granted for the selected role.

After going to the permissions edit, we can see all permissions assigned to a particular role on a Drupal website

 

To verify the permissions, we should first consider what task is assigned to the role. We need to ask ourselves whether role X should have permission for action Y, for example: should the content editor role be able to edit all views? If the answer is no, the permissions should be restricted.

Full knowledge of the project is required for a permissions audit. If we find a permission that we believe a given role shouldn't have, we should only inform in the audit report about the possibility of the role having optional permissions. We'll provide more information on how to create a good report in one of the next articles in the Drupal security audit series.

View permissions audit

After auditing the roles, it's time to take a look at the views. They're all listed under /admin/structure/views.

A list of views available for a particular user, located on the Views page in Drupal

 

Our first task, in this case, will be to enter into the edit of each view that provides routing. We need to find the PAGE SETTINGS section, and more specifically – the Access option, which should only intentionally be set to "Unrestricted".

The Access option in the Page Settings section which is worth checking at the beginning of the views permissions audit

 

As is the case with the roles, when auditing the view permissions, we should ask ourselves: what restrictions should be put on the X view? If the view should be accessible to everyone, it's good practice to use a restriction which requires having permission to access the published content. If any of the views have no restrictions or we find them to be too moderate, we should inform about it in the report.

Audit of the routing.yml files in custom modules

When it comes to the routings created in custom modules, the audit looks similar. We should review every *.routing.yml file to ensure that every routing has the appropriate level of security. Here is an example of a new routing declaration

A new routing declaration can look this way

 

In this case, every user with the access content permission is permitted to access the /machine_name/transliterate page. It's also a good practice in this case to define a minimum access level for every access content routing.

Text formats audit

The path /admin/config/content/formats contains all the text formats available on the page. In this case, the audit will consist of checking, for example, whether it isn’t possible to insert JavaScript code using a given text format or whether it isn't possible to link an image that will be downloaded from another page. It's also important for the list of possible file extensions not to allow uploading files with unsafe extensions if it isn't necessary. Of course, we report the configuration errors – the risk level depends on the type of error.

Error logging audit

There is the Error messages to display configuration option on the /admin/config/development/logging page. It's used to set the error display level. This option should be set to None on the production page. If this option is set to a variant other than None in the production environment, we report it as a low-level threat.

The Error messages to display option in Drupal should be set to None

 

Basic login audit

There are two ways for the login panel to inform if the user trying to log in provided incorrect data. It may give a brief answer such as "data is incorrect", or give one piece of information when the login is incorrect, and another when the password is incorrect. In the last case, we're dealing with a vector for a brute force attack. The attacker may first storm the logins and then the passwords – thus gaining access to the user accounts.

Another aspect worth checking out is the password policy. It's a controversial topic, since some propose to force a password change periodically, and others say that the password should contain at least one uppercase character, one lowercase character, one digit and one special character. Some people combine both these rules, and users end up creating passwords like July2021! which meet all the requirements. My personal recommendation in this case rules out the necessity to change the password from time to time. Determining the complexity of the password is recommended, but the most important thing is its length - the longer the password is, the more time it'll take to crack it. The password policy is an issue that depends on the type of project and must be analyzed individually. In the case of a weak password policy, you should report it as a threat with a level depending on how bad the policy is.

Forms audit

The forms should be protected against spam. They should be created using the Drupal API where possible. Check if the forms are protected against spam and if their validation doesn't allow entering incorrect or dangerous data. If you find an incorrectness in the form's configuration, you should be reported – the risk level depends on the situation. There'll be a different level of risk for a potential SQLi, and for the possibility of entering incorrect data – for example in the select list.

Additional recommendations

There are Drupal modules that increase the security of our application. One such module is Security Kit. Thanks to it you'll reduce the likelihood of using the website's security gaps. This module offers Anti-XSS, Anti-CSRF, Anti-ClickJacking, and other security measures. We recommend reading the linked post and considering the installation.

Security Review is a module that can help with a Drupal security audit. It uses automated security tests that help with performing the audit.

This module:

  • checks the file permissions,
  • performs a file formats audit,
  • performs an audit of the options responsible for reporting errors,
  • performs an options audit, in which we determine which file extensions can be uploaded (e.g. to be downloaded in a blog post),
  • monitors database errors in order to detect a potential attack,
  • monitors the login panel for the same purpose,
  • checks the configuration of the trusted hosts file,
  • checks the view permissions.

Security Review is recommended as it can speed up the process of auditing the page.

Drupal configuration checked - what's next?

In this part of the series on performing a Drupal security audit, we've learned the ways of checking the Drupal configuration. We are familiar with the configuration options that can open attack vectors and we know what the recommendations are for closing these vectors.

Acquiring the knowledge provided in this post has allowed you to better understand that a correct Drupal configuration is as important as keeping it up-to-date. A configuration audit is another of the activities that we perform during a security audit - our Drupal support team recommends a comprehensive configuration check during a security audit.

In the next part of this series of articles, we'll deal with the code and learn about the basic ways to audit it. We'll present the ways of analyzing modules and themes. We'll take a look at what's in the repository. Are there any passwords, keys in it? Or maybe the entire database dump?

Aug 09 2021
Aug 09
Date: 2021-August-09Description: 

The Drupal Security Team will be coordinating a security release for Drupal core 8.9, 9.1, and 9.2 this week on Thursday, August 12, 2021.

We are issuing this PSA in advance because August 12, 2021 is not a security window in the regular Drupal security release window schedule, so there would not normally be any security release on this date.

The Drupal core release will be made between 16:00 – 21:00 UTC (noon – 5:00pm EDT). It is rated as moderately critical and will be an update to a vendor library only.

Drupal 7 core is not affected, although Drupal 7 site owners should review their site following the protocol for managing external libraries and plugins previously suggested by the Drupal Security Team.

Because this is a moderately critical release for a vendor library update, it is not covered by the Drupal Steward program. (For covered releases, the Drupal Steward program provides an added layer of protection—so that site owners can install the update on their own schedule. For more information consult drupal.org/steward.)

Aug 07 2021
Aug 07

Structured data, also known as schema or schema markup, has become a standard feature on search engine results pages (SERPs). 

Simply defined as coding that can be added to the back end of website for purposes of helping search engines to effectively crawl a site and highlight relevant content on the SERP, a solid understanding of structured data is fundamental to both SEO and user experience. 

In our current search environment, SEO calls for a lot more than ranking high on a SERP. Structured data needs to be leveraged to ensure that a listing’s position is fully maximized. 

Recent studies reveal that more than two thirds of all websites currently utilize some form of structured data. Evidence of structured data at work is apparent from nearly any SERP. 

Structured Data at Work

A search results panel such as the following from a Google search for Promet Source has become a relatively standard search outcome.

Promet Source search results panel
The most basic form of structured data, the above search results panel from a Google search for Promet Source is the outcome of specific coding on the back end of a site designed to help Google effectively interpret the content. 

Recent studies show that structured data, utilizing tools such the Google Structured Data Markup Helper, can have a dramatic impact to click-through rates. 
One example: after adding 100,000 search features to their site, Rotten Tomatoes experienced a 25 percent increase in click-through rates.

Use of structured data is essential for:

  • Meeting and exceeding user expectations,
  • Staying ahead of or at least on a level with your competition,
  • Fully leveraging your site’s content, and 
  • Ensuring alignment with the search engines.

Sign Posts for the Search Engines

While Google’s search algorithm is incredibly smart and effective in its ability to crawl and index a site’s content, there remain some inherent limitations to machine intelligence. Search engines are helped with structured data snippets and data labels that appear in the HTML code to deliver more detailed results on the SERPs

The result is clear indicators for the search engines concerning the content on a page and in a format that is well organized and easily understood by machine language -- explicitly identifying content within a wide range of categories such as names, dates, addresses, phone numbers, FAQs, recipes, reviews, ratings, and many, many more. 

Structured data essentially spoon feeds search engine crawlers and bots with information to help interpret a site’s content using their algorithm, and then use that information to streamline a user’s search.

 

Better, More Efficient Search Experiences

SERPs have have rapidly evolved in recent years, raising user expectations in the process. Due the prevalent use of structured data, users are now receiving greater value from their searches, often getting the answers and information that they are looking for without the need to click beyond SERPs, which increasingly function as robust, information-packed resources in and of themselves.   

Key to the enhanced value offered on SERPs is the rich snippet.

Rich snippets refer to organic search results that include enhanced information displayed on a search listing beyond the standard the url, meta title, and description. They serve to optimize listings with the inclusion of more space and attention-grabbing information that will help a listing to stand out with data such as hours of operation, “closing soon,” ratings, reviews, geolocation and more.
Users have come to count on rich snippets to streamline their search activity, and with a sharp focus on enhancing value.  

Featured rich snippets not only boost web traffic, they also serve to improve brand recognition and awareness.  

Implementing Structured Data

There are essentially three options for structuring data. These formats ensure uniformity across all the webpages in the website.
 

JSON-LD

JSON-LD is the recommended format that Google recommends and is also one of the easiest to implement. JSON-LD stands for JavaScript Object Notation for Linked Data and is usually implemented as a block on the page rather than embedded across the content of the page. 
 

Microdata

Microdata is another method of marking up the content of the site by adding tags that help search engines understand the content of the webpage. It is mostly used in the page body and uses HTML tag attributes to mark the content on the page as structured data.

RDFa

RDFa is an HTML5 extension that uses HTML tag attributes to mark up content on the webpage as structured data.

General Guidelines for Structured Data

Google does not provide a guarantee that the structured data will show up in the search engine results page, even if it is applied correctly. This is because their search algorithm tailors the results based on several variables.

Adherence to SEO best practices is an essential consideration. Key points to keep in mind: 

  • Google advocates that all content in the structured data follows the Google webmaster quality guidelines, discouraging the use of content that is automatically generated, keyword stuffing, and scraped content.  
  • Refrain from marking-up hidden content in the page or content that is not visible to page visitors
  • Avoid using click-bait content that misleads users from clicking into your site like marking up irrelevant content, fake reviews, or false headlines.

Testing Structured Data

Google provides a free tool, the Structured Data Testing Tool, to help websites test the structure of their webpages. This tool provides a live preview of the structured data generated based from the HTML core or structured data code snippet.

Types of Structured Data Results

There are currently more than 31 types of structured data results available in Google’s search gallery. Here is the list of the most common types of results.

Article

This is typically used to display results of a keyword search that is published as a news or blog format. The rich results typically display the thumbnail of the article and a headline with links to the page.

Screen Shot for a Promet Blog on Drupal Terminology

How-to

The How-to result is primarily used to display results that convey instructional content that relates contextually to the search term. This type is also closely related to the Recipe results. How-tos such as the following, have become a standard search feature:

Screen shot for how to clear your cache

Local Business

The local business result is typically displayed in the knowledge panel. It provides a concise summary of business information such as business hours, review rating, direction, geolocation, and more.

local business search result for Promet Source

Product

This result provides a summary of the product information like a brief product description, pricing, and user reviews.

Screen shot of a search result for Toyota Camry

Recipe

This is a rich result that is commonly found as a search result for recipes and cooking advice. The result provides a concise summary of the recipe that is displayed directly on the search engine results page. 

Rich snippet search result
 

As with all disciplines in the dynamic world of SEO and digital optimization, staying on top of structured data trends and opportunities requires close alignment with Google’s constantly evolving search algorithm, and a sharp focus on what’s new and next. At Promet Source, optimizing the inner workings of your website to ensure that it’s working hard for you is what we do. Interested in taking your website to the next level? Let us know how we can help!

Aug 07 2021
Aug 07

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

The Plugin system

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

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

The plugin system has three base elements :

Plugin Types

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

Plugin Discovery

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

Plugin Factory

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

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

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

The Plugin definitions

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

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

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

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

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

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

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

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

Hands on implementation

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

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

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

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

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

Aug 07 2021
Aug 07

There is three types of configuration data :

The Simple Configuration API

  • Used to store unique configuration object.

  • Are namespaced by the module_name.

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

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

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

Code example :

The States

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

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

The Entity Configuration API

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

  • New Configuration type can be defined in custom module.

  • Have a defined schema in Yaml.

  • Not fieldable.

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

Code example :

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

Store configuration object in the module :

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

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

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

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

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

Configuration override system

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

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

You can also do overrides at runtime.

Example: getting a value in a specific languages :

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

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

Configuration schema

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

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

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

Configuration dependencies calculation

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

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

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

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

Aug 07 2021
Aug 07

Ressources

Migrate in Drupal 8

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

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

None of these module have a User Interface.

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

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

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

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

A migration framework

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

Source plugins

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

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

Process plugins

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

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

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

Destination plugins

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

Drupal provides a lot of useful destination classes :

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

Builder plugins:

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

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

Id map plugins:

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

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

About now :

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

Concrete migration

(migration with Drupal 8 are made easy)

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

To begin shortly :

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

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

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

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

The File migration

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

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

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

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

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

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

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

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

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

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

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

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

The Term migration

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

First we create the source :

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

And we can now create the migration config entity file :

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

This is done, to execute it :

The Content migration

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

We create the source plugin:

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

Now we can create the content migration config entity file :

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

Finally, execute it :

Group the migration

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

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

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

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

I hope that you enjoyed our article.

Best regards,

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

Aug 07 2021
Aug 07

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

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

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


Features

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

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

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

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

Compatible with Field group on manage display form.

Compatible with Display Suite layouts on manage display form.

Requirements

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

Tutorials

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

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

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

Aug 06 2021
Aug 06

https://www.drupal.org/project/diff

Credits & Thanks

Thank you to:

About the Diff module

The Diff module shows you differences between revisions to nodes. This function might not sound like a big deal, but if you see an increase or decrease in traffic, it’s helpful to see which edits caused the change. If you don’t use this module you should keep good records about every little change you make to your site.

To reduce the tedious nature of that kind of record keeping, turn on the Create New Revisions feature in Drupal Core for each Content Type using the Diff module.

Turn On “Create New Revision” for All Content Types

When editing a node, you can create a new revision without overwriting the original. You do this by selecting the Create new revision checkbox from the Publishing options tab. You can set your individual content types to select this checkbox by default when any new content is created. This preset saves a little time and ensures that revisions are saved no matter who edits your content.

  1. Click Manage > Structure > Content types (Coffee: “content types”) or visit https://yourDrupalsite.dev/admin/structure/types in your browser.
     
  2. Next to the first Content Type, open the drop-down menu under the Operations heading, next to “Manage fields”, and click the Edit link.

    content type edit link
     

  3. Near the bottom of this screen, click the Publishing options vertical tab near the bottom of the screen and make sure the Create new revision checkbox is selected. Some may have it selected by default, others may not.

    publishing options within a content type
     

  4. Click the Save content type button at the bottom of the page.
     
  5. Repeat steps 2-4 for each Content Type.

Install and Enable the Diff Module

  1. Install the  module on your server. (Go here for more instructions on installing modules.)
     
  2. Go to the Extend page: Click Manage > Extend (Coffee: “extend”) or visit https://yourDrupalsite.dev/admin/modules in your browser.

    diff module install and enable
     

  3. Select the checkbox next to “Diff” and click the Install button at the bottom of the page.
     
  4. There are no separate permissions required for the Diff module

Configure the Diff module

  1. Go to the Diff admin page by clicking Manage > Configuration > Content authoring > Diff (Coffee: “diff”) or visit https://yourDrupalsite.dev/admin/config/content/diff/general in your browser.

    diff module configuration screen
     

  2. Click on the Fields tab at the top to display all the Entity Type fields.
     
  3. Go through the Plugin column drop-down selectors for every Entity Type field and (if available) turn them all on.

    NOTE: The “on” setting will vary from field to field. Some fields will have no way to turn them on (“Don’t compare”) -- leave these as they are and move to the next field. Other fields will have multiple options -- select the one that best suits your site’s needs.

    diff module configuration screen

    At the very least, make sure the following field types are turned on:
     

    • Body
    • Title
    • Authored
    • Revision log
       
  4. Click the Save button at the bottom of the page.

Using the Diff module

  1. Make sure you are logged into the admin area.
     
  2. Go to a piece of content where you have saved revisions.
     
  3. Click the Revisions tab.

    diff module revisions tab
     

  4. You will see a list of revisions with radio buttons. Select the two revisions you wish to compare.

    drupal diff module in action
     

  5. Click the Compare selected revision button at the bottom.

    Note: If there are no revisions of your node, you will not see this option as there isn’t anything to compare.

    drupal diff module example in action

The node’s fields are displayed side-by-side with the changes highlighted. This screen makes it easy to see what edits made a difference in your search rankings, click- through rates, and conversions.

  • If you see “+” between the fields, that means some text was added.
  • If you see “-“, it means that some text was deleted.

Did you like this walk through? Please tell your friends about it!

twiter social icon linkedin social icon pinterest social icon

Aug 05 2021
Aug 05

The core committer team is looking for a new provisional committer team facilitator to help coordinate Drupal core release process, team communication, decision-making, and meetings. The committer team facilitator does not need to have technical knowledge about Drupal core.

The core team facilitator role was created in 2019. Several community members have contributed to core committer team facilitation, with Donna Benjamin (kattekrab) initially jumping in and Shannon Vettes (svettes) sharing the responsibilities. Ultimately Pamela Barone (pameeela) formally took on the role in mid-2019 and still holds it now. These contributors have helped keep our release process, communications, and team decision-making sustainable. It's been very helpful.

Now that there is more clarity around the role, we would like to bring another facilitator into the team to share the responsibilities. The person would start as a provisional core committer team facilitator alongside pameeela. The provisional phase of a maintainer role allows an interested contributor to see if the role works for them and the team. The needed time commitment is about 10-15 hours per month.

If you are interested, read more about the role responsibilities, and get in touch with the team!

Aug 05 2021
Aug 05

While BADCamp may be taking a hiatus for 2021, San Francisco Drupal User’s Group continues to be in full swing providing the quality content we all love and expect from our Drupal community and beyond.

Here’s what’s coming up at SFDUG...

Announcements

Upcoming Events

August 12 - Drupal development workflow on AWS

Curious about running a Pantheon/Platform-like system on AWS? 
Salim Lakhani, Ambassador with the Cloud Native Computing Foundation (CNCF.io) and the CTO of DevPanel, is building out a Community Edition (CE) version of their platform and is looking for feedback and participants to work with. Whether you're running 1 site or 200 sites, on Drupal or WordPress, join us to discover what DevPanel CE is all about.

September 9 - The Evolution of Drupal’s Seemingly Simplistic Primary Menu

Join Mike Herchel, senior front-end developer at Lullabot, for a highly entertaining and informative talk. He will walk attendees through the evolution of Olivero’s primary navigation from its inception to reaching stability. 

SFDUG - Oct 14 - Accessible Slideshows - Button, button, who's got the button?

The first rule of slideshows is to not have slideshows...

According to W3 schools: “Carousels are disputed from a usability perspective because their content can be hard to discover. Ensuring accessibility can also improve usability.” But, what do you do when the primary stakeholder insists?

Join AmyJune Hineline, Community Ambassador and QA Engineer at Kanopi Studios, to learn about the different types of slideshows (often called carousels), discuss their components, and dive into how to make our slideshow accessible across different types of users and user agents.

Join the mailing lists

BADCamp announces SFDUG meetups through Meetup and various BADCamp channels. Be sure to subscribe to our mailing list and follow us across social media.

Speakers needed

We can't host our meetups or lunch & learns without willing speakers! Volunteer to speak or request a topic for a future meetup and we'll find a speaker.

We value diversity on our planning committee, and among our volunteers, speakers, and attendees. This includes gender, cultural background, and many other perspectives that make up our unique community. We know that learning about a topic from a different angle is valuable and enriches us all. We welcome and encourage submissions from EVERYONE!
We invite folks to step outside of their comfort zone and consider speaking at SFDUG!

Sponsor SFDUG

Opportunities to sponsor SFDUG are now available. We meet regularly on the second Thursday of the month and our attendance has soared since going virtual!
Interested in sponsoring SFDUG? We can help you do that. Email AmyJune at [email protected].

Stay in touch

Aug 05 2021
Aug 05

The core committer team is looking for a new provisional committer team facilitator to help coordinate Drupal core release process, team communication, decision-making, and meetings. The committer team facilitator does not need to have technical knowledge about Drupal core.

The core team facilitator role was created in 2019. Several community members have contributed to core committer team facilitation, with Donna Benjamin (kattekrab) initially jumping in and Shannon Vettes (svettes) sharing the responsibilities. Ultimately Pamela Barone (pameeela) formally took on the role in mid-2019 and still holds it now. These contributors have helped keep our release process, communications, and team decision-making sustainable. It's been very helpful.

Now that there is more clarity around the role, we would like to bring another facilitator into the team to share the responsibilities. The person would start as a provisional core committer team facilitator alongside pameeela. The provisional phase of a maintainer role allows an interested contributor to see if the role works for them and the team. The needed time commitment is about 10-15 hours per month.

If you are interested, read more about the role responsibilities, and get in touch with the team!

Aug 04 2021
Aug 04

Our schedule is now live online so you can review the sessions, plan out your schedule, and then register so you won't miss a thing! Thanks again to all the fantastic session submissions. We think we have a great line up for you folks.

See the schedule

An alternate view of the programming can be found using our session list.

Register today

Drupal Diversity & Inclusion, an independent working group within the Drupal community, is holding the first ever Drupal Diversity & Inclusion (DDI) camp! Our aim is to bring new voices and important topics together into a relaxed and fun virtual conference. Join us in #diversity-inclusion on Drupal Slack for real time updates on DDI Camp 2021!

Register now


 

Aug 04 2021
Aug 04

Have you ever heard that a single business has a lot of different branches or mini-businesses? It’s pretty common in the day and age we live in. The business world has grown immensely and so have its needs. And a single website isn’t enough to fulfil those needs.

So, what do businesses do? They build multiple websites, which should have been a great solution, but is really more of a stressful trigger waiting to go off. This is because managing those multiple websites is a pain, for lack of a better word. It results in slower building process, increased overheads, lack of control and scarce visibility, so yeah, a pain describes it pretty well.

What is the solution then?

A multisite structure that allows you to create multiple websites using a commonality. It would require less work to build, yet provide the much needed autonomy for the individual sites on the setup. And that is what we are going to be discussing today, but in regards to Drupal.

Drupal, being a popular CMS, has a lot to offer, when web development is considered. The sites developed using Drupal are versatile, scalable and provide amazingly powerful digital experiences. And one such feature that contributes to that power is the Drupal multisite setup. So, for whoever asked, ‘Does Drupal support multisite?’, the answer is yes and it does so exceptionally well. Let’s find out how. 

Drupal Multisite: What is the setup about?

Have you ever baked a cake? The core ingredients being flour, eggs and sugar are all the same for every cake. It's just the flavour and the toppings that are different. Drupal multisite can be understood with the same analogy.

As the name suggests, you can have multiple websites, tens and hundreds of them, working for you with ease using the multisite feature. You can have Drupal multisite with different domains as many as you want.

What is going to be the same for every website in this setup? 

The codebase would remain constant throughout. You can have hundreds of sites without having to rewrite it. The Drupal core and the available modules and themes are also shared by the multiple websites. These form the flour, eggs and sugar batter in the Drupal cake.

And what is going to be different in the multiple sites?

Everything other than the codebase is different. You would have independently running websites that would serve the needs of its target demographic.

The sites would have their own database;
The sites would have their own configuration, in terms of enabled modules and themes, content and more; 
The sites would have their own files, inclusive of images, uploads, user profiles and more; 
And the sites would even have their own base domain or URL. 

So, in essence Drupal multisite would provide you the opportunity to create multiple websites using the same codebase, however, all the sites would be different from one another, serving different audiences. 

How is that possible?

Because of server requests. Let me clarify it a bit. All of the multi sites created using this setup are stored in separate folders. Drupal multi folder structure can be separated from multisite repositories, making deployments easy for site maintainers and front-end developers alike. On top of this, each of these folders would have its own personal php file with connectivity to its own personal database.

Now, add to this equation, Drupal’s fine ability to map a request based on the domain it came from, this ability is further enhanced by loading the right database and configuration based on the said domain. The result is the website that the requester wanted being served on a platter. Pretty cool, isn’t it?

What do you gain out of it?

After understanding the basic concept and working of Drupal multisite module, the next thing that pops up in our minds is its benefits. Why should you take it up? What’s to gain out of it? And that is where I come to tell you all about the amazingness that is Drupal multisite.

Benefit from faster launches 

The best part of Drupal’s multisite feature is its ability to create newer websites in a matter of minutes and without much support from IT and developers. 

The built-in installation profiles are the reason for the faster launches. It essentially holds the functionality and configuration into installable packages, which can be launched as many times as you want them to. And you would have a new website that’s fully ready for the content entries. 

Benefit from saying no to compromises 

The second multisite benefit comes in the footsteps of the first. Because multisite helps in creating faster launches, it allows you to not compromise when deadlines are looming.

For every project, there is a deadline that needs to be met and as this deadline starts to come closer, potentially lucrative features start to move farther and out the door. Developers start making compromises and technical debt starts to build up.
 
Now, you could let a feature or two go out the window in a single build, however, when there are close to a hundred websites in development, that thought won’t even cross your mind. It is suffice to say that multisite architecture boasts a higher quality standard and minimal technical debt. The primary reason for that is time, creating multiple systems at once gives you ample time to think about potential and the time to make them part of the project in reality.

You create long term solutions with a multisite setup that come with a higher refactoring potential from the management because there are multiple sites involved. 

Benefit from lower maintenance and reduced costs 

Another advantage of a single code for multiple websites is that you have to spend less time on maintaining it as compared to multiple codebases for multiple websites. Wouldn’t you agree? 

If you encounter a bug on any one of these sites, you would fix it for all of them. This considerably reduces the time spent on maintenance and consequently the costs that accompany it. With Drupal multisite, you can keep track of updating and reviewing at one place, thereby, keeping a convenient grip on maintenance.

Benefit from saving your efforts 

I saved the best for last; with Drupal multisite, you actually save yourself a lot of time and effort because you can reuse your code or components of it. You would only have to build a feature once and thereon, you’d only have re-use, no wasted effort for building the same thing over again.

A reusable code with a shared library entails; 

Reusable integrations; 
Reusable functionality; 
Reusable UI components; 
Reusable workflows; 

And you can also reuse a theme with Drupal’s theme inheritance mechanism, allowing you to create a base theme for other themes to inherit the basics from. 

All of this saves a ton of effort in the development process. You should know that you can also try to reuse components for sites not on the same platform, it would be extremely difficult, but possible.

What options does Drupal multisite offer?

While setting up for Drupal 9 multisite, there are a few choices available. The essence in all of these choices is the same, which is a strong commonality through a single codebase. Moreover, you will get all the benefits we just talked about in the previous section in all of them.

So, let’s understand the kind of range Drupal multisite comes with.

Conventional approach: Classic Drupal multisite architecture

The conventional approach essentially sums up the meaning of Drupal multisite, as we talked about while understanding the concept. There would be multiple sites in this option, with multiple configurations and multiple databases, however, there would only be one codebase shared amongst all. The diagram below describes the architecture pretty aptly.

The image explains Drupal Multisite architecture.


I would be wrong, if I said that it's only the codebase that is shared. Technically, out-of-the-box that is the case. However, if you want your multisites to share more than that, you have an option. The Features module, a unique trait of the conventional architecture in Drupal, can help you in that. It allows sites to have shared features by importing the configuration from it. Config Split further eases the workload by segregating which configuration needs to be shared and which needs to be quashed.

Contrastingly, I have mentioned that you can create independent and somewhat unique websites using Drupal multisite, if that is what you wish for. This is possible because it allows you to customise because of isolated configurations. As such you can create your own custom themes and modules for each of your websites.

Multi-domain architecture

The multi-domain architecture isn’t all that different from the multisite. There is a single codebase, however, along with that there is also a single and shared database, which isn’t the case in multisite. Here is a diagram for better understanding.

The image explains the multi-domain architecture.


Through the multi-domain architecture, you’ll be maintaining a single Drupal installation, which is quite easy; on top of this, you will also be able to maintain the configuration and functionality with ease. 

The Domain Access modules are at the heart of this architecture, as it makes it possible to serve multiple sites. It also allows you to categorise your content as shared and unique, you can decide a specific piece of content for one particular domain, then you can also share it across all sites, if that is what you want.

With more sharing in this architectural design of Drupal in terms of features, functionality, content and even users, updating a single site is a walk in the park. 

In terms of the drawbacks, the one that outshines the rest is that you can’t have any exceptions. In multisite, you could add additional functionality to individual websites, but you can’t do it here. Well, you can, if you wanted to, but you see, the intention behind multi-domain architecture is simplicity. And adding exceptions to each site would contradict that big time. Even while using contrib modules you would have to be extra careful in checking their compatibility with Domain Access.

Other notable architectures

There are three other multiple site architectures in Drupal, let’s shed some light on these as well.

Based on Drupal distribution

Have you ever bought a cake mix? It's a ready-made mixture of everything that goes into the cake and all you have to do is make it into a batter and put it in the oven and you’ll have your very own baked cake. Easy, isn’t it? This is basically what a Drupal distribution is. 

You get a mix of everything you would need to start your web projects, from the required modules and libraries to custom themes and modules and from the configuration to possibly the default content. It’s a website starter pack. There are popular Drupal distributions to choose from, like Commerce Kickstart and Lightning, but you can also make your own custom distributions. Take a look at this complete list of major Drupal distributions that you must try out.

The way these are different from multisite and multi-domain is through the codebase, each site would have its own and each site would also have its own hosting account.

The major drawback here is that it requires extra work. It’s kind of ironic for a cake mix, I know. You would have to maintain the distribution codebase as well as each of the sites. Security updates and bug fixes need all the more attention, if your distribution is published on Drupal.org.

Based on data silos

A multisite architecture on data silos is similar to Drupal distributions, in the sense that the codebase is different for each site, providing greater autonomy and better security. For businesses with multiple branches and departments that seek decentralization, yet a kind of uniformity, this is a great choice. 

Based on multilingual needs

This one has a similarity to the multi-domain architecture, as there is a shared codebase and database. It allows sites to capitalise on language-based regional targeting. With less development efforts and less building costs, each site would have its own language and its own regional audience. Learn more about why Drupal is great for multilingual sites here.

When can you optimise the setup the most?

Now comes the part of knowing exactly when to optimise Drupal’s multisite architecture. There are particular use cases and considerations that make the setup an ideal choice, let’s understand them.

Do you have multiple sites?

As the name suggests, for Drupal multisite to work its charm, you have to have multiple sites as in two or more. The prime reason for this setup’s mere existence is to help you in saving time and effort in the management of multiple Drupal sites by making them run on the same Drupal core.

Think about it, if you have two or more sites not running on this setup, you’d be responsible for each code individually and it would differ drastically for each site. This difference can become a mammoth task for managing, so doesn’t choosing multisite and eliminating this worry sound like the better choice?

Are they similar to each other?

Now, you could have multiple websites, but they have to have a degree of similarity in order for the multisite setup to work. Dramatically different sites in terms of features and aesthetics are not ideal for this architecture. That’s not to say that each site has to be a clone of the next. No, every site would obviously have its own content, moreover, it could also have different functionality, but that difference cannot be dramatic, just a feature here and there.

Take a university for instance, it could need multiple sites for its varying departments. Now in this case, the university could opt for the multisite feature because despite different websites, it would most definitely maintain a sense of uniformity in them. 

In essence, Drupal multisite creates replica sites with different themes for each site, if that aligns with your requirements, you should definitely opt for it.

Do you have the technical infrastructure?

Drupal multisite is meant to make your job easy, but it can only do so if you have the right technological infrastructure and expertise to handle that. 

  • The right hosting environment to manage multiple domains and deployment mechanisms. Your hosting provider should be proficient in knowing the exact requirements of your setup.
  • The right DevOps processes that are compatible with your multisite setup. When it's said that multisite setup makes you work less, automated deployment is one reason for that, so, your DevOps need to be efficient at that. 
  • Finally, the right testing environment because you deploy multiple sites at once, the chances of errors are on the higher side. A break in functionality can become colossal and checking for it manually is hard work. So, an automated testing environment that is equipped with tools to ensure higher quality standards is crucial.

Can going multisite pose challenges?

There is always a darker side of things, and Drupal multisite is no exception to that. There are certain drawbacks that accompany the setup that can leave a sour taste in our mouth. For many, these challenges have become the reason for not opting for the multisite architecture. 

The challenge of failure 

The frontrunner in the list of multisite challenges has to be its chances of failure, which to be honest are fairly high. There are two reasons for this.

One is the fact that there is a single codebase for all the sites. This means if there is a problem with one, there is a problem with all of them. Take traffic spikes for instance, they might be great for one website, but for multisites, that one site can pose significant risks to the others.

Second is the failure due to human error, which cannot be foreseen or avoided. There is plenty of risk associated with updating a single site, imagine the level of risk when there are tens of sites. A single syntax error can become the reason for the demise of your multisite setup quite quickly.

The challenge of individuality and innovation 

Yes, we do say that the multisite feature has room for individuality for each site. And then we also say that each site has to be the same or at least similar to a great extent in order for the architecture to work. Do you see where I am going with this challenge? 

The innovative flair often seen in development is somewhat lost in the multisite setup. Why? Simply because there is a standard to be adhered to. And when you deviate from that standard, you set yourself on the path of losing all the benefits of this architecture.

Reusing components, without extra efforts, is one of the fortes of the multisite setup, and adding innovation into this mix would make it tedious and exhausting. That is why it is advisable to avoid the multisite, if your sites differ from each other in terms of features and functionality or even if you would want them to differ in the near future.

The challenge of technical insufficiencies 

I mentioned in the previous section that optimising Drupal multisite is going to serve you best, if you have the technical infrastructure for it. And this can become somewhat of a challenge, I’ll tell you why.

Compare building one site or multiple sites separately to building and maintaining a multisite installation. Now tell me, which do you think would require more technical expertise? The latter, I’m sure. The reason is the complexity of the comprehensive web of multiple sites, the amount of settings alone could give a newbie developer a headache. 

So, along with the technical infrastructure, including a suitable host, DevOps and testing system, the need for a skilled multi-site development team can become quite a challenge.

The challenge of losing open source 

Finally, the last challenge relates to the loss of Drupal functionality. With a multisite architecture, you become an SaaS provider and consequently part with a number of open source solutions. You become responsible for every feature that needs improvement or innovation, unlike the usual way of open source software, wherein the community plays a part in innovation.

Learn more about open source here:

Conclusion

I would say that the challenges that the multisite architecture comes with do make you rethink choosing this path. However, when you consider the benefits along with its use cases, there isn’t a more perfect solution. 

A university site would not need to add extra innovative features to one of its department’s sites and therefore, the multisite is best suited for it and for other enterprises that have similar needs. Provided that you check all the right boxes in terms of multisite’s optimisation, you’ll not regret choosing it.
 

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