Jun 10 2019
Jun 10

Smart business decisions tend to be equated with cutting costs and saving money.
 
Over the past decade or so, “Better! Faster! Cheaper!” has become the rallying cry for business process reengineering and new initiatives within every sector. As a developer and former business owner, I get this. Efficiency is essential.
 
I tend to look favorably on the fastest, most streamlined solution, and as such, I have a lot of empathy for clients who are seeking fast fixes to ensure that their websites and all of their digital assets get into compliance with WCAG 2.1 for ADA accessibility.
 
But as a developer, my focus is, first and foremost, on solving problems, and I can state unequivocally that overlays can't be counted on to solve the challenges associated with digital accessibility.
 
A recent web accessibility legal case, Haynes vs. Hooters set the precedent that organizations are required to remediate their actual code and not rely on band-aid dashboards or overlay solutions that appear to represent a quick fix that requires seemingly little hands-on maintenance.

Here are 4 key challenges inherent to overlays:

  1. Visually impaired users don't typically use them. They tend to have their own tools with their own voice and reader settings with which they are comfortable and proficient based on their experience and ability level. Your goal is to make your code available to whatever tools and devices they prefer using, not force them to use your overlay tool that has pre-selected settings and options.
  2. Visually impaired users typically have their own stylesheets and ways to access the web. They don’t tend to use presets from widgets because widgets complicate the experience for them and the inability to disable or override them can be frustrating.
  3. Overlays simply don't work well with mobile devices unless a significant expenditure is invested in customizing them to the individual site.
  4. Overlays basically amount to putting a line of Javascript code that pulls preloaded information onto your site. So even if the overlay has been customized as part of your package, to make it fully compliant it's nearly impossible to keep it that way, because accessibility issues can re-emerge with any subsequent change to your site.

 

Sustainable Website Compliance Solutions

Promet Source serves as an accessibility partner, committed to real and lasting accessibility solutions.
 
We conduct both automated and manual testing holistically, from the perspective of the entire spectrum of disabled users and available Assistive Technology -- recognizing that there is no one-size-fits-all fix. This list of automated testing tools, recognized by the World Wide Web Consortium (W3C), demonstrates the wide range of testing options and the need for focused expertise. 
 
Our clients interact closely with both accessibility and developer certified experts throughout engagement and have the opportunity to ask questions and seek clarification every step along the way.
 
After guiding clients through the remediation process of actually fixing code to conform to WCAG 2.1 standards, we provide tools and resources to ensure that your development team has the training and knowledge to maintain your sites conformance.
 
We look forward to consulting with you about your specific accessibility objectives and working toward a solution that best addresses your needs.
 

Jun 08 2019
Jun 08

If you use the Drupal Composer Drupal Project template for managing your Drupal 8 site’s codebase, and you commit dependencies to your Git repository, then you’ve probably run into issues involving cloned dependencies. Sometimes when requiring a dependency via Composer, you end up with a cloned version (which includes a .git directory) instead of a release version. 

If you’re committing dependencies to your repository, then the .git directories associated with cloned dependencies cause an issue when you try to commit. A common resolution is to remove the .git directory from the dependency’s directory.

While this solves the immediate issue, the next time you go to update Drupal core, you’ll likely see an error message along the lines of, “The .git directory is missing from /var/www/html/vendor/some/dependency, see https://getcomposer.org/commit-deps for more information”. How can we get past this?

Here’s my workflow:

  1. Delete the entire /vendor/ directory.
  2. Run “composer install” to reinstall all dependencies. 
  3. Update Drupal core (normally with “composer update drupal/core webflo/drupal-core-require-dev "symfony/*" --with-dependencies”
  4. Re-remove any .git directories for cloned dependencies.
  5. Commit the update.

Ultimately the "proper" solution will be to not commit dependencies to the project repository. I agree that this is the best solution, but not everyone’s workflow currently supports this.

There's also a great discussion in the Drupal Composer Drupal Project issue queue about alternate methods to deal with this issue. 

Have a different workflow to deal with cloned dependencies? Share it in a comment below!

Just getting started with managing your Drupal 8 project with Composer? Jeff Geerling has some super-helpful blog posts.

Jun 08 2019
Jun 08

One of Drupal’s big advantages is its possibility to structure content with the use of fields. However, from time to time you will want to link a file to your content without the need of adding a field to the database for that purpose.

The D8 Editor File Upload module provides this functionality by adding a button to the toolbar of the rich text editor (in this case CKEditor). This way it is possible to upload a file and present it within the content as a link. This tutorial will expĺain the usage of this module.

Let’s start!

Step #1. - Install the Required Module

  • Open your terminal window
  • In the root of your Drupal installation type:

composer require drupal/editor_file

type the composer command

No further modules are required.

  • Click Extend
  • Scroll down to the D8 Editor File Upload module and enable it
  • Click Install:

Click Extend

Step #2. - Configure the Text Format

  • Click Configuration > Text formats and editors:

Click Configuration

You can configure and add text formats to be used by different user roles on your site. By default, there are four formats.

  • Click Configure beside the Full HTML format
  • Scroll down to the Toolbar configuration area and click Show group names
  • Click the Add group button in order to create a new group and call it File:

Click Add group

  • Drag the paper clip button to the newly created group:

Drag the Paper clip button to the newly created group

  • Scroll down to the vertical tabs and add more file extensions to the Allowed file extensions (by default only txt):

add more file extensions to the Allowed file extensions

  • Click Save configuration.

Step #3. Adding a File Link to the Content

  • Click Content > Add content > Basic page
  • Make sure the text format is set to Full HTML, otherwise you will not be able to see the paper clip button
  • Add some dummy text and click the paper clip button
  • Click the Select/Browse File button and upload a file:

Click the Select/Browse File button

  • After uploading the file click Save:

Click Save

The link to the file will be shown in blue.

  • Click Save in order to save the node:

Click Save

Now you have a link to the file inserted into your content and you didn’t have to create an extra field for that. The link will open the file in the browser or it will download the file to your computer.

The link will open the file in the browser

Thanks for reading!


About the author

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

I'd like to briefly share a new handy Chrome Extension that I recently created: Drupal Issue Chrome

chrome. noun. features added to something to make it nicer, but which don't affect the core functionality.

This extension will render links to Drupal.org issues in order to clearly indicate node id, title, and issue status. It closely mimics Drupal.org's own rendering of links to issues, bringing the same formatting to ANY website.

For example, an anchor link with the href and text content "https://www.drupal.org/project/drupal/issues/1308152" would become "#1308152: Add stream wrappers to access extension files" and would be colored appropriately. You may also hover over the issue to see the exact issue status, provided via the anchor title attribute. Take a gander:

Extension Screenshot

If the anchor text and href do not match, the extension will style the link without altering the content:

Google Search Screenshot

Simple, but very handy!

You can install the Drupal Issue Chrome extension here or contribute on GitHub!

Why?

I frequently reference Drupal.org issues in my daily routine, especially in JIRA. It's tiresome and inefficient to keep the title and status of those Drupal.org links up-to-date in JIRA.

I wanted to automate the process, but I wasn't interested in writing a JIRA plugin in Java. It occurred to me that it would be both easier to implement and more universally applicable if I could just create a solution as a Chrome extension via Javascript.

Jun 07 2019
Jun 07

Business is hopping. You’re hiring Drupal developers with varied backgrounds and skill sets. 

When working in Drupal, there are often many ways to achieve the same outcome, and quite often, Drupal developers find themselves on different pages. How do you determine whose way is the 'best' way and proceed with optimal efficiency?

There are two perspectives to consider:

  • A team executing best practices, and
  • The process(es) needed to get best practices into place.

 

Best Practices

When defining the best practices that your Drupal development team will follow, you need to consider the following areas of development:

  • Foundational Strategies
  • Common Feature Configuration Options
  • Standard Methods for Selecting Contributed Modules
  • Custom Coding Standards
  • Development Environment
  • Workflow Methodologies
  • Testing and Quality Assurance

Foundational Strategies

All Drupal sites have a set of features that are the same. For instance, most, if not all, sites: 

  • Use content types to create content pages
  • Have a search functionality
  • Need a custom theme
  • Must meet WCAG 2.1
  • Should be usable

Before the discovery phase of a project, where requirements are confirmed and refined, create a set of configuration and coding defaults that allow you to deliver a quality product, and enable non-developers to easily use the site.
 

Common Feature Options

There are multiple ways to develop features in Drupal; some good and some not so good. Although there might be exceptions to this rule, choosing one way to develop a feature across your projects will help ensure your product is the best it can be.

Start with consistent configuration strategies and contributed modules. Consider the following:

  • Low maintenance is key to sustaining a site and continued services.
  • End user processes and skills take precedence over what’s easy for a developer to do.
  • Security can be in jeopardy with custom solutions. 

When collecting requirements, compare what’s needed with the one or more strategies you have placed in your company toolbox. Use only an approved strategy unless the requirements can’t be met.

Standard Methods for Selecting Contributed Modules

When a requirement can’t be met with a feature configuration option already in your toolbox, it’s time to go looking for options within the many contributed modules. This is a time when your sought-after best practices can go out the window if you aren’t careful.

Evaluating contributed modules in an effort to meet requirements should be a consistent process. It should be a process that not only helps configure the appropriate solution, it should also yield a configuration option for future projects.

New “best practices” should consider the following:

  • The common features considerations suggested above
  • Pros and cons of each module that meets your needs, maturity, flexibility, and coding standards
  • The history of the contributed module developer(s) and their ability to maintain the module
  • Whether your team is ready to take up the mantle of maintenance if needed
  • The interaction the module(s) could have with other features on the site

Custom Coding Standards

You have exhausted options using Drupal’s core and contributed modules and still have requirements that need to be met. This is where custom code comes in. 

The Drupal community has shared numerous standards for code development for Drupal. You don’t have to reinvent this wheel. However, you do need to establish a process that ensures:

  • Decisions to use custom code are appropriate
  • Drupal coding standards are being followed

Establish a set of criteria that must be met before custom code is cut. Asking questions such as the following can kick off your evaluation process:

  • Which modules (core and contributed) have been assessed as a means of meeting the requirement?
  • Why won’t existing modules work?
  • Can existing modules be modified to meet the need?
  • Does the client want this specific custom solution or do they want to adjust the requirement?
  • What are the potential security and maintenance issues associated with the custom code that can surface during the life-cycle of the website?

Development Environment

Before you can use the above best practices, you need a development environment. 

Drupal can run in many different web server configurations, but there are server settings that maximize Drupal’s performance. Invent your own server or use a service designed specifically for Drupal, that’s your choice.

In order to develop a website that can be hosted by your client, you need to know what their server environment will look like. If it varies from the solution you have selected, you will need a process that allows for:

  • Best practice configuration and coding that can be executed
  • The solution to be tested on the client’s server environment
  • Multiple developers to participate in development without creating issues

Workflow Methodologies

None of the above will matter if you don’t have a workflow that supports the best practices you have set forth for your team. If your developers don’t have time to evaluate their options, consult with each other, or document their solutions, they will do what they can in isolation.

Workflow is about establishing a consistent way of working, while taking into consideration tested and tried software development methodologies. You don’t have to use what others are promoting. You can mix it up, or adjust to meet your needs.

Whatever the workflow you define, consider allowing time to:

  • Identify and create best practices
  • Test new practices for coding standards
  • Verify requirements have been met
  • Provide quality foundation configurations, those your client assume you will deliver

Testing and Quality Assurance

Testing and QA are part of a defined workflow. However, they are worth mentioning separately as each process can overlook issues if not done incorrectly. Therefore, when creating a workflow, ensure you have best practices in place, particularly those accepted by the software industry.

Such testing and QA processes should consider:

  • Automated and manual testing of accessibility
  • User acceptance testing
  • Common software testing such as unit, integration, system, sanity, smoke, interface testing, and regression

 

Getting Best Practices into Place

Are you sold? Do you see the logic in the above best practice categories? Great. The next question you might have is how to implement it. 

There is no one way. However, there are basic steps you can take to get started. Remember, change isn’t going to happen over night. Incremental change is an option, unless radical improvement is needed now. If this is the case, re-engineering is your best option.

One way to kick off the process of change is to perform the following tasks:

  1. Get your developers into one room
  2. Make a list of the most common feature requirements
  3. Identify strategies for meeting the common features
  4. Rank the strategies by the requirements met
  5. Document the strategies 
  6. Train your staff
  7. Meet regularly to learn from each other, to add new options, and improve existing strategies
     

Conclusion

This idea of consistent process improvement to help ensure a quality standard that has its rooms in the Capability Maturity Model Integration (CMMI), which dates back to 1987.  CMMI is a process level improvement training and appraisal program and might be of assistance as you set goals for your organization.

Whatever you choose to do, change for the sake of quality improvement can only lead to:

  • Continued business growth
  • Happy customers
  • Employee job satisfaction

Promet Source offers a depth and breadth of Drupal development expertise. Contact us today to schedule a workshop or for information and insights to ensure that the agility and reach of Drupal is being fully leveraged.

Jun 07 2019
Jun 07

From exciting projects delivered to a growing team of Acquia Certified Developers; 2018 was a busy year for us that was capped off with recognition of our hard work and passion.

Now, Vardot is proud to announce that we have been named a top Drupal and PHP developer by Clutch yet again for the year 2019.

Projects Completed by Vardot in 2018

Projects undertaken in 2018.

Clutch is a B2B ratings and reviews site that ranks companies on a number of criteria, including market presence, service focus, and reviews from past clients. We are also featured on their list of the best Drupal developers in the world.

We provide cutting-edge enterprise web solutions, with an optimized digital experience and a powerful cross-platform content management system. Our solutions are open-source, built using our own Drupal distributions, which means a lower total cost of ownership and faster time to market for you. Vardot covers the whole project lifecycle, from consultation, design, development, implementation, to enablement, with robust project management and post-launch maintenance, support and growth to guarantee success.

Drupal Clutch Reviews

Clutch takes its reviews seriously, conducting phone interviews with a company’s past clients and getting honest feedback on the quality of their work. These reviews can all be found on our Clutch page, but we wanted to include some of the nice things our clients have said about us here:

“The comments we got from users were positive, and people were happy with the website. We saw improvements in numbers because traffic was up for the new website.” – Web Editor, Humanitarian Nonprofit

 and...

“In the two months since the launch, we've seen between a 50 percent to 60 percent increase in the total number of visitors to the site.” – Communications Officer, Multilingual Nonprofit

and...

“They try harder than other companies. They've been so good about listening to us and actually doing the things we ask.” – Founders, The Life Writer, Ltd.

In addition to being recognized by Clutch, we are proud to announce that we were featured on Visual Objects, a site showcasing businesses with outstanding creative design services, such as branding agencies or web development companies.

Vardot was also ranked as one of the best Drupal development companies by Clutch’s sister site, The Manifest. We were featured for a project we did with a company producing as SaaS product, creating their website and creating content for it.

We are honoured to have been recognized as the best Drupal and PHP developer by Clutch.

We do everything we can to help our clients succeed, and knowing that they appreciate our work so much is incredible. We will continue to improve and innovate, always keeping our clients ahead of the curve.

Al Bawaba News Amman Stock Exchange ProEquest

Stay tuned for more exciting news and launches in the upcoming year.

Click here to read about our client's experience with us.

Jun 07 2019
Jun 07

I created and shared an open source set of editable slides with plenty speaker notes titled "State of Drupal 9" early in May, based on my webinar with Dries and then the Drupal 9 parts of the DrupalCon Seattle Driesnote. I hope that we can bring this know-how to a lot of conferences, meetups and to companies so people are more aware of what is coming, what happens to Drupal 8 and 7, what's so great about Drupal 9 and what are the key tools involved.

Before I even presented the slideshow first, I already got improvement suggestions from people presenting it elsewhere. So the first time I got to present this session in Minsk, Belarus at the kind invitation of DrupalCamp Belarus organizers, it was already improved from when I first published it. I will keep updating the slides and present where I can in the coming months. Please, do it yourself too! Translate, shorten, lengthen, etc. to match your audience and timing needs, as long as the key messages get through. Be an important contributor to Drupal 9 this way!

Here is the recording from DrupalCamp Belarus:

Jun 07 2019
Jun 07

May marked another important month for the Drupal community, with a new minor version of Drupal being released on May 1st and Acquia acquiring the open source marketing platform Mautic. In case you missed any of these important pieces of news, here’s an overview of the top Drupal blog posts from May.

Drupal 8.7.0 is available

Let’s start with the most salient piece of news - the release of Drupal 8.7.0. On the same day as it was released, Gábor Hojtsy already published a blog post presenting the new features of version 8.7.0 which also contained helpful information on what the release means for sites running on older versions. 

One of the most notable novelties in this release is a stable Layout Builder, but the now stable support for JSON:API should also be mentioned, since it’s a key milestone towards making Drupal API-first. Other features include improvements in the experimental Media Library, revisionable menus and taxonomy terms, and a more accessible Umami demo showcasing a greater number of features out of the box.

Read more

API-First Drupal: what's new in 8.7?

This next post is very similar to the previous one in that it presents some of what’s new in the newly released 8.7 version of Drupal. This one, though, written by Wim Leers, focuses more on the improvements in the context of API-first Drupal (as the title already makes clear). 

So, Drupal 8.7.0 has introduced improvements to both the REST and JSON APIs, with the latter receiving more and bigger improvements. One of the things that was fixed in both of these modules were the datetime and daterange fields, which now respect standards. While the REST module is still maintained on drupal.org, new releases of Drupal will only see new features for JSON:API.

Read more

Static searches with Drupal and Lunr

Moving on, we have a post from Samuel Mortenson’s blog on static search in Drupal with the JavaScript-based search engine Lunr. In this post, Samuel describes how he tackled the integration of Lunr with Drupal and what kinds of problems he encountered, one of the major ones being performance issues with large indexes. 

Another usability problem were facets, since Lunr lacks the ability to search by complex conditions and condition groups. Samuel’s solution was to make two separate queries, one for the search terms and one for all the fields, then finding the intersection of both results. The Drupal Lunr integration is now ready to be tested and put to use, and Samuel encourages everyone to try it out.

Read more

Sponsor a Feature

The fourth post on this month’s list is Jacob Rockowitz’s Sponsor a Feature, in which he describes the process of sponsoring features of open-source projects. He starts with the four vital steps: communication, documentation, agreement and payment, and explains each of them in further detail. 

The common understanding of open source as being free doesn’t mean that developers contributing code shouldn’t receive any payment. Sponsoring their work enables a greater number of people to start contributing while also making their work more sustainable. 

Since companies also benefit from open-source software contributed by volunteer developers, it makes sense to sponsor the work of these volunteers. This in turn also strengthens and diversifies the entire community.

Read more

Drupal 8 Configuration

Next on our list, we have a five-part series of posts by Jay Friendly of Morpht exploring the Drupal 8 Configuration API. The posts in the series cover the basics of the API, how it works and how to use it, how to extend it with contributed modules, and how developers can manage, declare and debug configuration in custom modules. 

Because Drupal is much more complex today than it used to be, with Drupal projects now running on multiple environments, consistent code should be used for all the site copies. Jay Friendly’s series gives helpful information on the Configuration API, making this effort easier. (Each post contains links to all the other parts, so we won't link all of them here.)

Read part 1

Why we no longer use Display Suite on new Drupal 8 projects

With Layout Builder becoming stable in Drupal 8.7.0, some previously useful modules have lost some of this usefulness and become a bit redundant. Saul Willers of PreviousNext gives the example of Display Suite, which is mainly used to position fields into layouts. Layout Builder now provides the alternative of using blocks to create layouts.  

As for the use case of Display Suite to control field markup, a good alternative is the Element Class Formatter module used in combination with Twig templates. As such, when starting a Drupal Project from scratch, it makes sense to use Layout Builder together with other solutions instead of Display Suite.

Read more

Acquia acquires Mautic to create the Open Digital Experience Platform

Acquia’s acquisition of Mautic was great news for both Drupal and the broader open-source community. For anyone not familiar with Mautic - it is an open-source alternative to proprietary marketing automation platforms such as Adobe’s Marketo

In this post, Dries stresses the importance of organizations having Digital Experience Platforms rather than simple websites and gives three main reasons why Acquia and Mautic are such a great match. 

Namely, the two platforms share the same technology stack and business model. And, thanks to this acquisition, Acquia can now disrupt the marketing automation market as the only open-source solution. Additionally, since Mautic is loved by both marketers and developers, it’s more open to innovations via integrations, which makes for a better customer experience.

Read more

The Giving Tree Called DrupalCon

The last post from May that we wanted to include is Kalamuna’s The Giving Tree Called DrupalCon. For this year’s DrupalCon in Seattle, they decided to put the money that’s typically used for swag to better use and do something good for the environment instead.

To this end, they partnered up with One Tree Planted and sponsored the planting of 450 trees in parts of California that were damaged by forest fires. They got the Drupal community involved by inviting them to plant stickers on the wall of their DrupalCon booth, and every sticker then turned into an actual tree planted. 

We love seeing examples of how we can make the world a better place by coming together. We wanted to round off this month’s list with one such example. Here’s to hoping that Kalamuna’s efforts inspire more people and businesses!

Read more

This was our selection of the most interesting Drupal blog posts and pieces of news from May. If you enjoy these recaps, make sure to check back early next month for a list of June’s posts. Till then - enjoy!
 

Jun 07 2019
Jun 07

The term Drupal invokes different feelings among different people, based on their professional background or on what they have heard or learned about the CMS . Over the years, Drupal CMS has evolved from a simple tool for hobbyists, to a powerful digital experience platform for Global enterprises. While Dries describes Drupal as a platform for "ambitious digital experiences" (apparently he never loved "for the enterprise" categorization of Drupal), it is commonly referred to as a content management framework which allows for extensibility & scalability through the addition of various user-created modules that build upon its core framework.

Drupal is one of the most popular CMS' currently available & is the preferred choice for government agencies, large associations, non-profits & numerous Fortune 500 companies. This graph compares the trend for the term "Drupal" with another popular CMS "Joomla" over a period of 3 years & it clearly depicts the growth of popularity of Drupal.

Image removed.

But why do large enterprises prefer Drupal? Is it as "easy to use " as they say? Or does the picture below depicts the true story of Drupal? Let us find out.

Drupal - A CMS for Everyone

One of the toughest challenges that Drupal adopters face, whether they are new site owners or beginning developers, is trying to figure out what is hard & what is easy with Drupal. Most of their questions revolve around the ease of use that Drupal as a platform brings to the table. Let us look at some of the basic (yet important) features that Drupal CMS provides to website owners.

Installation

For Drupal installation, more than the “technical knowledge”, you will rather than just need to know how to connect through FTP and install databases. Would you believe me if I say that the installation time of Drupal CMS for a new user with knowledge of general installation of other systems might be less than “One & half minute??”

Image removed.

Maintenance and Upgrades

Drupal CMS ensures that the maintenance and upgrades are easy to handle by the site administrators. The procedures for updating your website include backing up the website and then replacing the files using a web update interface.

Backing up the website takes minimal effort as the site administrator can back up the whole website by downloading only one file which contains the assets of the website.

Drupal also notices the site admin every time an upgrade is required, thus ensuring that the website never misses an opportunity to stay up-to-date. However, if the administrator does not wish to change the version, Drupal CMS also provides security updates for the previous versions.

Community Strength and Contribution

The unofficial tagline of Drupal - “Come for the Software, stay for the Community” speaks volumes about the strength of the community. Functioning well since 2001, the Drupal Community is known for its dedicated bunch of developers and contributors who use, build, teach, document and market the best practices in Drupal. You can find their amazing works on Drupal.org.

Usability

Drupal CMS allows administrators to access any page or a section of the page in visitor mode by clicking on edit. While the core does not include a WYSIWYG editor, you can still get it in the form of a module, replacing all the other editor integration modules. Drupal CMS allows easy editing of pages or sections of a page by creating a simplified experience for the editors and administrators.

Scalability

Drupal CMS is highly scalable with high traffic handling capabilities. Its WebPages are cached indefinitely as the default setting configuration, but can also be manually cached for a specific time. Moreover, functionality area blocks can be cached, thus allowing better traffic handling capabilities for your websites.

Whether it is the extreme traffic spikes on certain occasions or the constant web traffic, Drupal handles all of that with utmost ease. Did you know that the digital experience of Australian Open 2019 was powered by Drupal? Like Dries said “When the world is watching an event, there is no room for error!”

Web 2.0 Features

Drupal CMS is an excellent community platform provider and It outperforms all other options in this particular area. The platform allows a website administrator to set permissions for site visitors to comment on any content of website.

Drupal also facilitates administrators to set permissions on who can edit, create or delete various content types. It can be an article, pictures, videos or any other media files, everything managed by the admin.

Security

Security is a major concern for web properties these days and Drupal leaves no stone unturned to ensure that your website is secure from any possible security breach. Security updates are published on drupal.org and the users are provided a notice every time a new update is released. Drupal’s active community is alert and any security loopholes are remedied very quickly. They also provide references to guide the user in making a site more secure.

User Roles and Workflow

The greatest asset of Drupal CMS is its ability to create any number of user roles and assign different permissions. While Drupal’s core includes two default set of roles, anonymous user and authenticated user, it allows you to create multiple user roles depending upon the content types. Also, granular permissions to each user can be assigned based on content section using the taxonomy function.

Image removed.

How Does Drupal Make Things Easy?

  • Advanced Control of URL: Drupal provides a precise control over URL structure of a page. Each content item which is called node in Drupal can be given a custom URL. Also, the path auto module can automate custom URL structure for each content type.
  • Custom Content Types and Views: Using Views and the Content Construction Kit (CCK), Drupal allows you to create new content type without having to write a single line of code! Yes, any number of custom content types can be created and displayed in many different ways without any code! Some examples of content types that you can create are forum posts, tutorials, blog spots, news stories, classified ads, podcasts, videos and more.
  • Themeing and PHP Template: PHP knowledge for themeing? No, not anymore! Themeing in Drupal can be done with absolutely no PHP knowledge. Drupal CMS uses PHP template theme engine by default.
  • Hook System: This system in Drupal enables you to hook in new modules easily. This hook system is invoked when a particular activity is performed in Drupal. This approach allows Drupal core to call at specific places certain functions defined in modules and enhance the functionality of core. They make it possible for a module to define new urls and pages within the site (hook_menu), to add content to pages (hook_block, hook_footer, etc.), to set up custom database tables (hook_schema) and more.

I completely agree with Dries when he said that Boris nailed it!

Drupal sucks less - Dries BuytaertImage removed.

Image removed.

Jun 06 2019
Jun 06

One of the chartered responsibilities of the Drupal Community Working Group (CWG) is to work to develop and support community initiatives that promote the health of the Drupal community and help to prevent conflict and burnout. One of the ways that we do this is by organizing workshops designed to provide community leaders with the knowledge, tools, and resources they need to help keep our community a friendly and welcoming place.

Following feedback from last year’s Teamwork and Leadership workshop at DrupalCon Nashville, we decided to narrow the focus and audience for our next workshop. One of the things we’ve observed over the last year in the Drupal community is that many of the issues we’ve seen have had to do with communication breakdowns between various individuals and groups. Following internal discussion in late 2018, we decided that one way to begin addressing this issue was by bringing together leaders in the community representing different groups and interests for a workshop focused on communication skills at DrupalCon Seattle.

In early 2019, we interviewed a number of potential facilitators suggested by Drupal Association board chair Adam Goodman and selected Megan Bernard, a professor of communication studies who specializes in promoting meaningful and inclusive learning and collaboration. Based on Prof. Bernard’s recommendation, we decided to spread this year’s workshop out over two days (April 10-11) in a dedicated meeting room provided by the Drupal Association, who generously covered all fees and expenses.

After finalizing the logistics, we then reached out to those who had attended last year’s workshop, as well as additional community members involved with community governance, camp organizing, core and contrib maintainers, the Drupal Security Team, Drupal Diversity & Inclusion, and the Drupal Association. The workshop facilitator suggested that we keep the size of the workshop to around 20 people, focusing on individuals who are well-connected in the community in hopes that they can help distribute the lessons learned in the workshop. 17 people attended some or all of the first day of the workshop, and 18 attended some or all of the second. In total, community members from 10 different countries spread across 4 different continents were represented.

Day one of the workshop included introductions, a discussion of needs, assets, and challenges faced by various groups within the Drupal community, and a discussion of shared context and perspective. We talked about different ways that other online communities help communicate context about their users, such as identifying the primary language, pronouns, and location in comment threads. During our discussion, Neil Drumm pointed out there was already an active issue led by justafish and others to allow users to display this kind of information, and one of the first action items we agreed on was helping it get implemented on Drupal.org as quickly as possible.

Another topic of discussion centered around creating pre-written template responses that maintainers and/or other privileged users could use in issue threads to “nudge” users in the right direction and realign communication when conversations start trending away from our community standards. We discussed badges and other ways to promote positive communication in our issues threads and other community spaces. In addition, we also talked about better ways to on-board new members into the project and foster an ongoing sense of community. One insight was that small cohorts of 6-8 people are far more effective than 1:1 mentoring at building community engagement.

In our second day, we dug more deeply into the concepts of emotional intelligence, de-escalation practices, and different forms of conflict. One of our exercises was a case study challenge, where different groups were tasked with finding different ways to resolve typical kinds of conflicts often seen in Drupal and other open source communities.

We also spent time talking about different ways to apply some of the things we had learned to our own community, and next steps. We agreed as a group to focus on three main areas:

  1. Setting context in issue queues. This work had already been mostly completed in https://www.drupal.org/node/2961229 so it was really just a matter of working with DA staff to get it implemented on Drupal.org.

  2. Nudges. A group of us decided to do more research into pre-written templates to use in issue queues, forums, and Slack to gently steer things back in the right direction when conversations were starting to go in a negative direction.

  3. Improving Drupal.org user on-boarding and cohorts. In addition to better identifying new users on the site, we agreed to look into various ways to help community members join small cohorts, organized by industry, technology, geography, or other criteria. We felt it was important that this be an opportunity that’s open to existing community members as well as new ones.

The folks assigned to each area agreed to find a time to meet in the coming weeks and to involve other interested community members as well. The CWG also identified several opportunities to improve and streamline its internal processes and communication practices.

By developing and communicating best practices that can be shared across the community, the hope is that we can help build structures for self-guided conflict resolution among community members and support more effective communication overall.

Jun 06 2019
Jun 06

Enterprises can find their websites attracting visitors and clients from different geographies, speaking different languages. The market is so huge (and international) that targeting only English speaker based users means deliberately missing out on an effective way to grow audience, ROI, customer trust, and rank on Google.

Language can be an enormous barrier, or an effective tool.

With an intent to create a great digital experience, enterprises often find themselves in a tough spot having to use and experiment with tools wrapped in an unfamiliar language.

Only it doesn’t have to be so.

In order to take advantage of the international and multilingual market with your Drupal 8 website, you need to make sure you have set your SEO just right (along with the language, of course).

But is it really that easy?

Why Opt for a Multilingual Website?

The world wide web makes it easy for the online businesses to be looked around from across any part of the world. While, the right SEO strategy will give you a place on the first page of Google, making it exclusive to one language is actually not a good idea (even for your SERP).

Smart marketers don't keep all eggs in one basket because it is bad for business. So is keeping all content in one language.


Here’s why a multilingual website will help:

Increases Your Possible Customer Base

Contrary to the common belief, not many people speak or use English outside certain geography.

Interestingly, the statistics collected by Internet World Stats reflect why your content shouldn’t solely be in English. While it dominates the scenario, English represents only 25% for internet searches.

horizontal graph with ten blue bars on a white background
source: Statista

Not a small number, however, English’s relative share of cyberspace has shrunk to around 30%, while French, German, Spanish and Chinese have all pushed into the top 10 languages online since 2008.

Language profoundly affects the user experience on the internet. In a pan-EU survey (2011) 44% of respondents feel they are missing interesting information because web pages are not in a language that they understand.

Availability of content in different languages can also affect the user’s understanding and succeeding action.

In an interesting case study of the Tel Aviv, Israel, searching for “restaurant” locally in Hebrew, Arabic and English brought back different results for each language. 

three blocks with a map image and text written on top

Gets Loyal Customers

According to Gartner, 89% of companies expect to compete mostly on the basis of customer experience. And language is the secret trailblazer.

“The web doesn’t just connect machines it connects people”


Native language helps companies connect, forge more trust and increase customer satisfaction. In fact, 74% of consumers are more likely to repurchase if after-sales care is offered in their native language.

In fact, there is an undeniably strong link between in-language content and a consumer’s likelihood of making a purchase.

Improves Your SERP

Search engines value quality content and user engagement. By providing your website in different languages, traffic coming from either version will improve the search engine ranking for the whole site, given you are using the right hreflang tags.

It also helps search engines understand your site, as it’s clear which languages you’re providing the content in.

Google doesn’t view the content in different languages as a duplicate, because it has multiple version of itself too.

Drupal 8 Multilingual Initiative

The multilingual initiative (started with D8) aimed to rebuild language support from the ground up so that everything in Drupal understood the language from the start.

Drupal 8 offers much more out of the box for building multilingual sites. More powerful than Drupal 7, it has greater flexibility, all without the need for any contrib module.

Providing content translation in an additional 94 languages, the number of modules have reduced from 22 (as in Drupal 7) to 4.

  1. Language: This is the base module needed to allow Drupal to add and choose the language of choice. Natively, it is available in 94 languages.
  2. Locale (Interface Translation): It helps to translate the interface, from both core and contributed modules and themes. It also provides built-in translation UI for easier editing.
  3. Content Translation: This module translates all the content types and content entities including site content, pages, taxonomy terms, blocks, etc., possible with its inbuilt API. Providing the language selector, you can choose your preferred language by selecting the checkbox.
  4. Configuration Translation: Allows you to translate configuration interface, such as of field labels, views, field settings, blocks, panels, etc. It also has a built-in responsive translation interface.

“Drupal 8 is easy and efficient for multilingual businesses.”


Other than the core modules, developers can also take hreflang into consideration. While the core Content Translation module adds hreflang tags only to translated entity pages hreflang module, on the other hand, adds hreflang tags to all pages.

An example of a Drupal 8 multilingual website: 

 Drupal-North-en-Srijan

The Drupal North Website in English

Drupal-North-fr-Srijan

The Drupal North Website in French

Drupal Multilingual SEO Challenges

Multilingual SEO can be intimidating. In fact, it is the elephant in the room, if not addressed, can potentially deflect your overall SEO efforts.

Language and cultural differences, website architecture, content duplicacy are amongst some of the challenges. Understanding these challenges can help marketers come up with better strategies to tackle the problem.

Here’re some of the multilingual SEO challenges and how Drupal helps you fight them off.

Multilingual and Multi-Geo are Different


A multilingual site must not be confused with multi-regional website. A multilingual site can create a ripple effect in the sense that a mistake in the original site will be replicated in all the duplicate sites.

A multilingual website is any website that offers content in more than one language. For example, a Canadian business with English and French versions of its site. Google Search tries to find pages that match the language of the searcher.

A multi-regional website is one that explicitly targets users in different countries. For example, a product manufacturer that ships to both Canada and the United States. Google Search tries to find the right locale page for the searcher.

Some sites are both multi-regional and multilingual: for example, a site might have different versions for the USA and for Canada, and both French and English versions of the Canadian content.


  • Site Structure, Navigation and Menu

    Navigation isn’t just for the viewers. If the navigation structure prevents visitors from easily finding the information it might also be blocking the search engines from indexing the content.

    It’s difficult to determine geo-targeting on a page-by-page basis, so it makes sense to consider using a URL structure that makes it easy to segment parts of the website for geotargeting.

    In Drupal, Entity translation solves the issues related to site structure, navigation and menu by default.

    Each variant has a language assigned and is called an entity translation. It allows (fieldable) entities to be translated into different languages, by introducing entity/field translation.

    It synchronizes taxonomy and fields across translations of the same content. Translation fallback for menus is not configurable by default

  • Content revision and publication workflow

    Content revisioning, proofreading, and approval are part of the critical content editing process.

    The Workflow module allows to create arbitrary Workflows, and assign them to Entities. Transitions between states can be allowed as per the role. For example, a workflow with states of Draft, Review, and Published could be assigned to the story node type. Only users with the role of 'chief editor' can set Stories to the published state.

    You can set up the Workflow to alter states from form, page, comment, a special block, and workflow tab.

    However, the module follows a linear approach. It would need revision if it is not one way.

    Another module, the Workbench moderation suite is modular, allowing site builders to build the workflow that best suits the content administrators on their site. The Workbench suite provides authors, editors, and publishers with a unified interface for managing content relevant to them.

  • User permission and role for different editorial teamsSince a number of users (read editors) are involved with the content editing a multilingual website, chances of accidents on the website are high. Editors can be clubbed together with set access limits.

    The Group module allows you to create arbitrary collections of your content and users on your site and grant access control permissions on those collections.

    All of the functionality this module has to offer is based on custom entities, opening up the door to various extensions or alterations that the user sees fit. The relationship between a group and its content or users is also an entity, allowing you to easily add metadata to that relationship.

  • Dealing with Duplicate content

    Drupal 8 provides schema out of the box. It is semantic markup text that provides search engines with a basic blueprint to categorically divide and simplify the information by breaking it into simpler blocks for easy description and discovery.

    Schema, in multilingual and multiregional SEO provides each and every language content with same content id letting the search engine know that variations of same content, thus, cancelling out the content duplicacy issues.

    While this feature was part of Drupal 7, it was in the form of separate entity translation plugin, which wasn’t part of the core.

    The main challenge, however, remains how to concatenate content so search engines don’t think it’s duplicate.

    This can be solved with the Entity Translation module which allows entities (such as nodes) to be translated into different languages. It provides field-level translation, so that site builders can select which fields should be translatable. It provides a UI for users to translate these fields into other languages.

  • Path alias

    As a foundational element of the global SEO, URLs need to be determined your multilingual URL structure strategy early on in the process.

    While pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias.

    By default, Drupal doesn’t allow the same URL over translated pages. It can be done by applying the patch and it will run.

  • Content Relevance Building unique vocabularyit is vital that you get the translations right. Seldom content relevance can get lost during translation, like the adventure in mistranslation costed HSBC $10 million for rebranding.  

    While the above instance is hilarious, it can be avoided for your digital property. You can build your custom vocabulary with Taxonomy. It is a core module in Drupal 8 and gives your sites use of the organizational keywords known in other systems as categories, tags, or metadata. It allows you to connect, relate and classify your website’s content. In Drupal, these terms are gathered within "vocabularies".

    The Taxonomy module allows you to create, manage and apply those vocabularies. translation module allows translation of taxonomy vocabularies and terms. 

funny-translationExito in Spanish means success, not exit

A word of caution, translate only when the logic prevails. Use separate vocabularies, translated vs untranslated, for different languages to begin with.

Building Multilingual LMS for Estee Lauder

Estee Lauder is a global leader in prestige beauty — delighting its consumers with its transformative products and experiences. It takes pride in focusing solely on prestige makeup and beauty care with a diverse portfolio of 25+ brands distributed globally through eCommerce channels and retail outlets sold in 150 countries. 

We built an open-source, multilingual, decoupled learning platform where beauty advisors could consume a vast set of learning resources.

The Multilingual Challenge

To ensure an effective product training and delivering the information fast knowledge exchange needs to be user-friendly, structured, and in their own language. With more than -- languages, the LMS needed to provide complete translation of the entire system.

The lack of direct connection between the LMS user and the language demanded that each language be provided for different geography.  

Discover the La Mer Connection LEVELS CONTENT CHS La Mer Learning Experience

A video quiz in Japanese

learning level content La Mer Learning ExperienceA video quiz in English

When designing the solution, we created a relation between market and language, and this worked as a bridge between available language for user selection. With a language and market segmentation/ filter, we could now access information about user activity based on their preference. 

We also helped Estee Lauder reduce 30% cost in classroom training and provided them with solution to track ROI from the learning and training initiatives.

Other Drupal Modules You Can Use

  • SEO Checklist: It uses best practices to check your website for proper search engine optimization. It eliminates guesswork by creating a functional to-do list of modules and tasks that remain. 
  • Real-time for SEO: This module helps you optimize content around keywords in a fast, natural, non-spam way.
  • Taxonomy title: It update the heading tag at the top of the taxonomy term page
  • Menu Attributes: It allows you to specify some additional attributes for menu items such as id, name, class, style, and rel.
  • Search 404:  For pages that do not exist (404), it performs a search based on the keywords in the URL, and shows the relevant result instead of the 404 page. It also includes search engine keywords detections as well as regular expression based term filtering from the URL.
Best Multilingual Practices to Consider from Google 

  • Use different URLs for different language versions
  • Make sure the page language is obvious
  • Let the user switch the page language
  • Use language-specific URLs
  • Targeting site content to a specific country (geo-targeting)
  • Using locale-specific URLs (.in for India)

Conclusion

Multilingual SEO is one of the most complicated and ignored fragments of web marketing. The good news is that it’s easier than ever to provide broader language support. With their adroit skills, our experts save you from the stress and build the best and provide you with innovative multilingual services.

Contact us today, if you are looking to build or modernize your multilingual website without losing the SEO prowess. Drop a mail at [email protected].

Jun 06 2019
Jun 06

Sometimes when working with Drupal’s exposed forms, you might get stuck with a field type that you don’t want. Often times you can find a module to help improve the style or functionality of these forms. However, in some cases using a module will not be available and you will have to make modifications directly to the code.

If you are just getting started with Drupal, and come from a JavaScript background, this will clearly be the easiest method for you. If you are familiar with PHP and want to better understand Drupal, I encourage you to try a preprocess function!

JavaScript Method (jQuery):

For the JavaScript we’ll start with a simple select field with three options (my favorite web technologies). I like to use jQuery because it’s a bit easier to read and write than Vanilla JavaScript. A quick overview, we’ll target the select field, loop through the options, and map them each to their own <a> tags in separate divs. This allows for each link to be styled individually, auto submit the form, append URL parameters, and more.

First, we’ll start with a Select Field inside of a Form Element each with a respective ID.


Now that we’re on the same page, let’s get started initializing Drupal behaviors and jQuery. In your theme folder, you’ll need a .js file for this code to live. I called mine script.js. You can read more about Drupal behaviors here.

(function(Drupal, $) {
  Drupal.behaviors.HOOK = {
    attach: function(context, settings) {
    }
  };
})(Drupal, jQuery);

// First lets get the form by ID so we have a place to append our newly created links
  $("#TheForm").append(() => {
    // Next we will hide the original select field
    $("#SelectField").hide();
    // and create a new container div for our links to live in
    const customLinks = $('<div id="CustomLinks"></div>');

// Here we target the options on the select field
    const selectOptions = $(this).find("#SelectField option");
    // Now we can loop through each option and get the properties we want
    // IMPORTANT: Use the function declaration to scope the "this" keyword, not an arrow function
    selectOptions.each(function() {
      // Initialize variables for the properties we want on our new links
      let optionText = $(this).text();
      et optionVal = $(this).val();
      // Create each link with assigned properties and append to our newly created container div
      let customLink = $(
        `<div class="${optionVal}"><a href="#${optionVal}">${optionText}</a></div>`
      );
      customLinks.append(customLink);
    });
    // And last but not least return our variable
    return customLinks;
  });

That’s it! You’ve now mastered jQuery, and can begin styling. A real use case of this method is on a site of ours that is currently in development where we have a Location “Content Type” using the List(Text) field to determine the location’s type and are outputting the locations in a view. These links append the option’s value to the URL query and submit the form on click.

Using a Preprocess Function (PHP)

Using a Drupal preprocess function in your THEME.theme file might be a little more straight forward, but in this case we’ll turn a number input field into a select field with custom build options. This will allow us to go from a non-user-friendly keyboard input to a nice, clickable option set.

Drupal has many preprocess functions for you to use depending on your specific use case. You can learn more here. For this case, I am again outputting the form in a view, exposed to the user, so I will use “THEME_form_views_exposed_form_alter”

You’ll first need to create the optionset, which can be done through a simple function that returns an associative array, replacing THEME with the name of your theme.

function THEME_build_distance_options() {
  return [
    '5' => '5 miles',
    '10' => '10 miles',
    '15' => '15 miles',
    '20' => '20 miles',
    '25' => '25 miles',
    '50' => '50 miles',
  ];
}

With our optionset ready to go, let’s modify the input field. Within your preprocess function, you might want to start by logging or printing your form so you can track down exactly where your element’s type value is. To do so, simply uncomment the first line in the function.

function THEME_form_views_exposed_form_alter(&$form, $form_state, $form_id) {
  //ksm($form);
  // Turn distance text input to Dropdown selector
  $form['distance']['value']['#type'] = 'select';
  $form['distance']['value']['#multiple'] = FALSE;
  $form['distance']['value']['#empty_option'] = t('Distance');
  // Call your build options function and assign it to the new select element
  $form['distance']['value']['#options'] = txc_base_build_distance_options();
  // And use unset to remove fields not needed for our new element type
  unset($form['distance']['value']['#size']);
  unset($form['distance']['value']['#min']);
  unset($form['distance']['value']['#step']);
}

Hopefully now you understand the power of using jQuery and/or Drupal preprocess functions to modify any element to your exact needs, and continue building awesome websites! To see more helpful tutorials on using Drupal visit some more of our blogs here.

Jun 06 2019
Jun 06

“Can I use Drupal for project management?” Definitely. 

Given all its content-oriented baked-in capabilities — file management, version control, easy content creation, and editing — Drupal makes the perfect software for:
 

  • managing your projects the easy and the... smart way
  • streamlining communication among your team members and with your contractors
     

In this respect, Drupal provides its own feature-rich distributions to help you put together your robust setup in no time. “Distributions” that come already packed with a set of useful sub-modules and themes, that all support the core functionality: project management (and smooth collaboration).

And without further ado, here the 2 most popular Drupal distributions for project management and team collaboration for you to evaluate first: RedHen and Open Atrium.
 

Loaded with robust and modern features, this Drupal-native CRM is designed with flexibility in mind. Meaning that it integrates seamlessly with the enterprise solution that you're using (Blackboud, Salesforce) and it supports a wide range of use cases...

And speaking of its functionalities:
 

  • engagement tracking and monitoring
  • data mangement: information about your contacts, the relationships among them and with your own company (e.g. memberships)
  • event registration integration
  • one-page donation forms to custom-tune to your liking
     

As for those many use cases that this Drupal distribution's built to accommodate, let's pick just a few real-world examples:

  • It's the best choice if smoothly integrating your CRM with your other enterprise solutions is critical for you
     
  • It streamlines tracking interactions with your contacts and organizations. Furthermore, since you can easily integrate it with your website, you get to leverage the provided data in order to adjutst the user experience accordingly...
     
  • It allows you to customize it and thus to give it a Drupal-like look and feel: to integrate it with modules like Rules or Views, to go for the same field creation UI etc.
     
  • Is your contacts list a huge one? This CRM comes to your rescue with some powerful baked-in tools: an efficient find-and-dedupe interface, an automated filter built in the UI, that you can use to filter your contacts by specific fields etc.
     
  • It automatically syncronizes data in your Contacts list with any newly updated data on your Drupal Users list
     


In short: RedHen CRM makes one of the top choices when you consider using Drupal for project management purposes. It's a lightwright, self-contained framework, more of a “cluster” of multiple specialized modules:
 

  • Organization
  • Activity
  • Fields
  • Organization Group
  • Dedupe
  • Registration
  • and a few more...
     

Looking for a Drupal-native distribution built around the team collaboration functionality?

One that should be:
 

  • convenientyly extensible
  • “loaded” with robust collaboration and information sharing features?
     

Then Open Atrium fits the profile in the slightest detail.

Built on top of the Organic Groups and Panopoly modules, it's a framewrok flexible enough to support discussion configurations by key criteria like team, project, organization...

And here are some more powerful features worth considering when you're still thinking whether you should use Drupal for project management:
 

  • an access control system, that grants granular control to certain sections of your project
  • a drag and drop layout with plenty of widgets to select from for customizing your landing pages and dashboard
  • file storing and sharing features
  • built-in Events, Files, Discussions, Issue Tracking, Document Wiki
  • an easy to customise, responsive theme
     

The END!

These are but 2 viable answers to your “Can I use Drupal for project management and team collaboration?” type of question. 2 of the options available that best meet some of your main requirements when looking for a project management software:
 

  • to be easy to use
  • to ship with an entire collection of file management and communication features
  • to be flexible enough and allow quick customization and seamless integrations
     

Have you tried other Drupal modules/distributions built around this functionality so far? 

Image by jessica45 from Pixabay

Jun 06 2019
Jun 06

Drupal keeps moving ahead. In June 2020, we hope to see the release of Drupal 9. Innovation often has a “flip side” — cumbersome upgrades. But not this time! Upgrades from Drupal 8 to Drupal 9 will be quick and easy, and this is one of Drupal 8 benefits. However, there is a condition all websites should meet — and there is a wonderful Upgrade Status module that will help them with that. 

Deprecated code removal = easy upgrades to Drupal 9

All Drupal 8 websites will have silky smooth upgrades to Drupal 9, if their core, modules, and themes are up-to-date and not using deprecated code. A very lucrative reason to migrate to Drupal 8 now if you have not yet ;)

Deprecated code is one that is no longer in use and has more modern alternatives. The functions and APIs that are marked as deprecated continue to exist alongside with these alternatives — until they are removed. The release of Drupal 9 will see a major cleanup from deprecations.

Modules and themes without deprecated code will be immediately ready for Drupal 9. Those with deprecated code should have it replaced before Drupal 9 arrives.

Dries about deprecated code and preparing for Drupal 9

Drupal creator Dries Buytaert encourages everyone to update their code to the latest and greatest APIs today — without waiting for Drupal 9. And here is where the Upgrade Status module comes in.

Upgrade Status module to check your site for deprecated code

The Upgrade Status module was developed on the basis of the powerful command-line tool called drupal-check, which scans your codebase for deprecations. 

But the Upgrade Status module makes the process handy for everyone thanks to its graphical user interface. It is easy to run the checks directly from the admin dashboard and get informative results.

There is even a chance we may see Upgrade Status module in Drupal core some day. A fresh issue about it has been created in mid May 2019. 

More details about Upgrade Status module’s work & features

Installation notes 

The Upgrade Status module uses third-party PHP dependencies, so it is highly recommended to install it via Composer package manager. The Update Manager and Git Deploy modules will also need to be enabled. When installed and enabled, the Upgrade Status module’s UI is available at /admin/reports/upgrade.

Checks for deprecated code

The module will scan your core, contributed, and custom modules and themes and tell you which ones have deprecated code. 

It tells the “status” of each project, which is either “No known errors” or “Errors found” (with their amount). When you click “View errors,” you are taken to the page with the information about the particular deprecated function or API.
 

Upgrade Status module to prepare for Drupal 9

Checks for available updates

It also shows you the available updates for contributed projects. These updates are highly recommended to perform, because Drupal projects’ maintainers resolve deprecation issues with time. 

Drupal developers who find deprecated code in a contributed project can also create an issue on drupal.org (if it does not exist yet) or help with patches.

Checking the whole site or particular projects

In addition to the full check, the module also allows you to check individual projects. You can also rerun the report on specific projects that you are currently working at. So you can avoid spending a long time to run the full check. This was mentioned among the module’s benefits in the blog post by one of its main creators — Gábor Hojtsy.

Handy reporting

The Upgrade Status module allows you to export the full report about the check or individual reports for projects.

Continuous integration opportunities

The module cannot be integrated with your continuous integration processes for now. However, the tool behind it, drupal-check, is suitable for this purpose. So the status check can be part of your automated workflows. 

Prepare for Drupal 9 with the help of our team!

So what will be the upgrade status of your website? It’s time to find out!

If you need any help with using Upgrade Status module or with cleaning up your website from deprecated code, our team of Drupal experts is there for you. 

Jun 06 2019
Jun 06

Our Director of Engineering, Matt Davis, sat down with two decoupled leaders on the Acquia team, Sam Nagle (Senior Solutions Architect) and Ron Northcutt (Principal Solutions Architect), to break down decoupled drupal.

We had our friends with the It's A Look podcast help us break this subject down in a fun and easy to understand way -- they did not disappoint! We go over:

  • The future of digital experiences
  • What is decoupled drupal (7:30)
  • When does it make sense to decouple (13:15)
  • When does it not make sense to decouple (14:55)
  • An intro to Decoupled Blocks (16:10)
  • Comparing traditional, decoupled and hybrid approaches (17:10)
  • Two specific examples of decoupled experiences (22:15)
Jun 05 2019
Jun 05

The latest version of Drupal is version 8.7.2. You’re familiar of course. In fact, you’ve been on pins and needles ever since version 8.7.1(a). I’m sure you’ve been instasnaptweeting ever since it was issued.

OK, back to reality: You’re definitely more concerned with getting the data you need, driving great brand interactions, and maintaining costs (and keeping your InfoSec or IT teams happy)—than the latest CMS version.

However, what if I told you that your outdated Drupal 6 or 7 instance could actually hinder you from innovating, drain your budget, and potentially cause unnecessary security risks? And that once you get to Drupal 8, migration costs, security updates, and best-of-breed functionality (like content management and media libraries) from core Drupal contributions will help you deliver the audience experiences that grow your business.

So, should you migrate to Drupal 8 immediately? Yes.

Here’s why:

  • More languages? Not a problem: multilingual capabilities - It doesn’t take an engineering background to know that creating a multilingual site is not an easy task. Taking a step back, there are so many questions to consider:

    • Should content be displayed in a single native language?

    • What percentage of your site traffic is in English vs. other languages?

    • How should you handle media files?

    • Is there a risk if changes are incurred by translations?

    • Will the translations be handled properly? Who will handle translations?

The good news is that creating a multilingual site became a lot easier with Drupal 8 with benefits for both site admins and end users. Drupal 8 is now part of “core” (the basic features). In previous versions of Drupal, you needed to install extra modules (collection of files that contain some functionality)  just to support multilingual, which meant a lot more work, added costs and additional maintenance. Drupal 8 brings multilingual support to core with 4 modules, localized content (which makes usability and translations easier so that content translation can be possible for all types, including taxonomies, field types et al) and there are 100+ default languages included.

  • Ease of content editing - Building layouts has never been more intuitive than with Layout Builder! The tl;dr for Layout Builder allows fielded content on the back-end, but a true drag and drop front-end editing experience. There are even more added benefits including a flexible, admin interface, use of contextual links while keeping structured data. And you can now create layouts for templated content with Layout Builder. Many of Drupal’s competitors don’t allow such a templated approach to be done in browser.  (P.S. Learn more on this fantastic page-editing experience from my colleague, Caroline Casals here.)

  • Responsiveness for all - Responsive behavior is no longer a nice-to-have, but de rigueur.  This was an add-on in Drupal 7, but a built-in feature with Drupal core includes built-in themes that are mobile responsive. Additional web services now allow for content to be accessible from Alexa, Siri, and other virtual assistants.

  • Speed matters! - Drupal 8 has features that will make your websites faster without the need for a lot of technical experience. “Cache tags” are used making caching more efficient and also page loads faster.

  • More robust security - Drupal 8 is the stable version of Drupal; functionalities and major modules have been ported over and are now supported by the Drupal open-source community.

  • Integration friendly - Drupal 8 is set-up so that site administrators can easily use APIs to connect to a number of digital tools. Think: your deep integrations, like web analytic platforms, customer relationship management (CRM), email campaigns, social networks and marketing automation systems; you can rest easier that they’ll perform and communicate in concert.

So why else should you invest now? Drupal 7 is currently on life support.  As of November 2021, Drupal 7 will reach it’s “end of life” (EOL) which means that the version will no longer be supported by core maintainers.  

“No longer being supported” also means the following:

Drupal 9 is scheduled to be released next year (2020) which gives companies about a year to upgrade to Drupal 8. Don’t panic, but develop a reasonable plan for when you'll stop investing in your Drupal 7 platform, keep your site as up-to-date as you can (this will help security), and get on Drupal 8 as fast as you can. Still have questions? Give me a shout.

Jun 05 2019
Jun 05

On Twitter, in Slack, on Discord, in IRC, or wherever you hang out with other developers on the internet, you may have heard some formulation of the following statements:

  • React doesn't support accessibility
  • React makes websites inaccessible
  • People should write accessible HTML instead of React
  • React is ruining the internet

There's a somewhat common misperception that JavaScript frameworks and web accessibility don't mix. React, being one of the largest JavaScript libraries, is often the target. 

In my career, however, I have had the interesting experience of being introduced to accessibility and ReactJS at around the same time. I found tooling in React that helped me learn a lot about accessibility that I never would have encountered otherwise.

And while I don't disagree that there are plenty of libraries, websites, apps, etc. written in React that are inaccessible, I do disagree there is something inherent in ReactJS that makes developers build inaccessible sites. In fact, I love the accessibility tooling available in the React ecosystem, so this post is really about how React can help you make more accessible websites than you've ever made before.

I'll outline how you can combine React linting tools, DOM auditing, and Storybook (a component library tool) to provide a really supportive accessibility environment for developers -- whether they are accessibility pros or just getting started. By the end of this post, you'll have the following configured for your Gatsby project (or other React project):

  • in-editor reporting of accessibility errors
  • a pre-commit hook for preventing accessibility errors from getting into the repository
  • browser console reporting of accessibility errors during development, with links to info on how to resolve the errors
  • a component library with built-in accessibility testing so all project stakeholders can hold the team accountable for accessibility issues

Want to get started right away? I created a Gatsby starter with all these accessibility tools built in. Checkout the gatsby-starter-accessibility repo that has all these features available out of the box.

Tools and Setup

eslint-plugin-jsx-a11y

If you've written JavaScript over the past few years, you've probably used or at least heard of ESLint. If not, now is a great time to get started with it!

ESLint is a linting utility for JavaScript that helps you catch formatting and syntax errors while you are writing code. Most editors have some sort of linting configuration built in, which lets you see errors in your editor while you code.

This is really helpful for keeping code consistent, especially when there's a lot of people working on a project.

ESLint also has a really healthy plugin ecosystem. You can include rules specific to the JavaScript framework you are working with (i.e., React, Angular, Vue, etc), among others. For React, I typically use the eslint-plugin-react and the really helpful eslint-plugin-jsx-a11y. This plugin lints your code for known accessibility violations, using these rules.

Having these automated tests run while you are writing code can prevent so many errors. Even though automated accessibility testing catches only about 20-30% of all accessibility errors, catching these errors before they make it into a codebase can save time, budget, and energy for doing more manual testing once the code is in the browser.

Usage

Here's how you can get started with accessibility linting in your React project.

First, we'll need to install the necessary eslint packages:

npm install eslint eslint-plugin-react eslint-plugin-jsx-a11y --save-dev

In your package.json, add the following configuration:

"eslintConfig": {
    "parserOptions": {
      "sourceType": "module"
    },
    "env": {
      "node": true,
      "browser": true,
      "es6": true
    },
    "plugins": [
      "react",
      "jsx-a11y"
    ],
    "extends": [
      "eslint:recommended",
      "plugin:react/recommended",
      "plugin:jsx-a11y/recommended"
    ]
}

With this added to your package.json, ESLint will use the rules recommended by ESLint, React, and the jsx-a11y plugin while you are working. 

You'll want to make sure your editor is set up to display linting errors in the editor for this to be really useful.

Add a pre-commit hook for preventing inaccessible code in the codebase using lint:staged

Now we've got some accessibility linting set up, and hopefully everyone working on the project has linting turned on in their editor so they can see any errors while they work.

But you can't be 100% sure that everyone will be paying attention to the linter. And even if they are, it's easy to make a quick change, switch files, and any errors will be out of sight, out of mind.

What we can do as an extra check to prevent inaccessible code from entering the codebase is to add a pre-commit hook that runs the linting we set up above every time a developer tries to commit code. If an accessibility error is found, an error message will display with the relevant linting error and location of the error, and the commit will be prevented until the developer resolves the issue.

lint-staged will run a pre-commit hook that will catch any accessibility errors raised by eslint-plugin-jsx-a11y

lint-staged will run a pre-commit hook that will catch any accessibility errors raised by eslint-plugin-jsx-a11y

Usage

The easiest way to set up pre-commit linting hooks is using the lint-staged package. After you've got all your eslint configuration set up (from our first step), run the following command in your project directory:

npx mrm lint-staged

This command will install the husky package for managing the pre-commit hooks and look in your package.json to automatically setup a pre-commit hook based on your linting configuration.

A simple configuration that lints all JS files based on the existing eslint configuration in the repo will look like this (from package.json):

"husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
},
"lint-staged": {
    "*.js": [
      "eslint"
    ]
}

You can adjust this as you see fit. For example, sometimes you want to limit linting to certain directories. To run the pre-commit hook only on JS files in the src directory, you would update the lint-staged configuration like this:

"lint-staged": {
    "src/*.js": [
      "eslint"
    ]
}

The great thing about lint-staged is that it only lints the files that are part of the current commit. If for some reason there is some pre-existing errors in another part of the codebase, the commit won't be prevented--it only prevents new errors from being introduced.

react-axe

The great thing about the linting setup we have now is that it will prevent a lot of errors from being introduced into the codebase. It won't prevent all errors, however. Some errors only exist when several components are used together, or from certain content, and can only be caught in the browser.

Luckily, we have a solution for this, too. Axe is an open source engine for automated accessibility testing, supported by Deque. I first became familiar with axe by using their really useful browser extension for testing individual pages in the browser.

The problem with browser-extension accessibility testing is that they are typically only run after development is complete. Using the react-axe library, you can have automated accessibility testing run on every page during development, so developers can get real-time feedback on accessibility issues. This helps make sure that accessibility issues never make it to production, and it also educates developers who may not be accessibility experts on potential pitfalls.

The react-axe library is an easy to use implementation of the axe engine, specifically for React.

Usage

Here's how to get started using react-axe with Gatsby (someone made a Gatsby plugin for it!):

npm install --save gatsby-plugin-react-axe

Add gatsby-plugin-react-axe to your plugins array in gatsby-config.js

module.exports = {
 siteMetadata: {
        title: 'Gatsby Default Starter',
    description:
      'Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.',
    author: '@gatsbyjs',
  },
  plugins: [
    'gatsby-plugin-react-axe',
    // other plugins go here
  ],
};

Now, when the page renders, the plugin will print any accessibility errors to the browser console. Here's an example, where I've put an <h5> directly underneath an <h1>:

React aXe will show accessibility errors in the console while you are developing.

React aXe will show accessibility errors in the console while you are developing.

You can see that in the axe message in the console that it has identified my heading issue: "Heading issues should only increase by one" as a moderate issue. It also includes a link to learn more about why this is an issue and how to resolve it: https://dequeuniversity.com/rules/axe/3.2/heading-order. And lastly, it displays the specific element that is causing the issue for easy identification.

This kind of instant feedback is so important, whether you are an accessibility beginner or even a seasoned pro. Catching the automated issues instantaneously can give you more bandwidth to focus on other more involved tasks.

Storybook and Accessibility

The last piece of our accessibility workflow has to do with our component-driven workflow. For React projects, I have really enjoyed using Storybook to build and document our front end components. 

Storybook is an open source tool for developing UI components in isolation for React, Vue, and Angular. It makes building stunning UIs organized and efficient.

storybook.js.org

Besides having a nice workflow and UI, Storybook has an awesome accessibility add-on that adds a panel to each component in your component library highlighting accessibility issues.

Our storybook configuration has built-in axe tests for each component and a color blindness simulator, provided by the storybook accessibility add-on.

Behind the scenes, the add-on actually also uses aXe for testing. This is really nice, because it means that the testing we are using in development is the same as what we are using in the component library. Having the errors highlighted in the component library also helps everyone on our project teams catch accessibility issues as they are browsing the library, either for QA purposes or design inspiration.

Setup

The setup for Storybook is a bit more involved, so if you haven't used Storybook before, you can checkout the Storybook for React documentation for a generic React setup.

If you want to get Storybook running with Gatsby, see Visual Testing with Storybook in the Gatsby docs.

Once you have Storybook setup, adding the accessibility add-on is pretty straightforward.

First, install the add-on:

npm install @storybook/addon-a11y --save-dev

Then add this line to your addons.js file in your storybook config directory:

import '@storybook/addon-a11y/register';

And lastly, add this line in your Storybook config.js file to automatically add the accessibility panel to all components:

addDecorator(withA11y);

When you run Storybook now, you should now see the accessibility panel (see a live version here):

Our storybook configuration has built-in axe tests for each component and a color blindness simulator, provided by the storybook accessibility add-on.

Our storybook configuration has built-in axe tests for each component and a color blindness simulator, provided by the storybook accessibility add-on.

As a side note - you can control the order of the tabs in your add-ons panel based on the order that you import add-ons into your addons.js file, if you want to have the accessibility panel display by default, make sure it is the first line in your addons.js.

Wrap up

If you didn't follow along with the setup or just want to get a new project setup quickly with this workflow, checkout the gatsby-starter-accessibility Gatsby starter!

You can create a new Gatsby site with all the configuration I described above out-of-the box with this single line in your terminal:

npx gatsby new my-accessible-project https://github.com/benjamingrobertson/gatsby-starter-accessibility

Or you can checkout the specific configuration in the repo.

Whether you ran through all the steps above or use with the starter, you'll have the following features set up in your Gatsby / React project:

  • in-editor reporting of accessibility errors
  • a pre-commit hook for preventing accessibility errors from getting into the repository
  • browser console reporting of accessibility errors during development, with links to info on how to resolve the errors
  • a component library with built-in accessibility testing so all project stakeholders can hold the team accountable for accessibility issues
     

On a complex project with many team members and moving parts, automating accessibility testing will help save time to make sure you can pay more attention to the accessibility tasks that can't be caught by automated tests. 

Beyond that, tools like this can really help developers level up their accessibility knowledge.

I know it's helped me--I hope it helps your team too!

Jun 05 2019
Jun 05

According to Drupal’s community documentation, “The Benevolent Dictator for Life (BDFL),” Dries Buytaert, is the “chief decision-maker for the [Drupal] project.” In practice, as Dries has pointed out, he wears “a lot of different hats: manager of people and projects, evangelist, fundraiser, sponsor, public speaker, and BDFL.” And he is chairman and chief technology officer of a company that has received $173,500,000 in funding. Recently I was wondering, how often does Dries wear his Drupal core code committer hat?

In this article, I will use data from the Drupal Git commit history, as well as other sources, to demonstrate how dramatically the Drupal core “code committing” landscape has changed. I do not intend to tell the entire story about power structures in the Drupal community in a single article. I believe that issue credits, for instance, offer more clues about power structures. Rather, my analysis below argues that the process of committing code to Drupal core is a far more complex process than some might assume of a project with a BDFL.

Understanding Drupal Core Committers

Whereas Dries used to commit 100% of the core code, he now leads a team of core committers who “are the people in the project with commit access to Drupal core.” In other words, core committers are the people who can make changes to Drupal core. We can get an idea about the work of core committers from sites such as Open Hub or the GitLab contributor charts, but those charts omit key details about this team. In this analysis, I’d like to offer more context.

The Drupal core committer team has grown exponentially since the start of the Drupal codebase more than 19 years ago. At present, there are 11 core committers for Drupal 8, and from what I can tell, these are the dates that each new core committer was announced:

Unsurprisingly, one task of a core committer is to commit code. For a Drupal core committer to consider a change to Drupal, the proposed change must advance through a series of “core gates,” including the accessibility gate and the performance gate. Code must pass Drupal’s automated tests and meet Drupal’s coding standards. But even after making it through all of the “gates,” only a core committer can add, delete, or update Drupal code. At any given time, there might be 100 or more Drupal core issues that have (presumably) gone through the process of being proposed, discussed, developed, tested, and eventually, “Reviewed & tested by the community,” or RTBC.

Core committers can provide feedback on these RTBC issues, review and commit code from them, or change their status back to “Needs work” or “Needs review.” Just because core committers have the power to commit code does not necessarily mean they view their role as deciding what code gets into core and what does not. For example, Alex Pott told me, “I feel that I exert much more influence on the direction of core in what I choose to contribute code to than in what I commit.” He said that he views the RTBC queue more as a “TODO list” than a menu from which he can select what he wants to commit.

Many people might not realize that core committers do a lot more than just committing code. On the one hand, as Dries shared with me, “The hard work is not the actual committing – that only takes a few seconds. The hard work is all the reviews, feedback, and consensus building that happens prior to the actual commit.” Indeed, core committers contribute to the Drupal project in many ways that are difficult to measure. For instance, when core committers offer feedback in the issue queue, organize initiative meetings, or encourage other contributors, they do not get any easily measured “credit.” It was Jess who suggested that I work on the Configuration Management Initiative (CMI) and I will be forever grateful because her encouragement likely changed the course of my career.

The core committers play significant roles in the Drupal project, and those roles are not arbitrary. Each core committer has distinct responsibilities. According to the community documentation (a “living document”), “the BDFL assigns [core committers] certain areas of focus.” For instance, within the team of core committers, a Product Manager, Framework Manager, and Release Manager, each has different responsibilities. The “core committers are a group of peers, and are expected to work closely together to achieve alignment, to consult each other freely when making difficult decisions, and to bring in the BDFL as needed.”

Part of my goal here is to show that the commit history can only tell part of the story about the team of core committers. I’d also like to point out that in this article I limit my focus to Drupal 8 core development, and not, for instance, the work of the Drupal 7 core committers, the maintainers of the 43,000+ contributed modules, the Drupal documentation initiative, conference selection committees, or any of the other groups of people who wield power in the Drupal community.

This work is one component of my larger project to evaluate publicly-available data sources to help determine if any of them might be beneficial to the Drupal community. I acknowledge that by counting countable things I risk highlighting trivial aspects of a thoughtful community or shifting attention away from what the Drupal community actually values. Nevertheless, I believe that interpreting Drupal’s commit history is a worthwhile undertaking, in part because it is publicly-available data that might be misinterpreted, but also because I think that a careful analysis reveals further evidence of a claim that Dries and I made in 2016: Drupal “is a healthy project” and “the Drupal community is far ahead in understanding how to sustain and scale the project.”

Who Commits Drupal Core Code?

The Git commit history cannot answer all of our questions, but it can answer some questions. As one GitLab employee put it, “Git commit messages are the fingerprints that you leave on the code you touch.” Commit messages tell us who has been pushing code and why. The messages form a line by line history of the Drupal core codebase, from the very first commit to the “birth” of Drupal 1.0.0, to today.

The commit history can answer questions such as, “Who has made the most commits to Drupal core?” Unsurprisingly, the answer to that question is “Dries”:

However, since 2015 Dries has dramatically reduced his core commits. In fact, he only has 4 commits since October 2015:

If someone just looked at the contributor charts or a graph like the one above, they might not realize the fact that Dries is as committed to Drupal as ever. He spends less time obsessing about the code and architecture and more time setting strategy, helping the Drupal Association, talking to core committers, and getting funding for core initiatives and core committers. In recent years he has dedicated considerable time to communication and promotion, and he has been forthcoming with regards to his new role. He has been writing more in-depth blog posts about the various Drupal initiatives as well as other aspects of the project. In other words, he has intentionally shifted his focus away from committing towards other aspects of the project, and his “guiding principle” is to “optimize for impact.”

Another part of the reason that Dries has had fewer commits stems from the recent shift in effort from Drupal core to contrib. Overall commits to Drupal core have decreased since their highest point in 2013, and have been down considerably since the release of Drupal 8 in 2015:

But once again, we must interpret these data carefully. Even if the total number of commits to Drupal core has declined since 2015, the Drupal project continues to evolve. Since Drupal 8.0.0, BigPipe, Workflows, Migrate, Media, and Layout Builder are just a few of the new modules that have become stable, and the list of strategic initiatives remains ambitious. So while the data may seem to suggest that interest in Drupal core has waned, I suspect that, in fact, the opposite is true.

We can, on the other hand, use the git commit history to get a sense for how the other core committers have become involved in committing code to Drupal core. We can visualize all commits by day over the entire history of the Drupal codebase for each (current) individual core committer:

We get a better sense of the distribution of work by looking beyond total commits to the percentage of core commits per committer for each year. Using percentages better demonstrates how the work of the code committing has become far more distributed (in this chart, "colorful") than it was during the early years of Drupal's lifespan:

You might notice that the chart above does not include past core committers such as the Drupal 5 core committer, Neil Drumm (406 commits), or the Drupal 4.7 core committer, Gerhard Killesreiter (193 commits). I’m more interested in recent changes.

When we shift back to looking at total commits (rather than percentages) we can watch the team grow over the entire history of the Drupal project in the following animation, which stacks (ranks) committers by year based on their total number of commits:

 

One fact that caught my attention was that Alex Pott’s name topped the list for 6 of the last 7 years. But I’d like to stress again that this visualization can only tell part of the story. For instance, those numbers don’t reflect the fact that Alex quit his job in order to work on Drupal 8 (before becoming a core committer) or his dedication to working on “non-technical” issues, such as a recent change that replaced gendered language with gender-neutral language in the Drupal codebase. I admit to a particular bias because I have had the pleasure of giving talks as well as working with him on the Configuration Management Initiative (CMI), but I think the correct way to interpret these data is to conclude simply that Alex Pott, along with Nathaniel Catchpole and Angie Byron, are a few of the members of the core committer team who have been spending more of their time committing code.

We find a slightly different story when we look beyond just the number of commits. The commit history also contains the total number of modified files, as well as the number of added and deleted lines. Each commit includes entries like this:

2 files changed, 4 insertions(+), 15 deletions(-)

Parsing the Git logs in order to measure insertions and deletions reveals a slightly different breakdown, with Nathaniel Catchpole’s name at the top of the list:

Differences in the ranking are largely the result of just a few issues that moved around more than 100,000 lines of code and significantly affected the totals, such as removing external dependencies, moving all core files under /core, converting to array syntax, not including vendor test code, and removing migrate-db.sh.

The commit history contains a wealth of additional fascinating data points that are beyond the scope of this article, but for now, I’d like to discuss just one more to suggest the changing nature in the land of core committing: commit messages. Every core commit includes a message that follows a prescribed pattern and includes the issue number, a comma-separated list of usernames, and a short summary of the change. The syntax looks like this:

Issue #52287 by sun, Dries: Fix outdated commit message standards

Combining all commit messages and removing the English language “stopwords” – such as “to,” “if,” “this,” and “were” – results in a list of words and usernames, with one core committer near the top of the list, alexpott (Alex Pott’s username):

 

Only one other user, Daniel Wehner (dawehner), is mentioned more than Alex Pott. I find it mildly interesting to see that “dawehner” and “alexpott” appear in more commit messages than words such as “tests,” “use,” “fix,” “entity,” “field,” or even “Drupal.” It also caught my attention that the word “dries” did not make my top 20 list. Thus, I would suggest that a basic ranking of the words used in commit messages does not provide much value and is not even a particularly good method to determine who is contributing code to Drupal – DrupalCores, for instance, does a much better job.

Nonetheless, I mention the commit messages because they are part of the commit history and because those messages remind us once again that core committers like Alex Pott do a lot more than commit code to the Drupal project – they also contribute a remarkable amount of code. Alex Pott, Jess, Gábor Hojtsy, Nathaniel Catchpole, and Alex Bronstein are each (as of this writing) among the top 20 contributors to Drupal 8. Moreover, this list of words brings us back to questions about the suitability of a term such as “BDFL.”

BDFL Comparisons

While Dries could still legitimately don a hat that reads “Undisputed Leader of the Drupal Project,” it seems clear that the dynamics of committing code to Drupal core have shifted and that core committers assume a variety of key roles in the success of the Drupal project. During the process of writing this article, someone even opened an issue on Drupal.org to “Officially replace the title BDFL with Project Lead.” Whatever his official title, the evolving structure of the core committer team has allowed Dries to focus on the overall direction of the Drupal project and spend less time involved in choices about the code that gets committed to Drupal core on a daily basis. And it’s a considerable amount of code – since Drupal 8 was released there have been more than 5719 commits to Drupal core, or roughly 4.42 commits per day.

While other well-known free software projects with a BDFL, such as Vim, only have one contributor, numerous other well-known projects have moved in a direction comparable to Drupal. As of this writing, Linus Torvalds sits at #37 on the list of contributors to the Linux kernel. Or perhaps more related to Drupal, Matt Mullenweg, who calls himself the BDFL of WordPress, is not listed as a core contributor to the project and is not the top contributor to the project – that honor goes to Sergey Biryukov, who has held it for a while.

Further, one could reasonably conclude that Drupal’s commit history calls into question a concern that many people, including me, have raised regarding the influence of Acquia (Dries’s company) in the Drupal community. Acquia sponsors a lot of Drupal development, including core committers. Angie Byron, Jess, Gábor Hojtsy, and Alex Bronstein are all paid by Acquia to work on Drupal core full-time. However, I still believe what Dries and I wrote in 2016 when we stated that we do not think Acquia should “contribute less. Instead, we would like to see more companies provide more leadership to Drupal and meaningfully contribute on Drupal.org.” On this topic, the commit logs indicate positive movement: since Drupal 8 was released, Alex Pott and Nathaniel Catchpole – the two most active core committers – have made 72% of the commits to Drupal core – and neither of them work for Acquia. So while everyone in the Drupal community owes a debt of gratitude to Acquia for their sponsorship of the Drupal project, we should also thank companies the sponsor core committers like Alex Pott and Nathaniel Catchpole, including Thunder, Acro Media, Chapter Three, Third and Grove, and Tag1 Consulting.

And the other core committers? Well, I can’t possibly visualize all of the work that they do. They are helping coordinate core initiatives, such as the Admin UI & JavaScript Modernisation initiative and Drupal 9 initiative. They are working on Drupal’s out-of-the-box experience and ensuring consistency across APIs. They are helping other contributors collaborate more effectively and efficiently. They are coordinating with the security team and helping to remove release blockers. The core committers embody the spirit of the phrase that appears on every new Drupal installation: “Powered by Drupal.” I am grateful for their dedication to the Drupal project and the Drupal community. The work they do is often not highly visible, but it’s vital to the continued success of the project.

A deeper appreciation for the work of the Drupal core committers has been just one of the positive consequences of this project. My first attempts at interpreting Drupal’s commit history were somewhat misguided because I did not fully understand the inner workings of the team of core committers. But in fact, nobody can completely understand or represent what the core committers do, and I personally believe that the “Drupal community” is little more than a collection of stories we choose to believe. However, we live in a time where people desire to understand the world through dashboards that summarize data and where we gloss over complexities. Consequently, I feel more motivated than ever to continue my search for data that more accurately reflect the Drupal community for which I have so much respect. (Incidentally, if you are a statistician with an interest in free software, I would love to collaborate.) If we want a deeper understanding of who contributes to Drupal, we need more and better sources of information than Drupal’s “contributors” page. I accept that I will never concoct the magical visualization that perfectly represents “Drupal,” but I am enjoying the search.

Code for this project is available on GitLab. I would like to thank Cathy Theys, Megh Plunkett, Dries Buytaert, and Alex Pott for their thoughtful feedback on earlier drafts of this article.

Jun 05 2019
Jun 05

Guzzle makes HTTP requests easy. When they work, it's like magic. However, as with all coding, getting something to work requires debugging, and this is where the Drupal implementation of Guzzle has a major usability problem - any returned messages are truncated, meaning that with the default settings, error messages that can help debug an issue are not accessible to the developer. This article will show developers how they can re-structure their Guzzle queries to log the full error to the Drupal log, instead of a truncated error that does not help fix the issue.

Standard Methodology

Generally, when making a Guzzle request, it is made using a try/catch paradigm, so that the site does not crash in the case of an error. When not using try/catch, a Guzzle error will result in a WSOD, which is as bad as it gets for usability. So let's take a look at an example of how Guzzle would request a page using a standard try/catch:

try {
  $client = \Drupal::httpClient();
  $result = $client->request('GET', 'https://www.google.com');
}
catch (\Exception $error) {
  $logger = \Drupal::logger('HTTP Client error');
  $logger->error($error->getMessage());
}

This code will request the results of www.google.com, and place them in the $result variable. In the case that the request failed for some reason, the system logs the result of $error->getMessage() to the Drupal log.

The problem, as mentioned in the intro, is that the value returned from $error->getMessage() contains a truncated version of the response returned from the remote website. If the developer is lucky, the text shown will contain enough information to debug the problem, but rarely is that the case. Often the error message will look something along the lines of:

Client error: `POST https://exaxmple.com/3.0/users` resulted in a `400 Bad Request` response: {"type":"http://developer.example.com/documentation/guides/error-glossary/","title":"Invalid Resource","stat (truncated...)

As can be seen, the full response is not shown. The actual details of the problem, and any suggestions as to a solution are not able to be seen. What we want to happen is that the full response details are logged, so we can get some accurate information as to what happened with the request.

Debugging Guzzle Errors

In the code shown above, we used the catch statement to catch \Exception. Generally developers will create a class that extends \Exception, allowing users to catch specific errors, finally catching \Exception as a generic default fallback.

When Guzzle hits an error, it throws the exception GuzzleHttp\Exception\GuzzleException. This allows us to catch this exception first to create our own log that contains the full response from the remote server.

We can do this, because GuzzleException provides the response object from the original request, which we can use to get the actual response body the remote server sent with the error. We then log that response body to the Drupal log.

use Drupal\Component\Render\FormattableMarkup;
use GuzzleHttp\Exception\GuzzleException;

try {
  $response = $client->request($method, $endpoint, $options);
}

// First try to catch the GuzzleException. This indicates a failed response from the remote API.
catch (GuzzleException $error) {

  // Get the original response
  $response = $error->getResponse();

  // Get the info returned from the remote server.
  $response_info = $response->getBody()->getContents();

  // Using FormattableMarkup allows for the use of <pre/> tags, giving a more readable log item.
  $message = new FormattableMarkup('API connection error. Error details are as follows:<pre>@response</pre>', ['@response' => print_r(json_decode($response_info), TRUE)]);

  // Log the error
  watchdog_exception('Remote API Connection', $error, $message);
}

// A non-Guzzle error occurred. The type of exception is unknown, so a generic log item is created.
catch (\Exception $error) {
  // Log the error.
  watchdog_exception('Remote API Connection', $error, t('An unknown error occurred while trying to connect to the remote API. This is not a Guzzle error, nor an error in the remote API, rather a generic local error ocurred. The reported error was @error', ['@error' => $error->getMessage()));
}

With this code, we have caught the Guzzle exception, and logged the actual content of the response from the remote server to the Drupal log. If the exception thrown was any other kind of exception than GuzzleException, we are catching the generic \Exception class, and logging the given error message.

By logging the response details, our log entry will now look something like this:

Remote API connection error. Error details are as follows:

stdClass Object (
  [title] => Invalid Resource
  [status] => 400
  [detail] => The resource submitted could not be validated. For field-specific details, see the 'errors' array.
  [errors] => Array (
    [0] => stdClass Object (
      [field] => some_field
      [message] => Data presented is not one of the accepted values: 'Something', 'something else', or another thing'
    )
  )
)

* Note that this is just an example, and that each API will give its own response structure.

This is a much more valuable debug message than the original truncated message, which left us understanding that there had been an error, but without the information required to fix it.

Summary

Drupal 8 ships with Guzzle, an excellent HTTP client for making requests to other servers. However, the standard debugging method doesn't provide a helpful log message from Guzzle. This article shows how to catch Guzzle errors, so that the full response can be logged, making debugging of connection to remote servers and APIs much easier.

Happy Drupaling!

Jun 05 2019
Jun 05

Hook 42 is headed to Tennessee for our next community event. Not only have we proudly sponsored Drupal Camp Chattanooga, you'll also find us doing a Gatsby.js training as well as giving talks about topics we hold near and dear to our hearts. Come say hello if you're there.

Presentations

Keynote

We're very excited that Adam Bergstein will be conducting this year's keynote in Chattanooga. You don't wanna miss it!

Change is the only constant in life. As technologists, the landscape around us is constantly shifting. We must evolve or become irrelevant. How do we do so? It's a gradual thing, but it also happens so quickly. Together we're going to explore considerations around that evolution and how we can embrace the changes. 

Topics include the limitations of technical skills, a purpose-driven perspective, and evolving ourselves. When evaluating Drupal, Adam shares how the product and community have evolved in the past and opportunities for the future. You can take away some perspective on how to approach change and evolve professionally.

Glitch: Love to learn the web again

Jonathan Daggerhart is talking about one of his favorite community tools - Glitch! You may not be entirely sure what Glitch is, but we promise you'll leave with more excitement than ever for learning new web technologies again. Jonathan will be covering the basics of Glitch, demoing it, and you to use it for fun and profit! Bonus points if you are already using Glitch today.

Man sitting at desk typing on laptop with gatsby.js logo on the screen

Training

Gatsby.js

Adam Bergstein is leading an all day training on Friday, June 7th, diving deep into Gatsby.js. Make sure you bring your laptop, as this training is very hands-on. We're ensuring everyone participating can leave with a more developed sense of what Gatsby.js can do and how you can implement it in the future. In this training session, Adam will go over setting up your environment followed by primers and follow along exercises that cover the following items:

  • Setting up Gatsby
  • Basic GraphQL & Gatsby
  • Test Drupal GraphQL
  • Recipe Listing Page (plus responsive images)
  • Recipe Detail Page
  • Updating Recipe List
  • Deployment

We hope you're ready to get your hands dirty with this training.

See You In Tennessee

We're excited for our trip to Tennessee. Yet again our ambitious team is always rushing to be first in line for the growth of our community. We enjoy trading stories with all of you, which is why it is important for us to share our experiences and methodologies that we've fine-tuned along the way. Chattanooga is just another stop on the community train for the Hook 42 team, and we couldn't be more excited to watch our community learn and grow together. We hope to see many familiar faces this year and make some new friends along the way.

via GIPHY

Jun 05 2019
Jun 05

The unique Drupal Views module allows you to pull the data from the database and display it in any way you wish. As an example, we discussed creating photo galleries with Drupal 8 Views. Drupal’s flexibility is unlimited, so it offers additional ways to customize the content presentation and meet the customer’s precise requirements. One of them is to rewrite the output of Drupal Views fields. Let’s explore it a little bit in the simplest of cases.

Why rewrite Drupal 8 Views field output?

It’s possible to shape your Views like with Legos when using the field-based format in it. You can add only the desired fields of a content type or other entity type. It’s easy to rearrange the fields in any order, hide or show the field labels, configure the fields, and so on. 

However, there are cases when you just need the fields to display differently. The customer may want to merge two fields into one, use the values of one field in another, link fields to specific pages, replace links with icons, and so on — the sky's the limit. 

The solution depends on the case. In more complicated cases, expert Drupal development teams create custom field formatters. In simpler ones, they just rewrite the output of Drupal Views fields via the built-in Views dashboard capabilities. 

Main principles of rewriting the output of Drupal 8 Views fields

When rewriting Views fields, we need to take into account the main principles:

  • The Views format should be configured as field-based.
  • Every field has a “rewrite results” section in settings, which has 6 options:
     

Rewriting Drupal 8 Views field output

  • There are replacement patterns that allow us to use tokens and display dynamic values (for example, the ID of the current node).

Replacement patterns for Views fields

  • We can add fields to Views, hide them from display, and use their values in other fields.
  • The hidden fields whose values we want to use should always be positioned above the ones we want to rewrite in the Views list of fields.

A simple example on how to rewrite Drupal 8 Views fields

Let’s create a view that displays all nodes of a content type. It uses fields and shows content as a table.

Field-based Drupal 8 view

In our rewrite example, we want to:

  • merge the content title and body into the same Views table column
  • add a content editing link that will be displayed as a pretty edit icon with a pencil.

1) Merging two fields into the same column

We will overwrite the title field by adding the body field values to it. We don’t need the body field to be shown — we just need to grab its values. So we create the body field and exclude it from display.

Exclude a Drupal 8 field from display

And we rearrange the fields so the body field is above the title field.

Rearranging Drupal 8 fields

In the title field settings, we choose “Rewrite Results” — “Override the output of this field with custom text.” And then we open “Replacement Patterns” and see the tokens for the title and the body.

Rewriting output of Drupal Views as custom text

We grab the tokens and put them into the text box.

Using replacement tokens in Drupal Views fields

And now our view shows them in the same column!

Merging title and body fields in Drupal Views

 

2) Adding an edit icon that leads to the edit page

We add “The edit icon” field to our content type, and attach the icon itself as a default image. We can move this field to “Disabled.”

Adding default image to a Drupal field

We then return to our view, find this field, add it to the view, and rewrite it so it leads to the content editing page. For this, we select “Output the field with custom link,” go to Replacement Patterns, grab the “node ID” ({{ nid }}) token, and shape our custom link with it:

Rewriting output of Drupal 8 Views fields

Done! We have a pretty edit icon that leads directly to the node editing page.

Drupal 8 view with field output rewrite

 

Let’s rewrite your Views fields exactly as you need

This has been just an elementary example of how to rewrite the output of Drupal 8 Views fields. Your fields will show exactly in accordance with your wishes. It can be done with the built-in Views dashboard options, or with custom field formatters for more serious cases.

All you need is to contact our Drupal support and development team!

Jun 05 2019
Jun 05

Missed some of the blog posts we wrote in May? You can catch up on those you missed or revisit your favorite ones in this quick recap that we’ve prepared. We hope you enjoy!

Interview with Tim Lehnen: When you're trying to make a mark in the digital space, Drupal is your best choice

For the latest post in our Drupal Community Interviews series, we got a chance to talk to Tim Lehnen who has just finished with his position as the interim Executive Director of the Drupal Association, letting Heather Rocker assume the mantle. 

Tim believes Drupal has the potential to be used in any kind of ambitious digital experience, not just the web, but also trending new technologies such as VR and AR. This is also due to its leading position among omnichannel and decoupled solutions. Because of this, it will only continue to evolve and improve.

But our favorite part of the interview was probably what Tim remembers as one of the most notable moments within the Drupal community, when the Canadian company Evolving Web used their DrupalCon sponsorship time for a totally different purpose rather than for commercial promotion. Check out the whole interview to see what they did.

Read more

Optimizing Images with Drupal 8 Core Features

Next up, we have a post on optimizing images with the core features of Drupal 8, written by our developer Tjaša. Tjaša encountered the problem of having to optimize some images in Drupal and discovered that not much had been written on the subject. Staying true to the spirit of Drupal, she decided to share her solution with the community in a blog post that anyone can always have on hand. 

Out of the box, Drupal provides a great tool for optimizing images, called Image Styles. An image with the Scale image style assigned to it will load faster than one with no image styles, as the file size will be reduced; but this might also result in some loss of quality on a Retina display. For such screens, we should use an image style that’s twice as big as the first one.

We can achieve even faster loading times by adjusting the image quality. With the Responsive Images module, we can even fit the dimensions of an image to the specific screen type on which it’s served. For some additional optimization, we can also use lazy loading.

Read more

7 questions you're probably asking yourself when considering Open Social

The third post we wrote in May presents the Open Social Drupal distribution created by the GoalGorilla team. Open Social allows anyone to quickly and easily establish an online community, either with the paid SaaS version or the free open-source one. It offers a wide range of features, the usual as well as the more innovative ones, and a number of extensions for the SaaS option. 

The Open Social team provides a lot of helpful material for using it effectively, e.g. a blog section on community management and a free guide. As a user of the software, you even get a say in the project’s roadmap. 

A number of notable businesses are already using Open Social to empower people from the entire planet to collaborate, for example the UNDP (United Nations Development Programme). The project’s co-founder Taco Potze excellently sums up what Open Social is all about in a quote that we’ve included - you’ll have to go look at the whole post to see what he had to say!

Read more

Interview with our developer Peter, one of the release managers of PHP 7.4

Our final post from last month is another interview - but this time not a Drupal Community interview. Peter Kokot, one of our developers, is a release manager of PHP 7.4 which is coming next week, and he was able to take the time to answer a few questions regarding the role and the new release.

Having always been interested in computers and related stuff, he felt drawn to open source and discovered PHP very early on in his programming career. Apparently he was doing something right, since members of the community actually nominated him to be one of the two release managers

He presented the responsibilities of a PHP release manager, new features that we can expect in the new release (as well as a spoiler for next year’s 8.0 major release!) and some challenges of this release. He also gave us some insight into the RFC voting process of the PHP community. We suggest you go read the whole interview and learn about the upcoming release straight from the horse’s mouth.

Read more

These were all of our blog posts from May. Tune in again next month when we’ll be doing a similar overview of this month’s posts. Cheers!
 

Jun 04 2019
Jun 04

Join us Wednesday, October 2 through Saturday, October 5 at our new venue, The Hotel Shattuck! As always, we promise to deliver the most thought-provoking Drupal content in the Bay Area....we excited to be venturing "off the island" as well.

Another year, another exciting adventure, including:
Sparkling training
Mind-expanding presentations
Mind-altering sessions
Wonky contributions
Loopy socials
Summits galore

Join us as we unroll the 13th year of awesome Drupaliciousness!

Jun 04 2019
Jun 04

Historically, migrating your content management system (CMS) or content platform from one major version of Drupal to the next was nothing short of a Herculean task.

Every new version of Drupal meant rebuilding existing functionality, converting (or migrating) your content, and accepting significant changes along the way. Because of this, it’s become commonplace to see stakeholders want to leapfrog Drupal versions (e.g., 5 to 7, or 6 to 8), to extend the life of both their old and new platforms for as long as possible for the least amount of transitional pain.

Jun 04 2019
Jun 04

One of our recent projects required a progressive enhancement approach for visual changes. Instead of a full end-to-end rebuild of a Drupal theme, a progressive approach can be accomplished with theme switching. Many Drupal 8 projects leverage custom block types, Paragraphs, or Layout Builder to place one or more design components on a page. This provided the client with the ability to split up a larger architectural change into a small set of pages and components that can be gradually rolled out. Of note, such an approach can also serve as a viable solution for A/B testing of visual changes. 

Screenshot of a Drupal 8 layout before and after updates were made

Understanding Context

There are several solutions capable of providing theme switching. One key differentiator is context. Do you want to switch a theme by page, role, language, associated taxonomy, URL parameter, or authenticated/unauthenticated traffic? Context serves as a critical requirement for determining when a theme switches.

In our case, we progressively enhanced a theme page-by-page. We would work on one page, configure the theme to switch for that page, and continue to add pages as our work evolved. Solutions may vary based on the desired context. The rest of the blog post helps explore solutions for page-level context.

Background Research

I explored the following approaches to help solve the problem.

  1. Theme Key module: This is a very popular approach from Drupal 7 sites but did not appear to have a Drupal 8 release and this issue paints a murky future for any sort of use of the module.
  2. Style Switcher module: This offers a block for switching themes, sort of like CSS Zen Garden where you could select the look and feel. This wasn’t quite the context we needed.
  3. Switch Page Theme module: This was most effective for our use case. It allowed both page-level specificity and optionally allowed us to select the applicable roles. It also offered configuration, which was helpful for deploying progressive theme switching with theming changes.

Setting Up Switch Page Theme

It’s basic configuration. No programming is required. 

preview of theme switcher in drupal 8

The configuration page is fairly straightforward. Each rule is demonstrated by a row and can be ordered if there are rules that take precedence over others. The checkbox demonstrates how to enable or disable a rule as needed. Page paths are specified line-by-line per rule, followed by the selection of the displayed theme and the applied roles. 

After saving, going to the various paths should switch the theme as specified. And, don’t forget to export the configuration.

Conclusion

We were able to set up a new theme and gradually build out the various components with a theme switching approach. This allowed us to deploy changes over time instead of deploying an entirely new theme all at once. Switch Page Theme was an easy to use site building solution for us to specify the desired theme switching behaviors.  

Jun 03 2019
Jun 03
ReThink Orphanages

ReThink Orphanages is a courageous organization with a benevolent charge, grand ambition, a network of high-powered partners, and a commitment to make the world a better place. The organization is…

Visit Site Witness.orgWitness.org: Using Video to Document and Tell Stories

Witness.org is a Brooklyn-based non-profit that “…makes it possible for anyone, anywhere to use video and technology to protect and defend…

Visit Site NWETC

The Northwest Environmental Training Center (NWETC) is an organization that is committed to helping environmental protections improve their career opportunities. The organization focuses on two…

Visit Site Fred Hutchinson Cancer Research Center eagle-i IntegrationAbout Fred Hutchinson Cancer Research Center

Fred Hutchinson Cancer Research Center’s (FHCRC) Shared Resources core facilities support biomedical research by providing services and expertise that…

Visit Site University of Washington Center for Reinventing Public Education (CRPE)

We originally partnered with CRPE's in-house web manager in 2012. He was familiar with the content management aspect of Drupal, but needed a bit of support with the more intricate ways that Drupal…

Visit Site Seattle Humane Society

We began working with Seattle Humane Society in February of 2016. They had reached out to us because they needed some emergency help with their website. For some reason, their site was reverting…

Visit Site Middle East Policy Council

The Middle East Policy Council (MEPC) is a 501(c)(3) nonprofit organization founded in 1981 whose mission is to contribute to American understanding of the political, economic and cultural issues…

Visit Site American College for Healthcare Sciences (ACHS)

ACHS originally partnered with Freelock in August of 2011 to perform some easy wins on their site. We started with a Freelock Site Assessment and code review of their Drupal 6 website. After that…

Visit Site Peninsula College

Peninsula College reached out to us in 2012 for some emergency work related performance issues on their site and problems with their site crashing. Once we were able to jump in and diagnose, we…

Visit Site Appliance Standards Awareness Project - ASAP

Appliance Standards Awareness Project (ASAP) organizes and leads a broad-based coalition effort that works to advance, win and defend new appliance, equipment and lighting standards which deliver…

Visit Site Georgetown University Qatar

We were contacted by the Georgetown University team in Qatar in late November 2016 regarding several of their sites that were using the Drupal Domain Access module. They had several requirements…

Visit Site Seattle Children's Alliance

Another Drupal 8 site upgrade! In June of 2016 we were approached by Seattle’s Children’s Alliance for a Drupal 5 to Drupal 8 migration. Their main concern was that their Drupal 5 site modules…

Visit Site Fred Hutchinson Cancer Research Center – HANC

We started working with another team at Fred Hutch in early 2016. They contacted us after they were needing some local TLC with their HIV/AIDS Network Coordination global CRM database (…

Visit Site DIYZ.com

We were approached in late 2015 by a marketing/design agency to take over this project. Their Drupal developer was on her way out and they needed some Drupal expertise. The website was just in…

Visit Site Jim Ovia Foundation

We originally worked with the main Jim Ovia stakeholder on a separate project, when she worked with a different giving organization. She then reached out to us in September of 2015 to let us know…

Visit Site World Vision Knit for Kids

When the team at World Vision approached us in late 2015 to work on a few of their Drupal sites, they also had their Knit for Kids website that was in WordPress. They wanted to take that site and…

Visit Site Second Nature Sports

Second Nature Sports is owned and operated by the same folks over at Locker Soccer Academy, so when their previous developer was closing shop, it was just natural to have them roll this site into…

Visit Site Locker Soccer AcadamyLocker Soccer Academy

In December of 2013, our friends at Locker Soccer Academy reached out to us regarding their soccer academy sites, that were already developed by a shop in Colombus, Ohio. The development shop was…

Visit Site mEducation Alliance screenshotWorld Vision mEducation Alliance

The product owners of the mEducation Alliance website contacted us in September, 2015 to provide ongoing monthly Drupal security and module updates. The site is a partnership between…

Visit Site World Vision Chinese siteWorld Vision Chinese/Korean Websites

World Vision decided to partner with Freelock in September of 2015 for their Chinese and Korean websites. Headquartered in Federal Way, Washington – this was a perfect fit! We took…

Visit Site Queen City Yacht Club

Our friends at Queen City Yacht Club approached us in April of 2015 regarding their Drupal 5 website. It was at the end of life and they wanted to upgrade. Their motivations were that they wanted…

Visit Site National Center for Science Education

In June of 2015, our collegue recommended our Drupal maintenance services to the National Center for Science Education. Our colleague was looking forward to large project and just didn't have the…

Visit Site Snoqualmie Tribe

Snoqualmie Tribe contacted us in December of 2014 in desperate need to secure their website. It turns out, they were susceptible to the Drupalgeddon attack and needed the Drupal 7.34 core…

Visit Site Lease Crutcher Lewis

In December of 2013, we were contacted by Lease Crutcher Lewis to take over their hosting. Their site is a great contender for Drupal 8! They were also interested in our Drupal maintenance plan…

Visit Site Bonavita World

In early 2014, our friends at Bonavita came to Freelock requesting that we help manage their main website Espresso Supply. Soon thereafter, they wanted to launch a website for one of their brands…

Visit Site Washington Housing Alliance Action Fund

The Washington Low Income Housing Alliance Action Fund first talked to us about building a new site last October, but they were not ready to proceed. This summer they were finally ready, and used…

Visit Site Makah Community Portal About the Makah Tribe

The Makah Tribe is located in Neah Bay, Washington. They had a custom portal for the Makah Tribe and the Neah Bay Community. Their website is the hub for the community,…

Visit Site Max Dale's Steak and Chop House

Max Dale's Steak House is a popular restaurant a few dozen miles up the road in Mt. Vernon, Washington. If you're not from this state, you might have heard of Mt. Vernon when a major Interstate…

Visit Site IslandWood

About Islandwood

IslandWood is a nonprofit educational…

Visit Site Northwest Wall & Ceiling Bureau

Freelock built an informational website for the Northwest Wall & Ceiling Bureau (NWCB), an international trade organization for the wall and ceiling industry. We delivered a snappy…

Visit Site Totem Ocean

Freelock teamed up with Eben Design to build a new site for Totem Ocean Trailer Express, a shipping company that has two voyages between Tacoma and Anchorage each week. In addition to being a…

I-TECH

The International Training and Education Center for Health (I-TECH), a non-profit collaboration between the University of Washington and the University of California, San Francisco, came to…

Bellingham School District

For the Bellingham School District, Freelock put together a large, multi-faceted Drupal site for district-wide information and standardized sites for schools within the district containing…

Visit Site Olympic Peninsula Tourism Commission

The Olympic Peninsula Tourism Board came to us in early 2009 to assist them in developing a visually stunning and highly functional website in a Content Management System. The site needed to be…

Latitudes in Learning

Latitudes in Learning creates personalized learning experiences that engage people and organizations in meaningful interactions with the world. Learning is one of the most difficult activities in…

Visit Site World Class Hunting The Project

The owner of World Class Hunting approached Freelock to launch their website. They had worked with Drupal on a previous project, so they were familiar and enjoyed Drupal. The project…

Visit Site Joey Klein The Project

Joey Klein's team approached Freelock to "rescue" their website. Through the course of their planning stages, the original developers found that they had reached a point where they did…

Visit Site LedgerSMB Web Site

LedgerSMB is an open source accounting and financial package. Freelock has used LedgerSMB for its bookkeeping practically since the project began, forking an earlier open source project called…

Visit Site Hydra Content Management System

Freelock worked closely with Consumer Media Network to create a content management system (Hydra) through which they can track assignments and submissions. We implemented a custom workflow system…

Visit Site DanceSafe

DanceSafe is a non-profit, harm reduction organization promoting health and safety within the rave and nightclub community. Local chapters consist of young people from within the dance culture…

Visit Site Answers for Elders

Freelock developed an informational website for Answers for Elders. Answers for Elders is an online resource for adults caring for elderly parents. Branded as the "Boomers' Online Community to…

Visit Site Ge•cko About Geocko

Geocko builds powerful tools that save time and increase engagement for nonprofit organizations.  They simplify tasks, so organizations can stay forcused on running programs and…

Visit Site I-TECH Drupal 7 Upgrade About I-TECH

The International Training and Education Center for Health (I-TECH) is a center in the University of Washington's Department of Global Health.  I-TECH headquarters in Seattle with…

Visit Site Nightingale-Bamford School About Nightingale-Bamford School

The Nightingale-Bamford School is an independent all-female university-preparatory school founded in 1920.  With grades K-12, NBS is one of the top-ranked private…

Visit Site Lindbergh Gallery About Lindbergh Gallery

Lindbergh Gallery is Erik Lindbergh's venue for selling aerospace sculptures, furniture and other custom art pieces he creates.  Erik Lindberg is the grandson of Charles…

Visit Site RevEquip About RevEquip

The RevEquip team is composed of foodservice consultants experienced in Revit and the creation of foodservice documents.  Revit Families are developed to meet the standards…

Visit Site Nia Technique, Inc. About Nia Technique, Inc.

Nia is a sensory-based movement practice that draws from martial arts, dance arts and healing arts. Nia Technique Inc is built…

Visit Site Crossfit Games/PLY Interactive

In December 2011, Ply Interactive came to Freelock for assistance theming the Crossfit Games site, because of our Drupal expertise and the tight schedule for the project. This site was built from…

Visit Site Alaska Fishing Jobs Center

Scott Coughlin, a 24-season veteran of Alaska's salmon, herring and halibut fisheries, came to Freelock for help getting his site done. We picked up the pieces of the development project, yet…

Visit Site West Seattle Family Zone

The folks at WSFZ needed a directory-based website that was easy to maintain and easy to use. Catering to the families of this popular Seattle-area neighborhood, West Seattle, WSFZ wanted a clean…

Visit Site Cool Day Trips

Freelock was approached to build a website focused on the “Top 50” Day Trips from Seattle, based on rankings and reviews from users. Cooldaytrips.com includes a description of each destination,…

Visit Site Maltby Produce Markets, CSA

Our friends at Flower World came back to us for their latest project, Maltby Produce Markets CSA. Maltby Produce Markets grow a wide variety of fruits and vegetables in their fields, orchards,…

Visit Site Littlestar Prints

Littlestar Prints is one of our favorite sites. It combines some powerful drag-and-drop photo editing in the browser with e-commerce. We got to use both of our favorite software packages--Drupal…

Visit Site Organic Materials Research Institute (OMRI)

Another large scale project by Freelock Computing, the Organic Materials Research Institute tested our abilities to work with a variety of sources and the Drupal system. The project brought their…

Visit Site TerraBella Flowers - Organic Florist in Seattle

TerraBella Flowers & Mercantile specializes in European garden-style designs, using an assortment of local, organic, and sustainably grown flowers and is based in the Greenwood neighborhood…

Visit Site RadioFrame Networks

RadioFrame Networks came to Freelock in late 2008 for a web development project aimed at bringing their existing corporate static site content into the Joomla CMS. We worked with their existing…

WestSide Baby

WestSide Baby, in partnership with the Puget Sound community, provides essential items to local children in need by collecting and distributing diapers, clothing, toys and equipment. They partner…

Visit Site Booktrope

Booktrope's goal of getting online books to as many people as possible (for free!) was a project right up our alley, fitting nicely with our open source foundation.

From the beginning, we…

Visit Site Robinson Newspapers

Robinson Papers hired us to build a centrally-managed web site with different personalities for each of their papers but shared control. We built out a sophisticated system in Drupal, with…

Visit Site Riverview Community Church

Riverview originally came to Freelock to design and develop a website that would serve the needs of their rapidly growing church community. Originally a simple Joomla deployment, we have since…

Visit Site Phytec America

In early 2008, Phytec America brought Freelock on to maintain its Linux server systems and add an additional server. We configured a new server as an internal mail and file server, and converted…

Visit Site BlueView Technologies

BlueView Technologies initially hired us for Linux server administration in 2007. We have worked extensively with BlueView, expanding their IT infrastructure from one server which did everything…

Visit Site Running Wild Spirit Zen Cart

Running Wild Spirit is one of our earliest Zen Cart projects and has greatly contributed to the success and growth of their business. Based out of the small town of Maltby an hour and a half away…

Visit Site Seattle Jobs Scraper System

SeattleJobs.org hired Freelock to implement a system to scrape job listings from their customers' web sites. SeattleJobs.org lists jobs from about 45 member companies. In order for Seattle Jobs…

Visit Site Outdoor Research

Outdoor Research, an outdoor gear manufacturer, hired us to build their main public web site, along with a full administrative back end. We implemented a system that imports product data from…

Visit Site P5 Group Website

When P5 Group was looking to create a dynamic website, they looked to Freelock Computing to help. Using Drupal as a CMS platform, we created a site with multiple access levels for their wide…

Visit Site An XML-based Report Browser

One of Freelock, LLC's ongoing customers needed a web front-end for a proprietary reporting tool. This reporting tool could be configured to generate reports that ended up in Microsoft Excel.…

Custom Client Extranet

One of Freelock, LLC's ongoing customers needed a password-protected site that actually provided different content to different users, depending on the company or user group the user is part of…

Single-Source Help System

Over the course of creating help systems for multiple clients, Freelock, LLC developed a set of scripts that manage browse sequences, tables of contents, and cross-references for help systems.…

Jun 03 2019
Jun 03

By nature, menus are complicated. They’re not easy to work with, build or style, and yet they are probably the single most important navigation element of any website. Despite their complication, they need to be perfect to serve their purpose. A menu can make or break a website. They can make your browsing experience a pleasant one, or can drive you to leave a website frustrated and likely never to return.

When it comes to menus and forms, it is best to let Drupal dictate the direction rather than build them independently of Drupal. By adhering to Drupal’s best practices we can save a lot of time, effort and frustration. For example, rather than writing your menu’s markup before you see it being printed by Drupal, it is best to build your menu in Drupal and see what the markup looks like. Then you can use Drupal’s markup as a starting point for writing your menu’s markup. 

This is going to be a lengthy post (mostly because it includes a lot of code snippets), but this article will cover all you need to accomplish the following:

Build a multi-level menu component in Pattern Lab

Let’s start by building a pretty straight forward multi-level menu component in Pattern Lab. If you’ve used Pattern Lab or KSS Node you know most components require at least three files: 

  • .twig for the component markup and logic,
  • .yml or json for the component data or dummy content
  • .css or scss for the component styles
  • In some cases you may also need a Javascript file
     

For more in-depth explanation on building and integrating components read our blog series.  
Note: This series is over two years old and many things have changed since then, but the basics of building a component still apply.

Building the component

If the code above does not look familiar to you it’s probably because you’ve never used a Twig Macro. I will explain the macro in detail shortly, but for now let’s move on to completing the component.

  1. In your theme’s components location create a new directory called main-menu
  2. In the main-menu directory, create the following three files:
    • main-menu.twig
    • main-menu.yml
    • main-menu.scss
  3. Inside main-menu.yml add the code below:
  4. The data above represents an array of items. Each item has 3 key/value pairs: Title, URL and menu_level.  Each item represents a link in the menu.  You may notice some of the links have nested arrays (i.e. below). These represent submenus in the menu tree. The items array above is only intended to simulate the menu’s data for our component. In Drupal the array will be provided when we add menu links to Drupal’s Main Menu.
  5. Inside main-menu.twig add the code below:
  6. Finally add the following styles in main-menu.scss

These styles are as bare as possible. They are simply to make the menu look presentable and could use a lot of improvements. This is what the multi-level menu looks like:

multi-level menu

It’s important to note that the component will simply be used for styleguide purposes. We will create a similar component for Drupal, but we will use the original component above as a base for markup styles and behavior.

Why do we need to create a duplicate component for Drupal?

Drupal provides attributes Pattern Lab does not understand. Rather than over complicating the component, we are going to keep it simple for styleguide purposes while the Drupal version is more elaborate with all the things Drupal needs. This is not required but provides more clarity to the process.

Create a Twig template suggestion for the main menu

Our ultimate goal is to update Drupal’s menu system to render with similar markup as the main-menu component. This will require several steps which we will cover next.

Follow these steps to enable Twig Debugging in your theme. Then, you can inspect your site, which will allow you to see the various template suggestions that Drupal uses to render the page; including your navigation menu. The debug information looks like this:

Under File Name Suggestions notice two template names: menu.html.twig & main-menu.html.twig. The X next to menu.html.twig indicates Drupal is using this file to render the Main Menu. The second file, main-menu.html.twig, is what Drupal is suggesting we create if we only want to alter the Main Menu and not other menus.

Under Begin Output notice the path where menu.html.twig can be found, the example above is pointing to Drupal’s stable theme.

To ensure we only affect the main menu and not other menus on our site, we are going to make a copy of Drupal’s menu.html.twig in our theme and then override it. This is recommended rather than modifying Drupal core’s template. Let’s start:

  1. Copy the menu.html.twig template from core/themes/stable/templates/navigation/ into [site_root]/themes/custom/<your-theme>/templates/navigation/menu.html.twig (if these folders do not exist yet in your theme go ahead and create them).
    Following the golden rule “Never hack core”, we want to make a copy of Drupal’s menu template in our own theme. Replace the core theme’s name with your core base theme if you are not using stable.

  2. Next, In your theme rename the newly copied template to main-menu.html.twig.
    Copying menu.html.twig into our theme will affect other menus. This is why we are renaming the template so it only affects the main menu (main-menu.html.twig). Replace ‘main’ with whatever your menu’s machine name is if you are not using Drupal’s Main Menu. This can be found in Drupal’s Menus page (admin/structure/menus).

  3. After clearing Drupal’s cache, inspect the menu again and you should see the X next to main-menu.html.twig which means Drupal is now using our custom twig template suggestion to render the menu.

Create a multi-level menu in Drupal

  • Let’s make sure we have a menu we can see in Drupal. Let’s create a multi-level menu using the Main Navigation menu (Structure | Menus | Main Navigation).

  • Add as many links as you wish. Be sure to add nested items so we end up with a multi-level menu.

  • In addition, ensure each of the submenu’s parent links are set to “show expanded”. You will see the option on the Add/Edit Link page.

  • Finally, go to Structure | Block Layout and click Configure next to Main Navigation

Customize the template suggestion

Before we look at the code inside menu.html.twig as it may look confusing or not familiar, we are going to move it into the same directory as the main-menu component. We are doing this to make some improvements to the macro.

  1. In the same directory where you created the main-menu component, create a new file called _main-menu-macro.twig (notice the underscore as first character of file name). This file is only for Drupal purposes and we don’t need it to be shown in Pattern Lab. The underscore allows Pattern Lab to ignore it.

  2. Copy all the code from main-menu.html.twig into _main-menu-macro.twig.

The above code is a Twig Macro. Macros are the Twig version of functions. Just like you would write a function in PHP to do something and return something, you can use a Twig macro to generate some output.

Rendering menu with default macro

If we were to use the macro provided by Drupal as is our menu would render at its simplest form with minimum markup and almost no semantic css classes. See example:

The markup above may look different depending on your base menu. The classy base menu may show more markup but it does not make our job easier to style the menu.

Update Drupal’s menu macro to match our component’s markup

Not having the right markup for the menu, or any other element for that matter, can really complicate things for us when it’s time to style. We are going to modify the macro so it matches the markup of the main-menu component, and as a result the styles we wrote for the component will apply to the Drupal menu.

Menu Macro explained

Let’s step through this macro line by line to understand what it does. To keep things simple we are going to ignore all the custom classes we added above and focus on the macro itself.

  • Twig macros can be called from other twig templates; and it's also possible to place the macro within the same twig template from which you call it. The context is used in this case (line 21). So, with this import statement, we imported the macro and set it as a variable called menus.
  • Using the menus variable we then assign a name to it (main_menu), (line 23), which will take the following parameters: items, attributes, and 0). This name can be anything you wish.
  • Now we declare the macro again but this time with its new name, main_menu,( line 25), and pass the slightly modified parameters items, attributes, menu_level. We've changed the menu_level to a variable. If you are wondering where these parameters come from, the comments above the macro code in menu.html.twig provide all these variables.
  • Now that we’ve updated the arguments, we self import the macro again to make use of it (line 26).
  • Before writing any markup, we first check whether there are menu items to render (line 27).
    • If there are items in our main menu we start writing the markup. However, since we may have a multi-level menu, we want to make sure we identify the top level menu from nested (submenus), menus in the tree.  
    • This is where we first check if the menu_level is 0 (zero).
    • If it is the top level menu, we print a <ul> and we pass Drupal’s attributes in addition to our custom class.
    • If menu is not top level (submenus), then we simply print a <ul> with its corresponding class.

Learn more about Macros in Twig Templates.

Looping through the menu tree

Looping through the items array allows us to intersect each item and apply classes or attributes.

  • First we loop through the items array (line 33), and for each item, we print a <li> some classes which can be helpful if we need to style the different states of the menu.
  • For each link in a list item, we pass two things:
    • The node title
    • The node url
  • Inside the list item, we check to see if that particular item has other items or submenus.
  • When submenus exist, we make use of the macro again to repeat the process of printing the menu. This is where the macro saves us from writing duplicate code.
  • For each level of submenus we are increasing the menu_level by 1 and printing it as part of the submenu class. This is handy if we want to target a specific submenu in the tree.
  • Finally, we close all previously open actions/tags (i.e. for loops, if statements, lists, and macro).

RESOURCE: I recently ran into a blog post by Tamas Hajas where he has a great way to address classes and states on a menu. Check it out Drupal 8 Twig: add custom CSS classes to menus

Looking at the rendered menu after Macro improvements

Now that we have a better understanding on how the macro works, and after making the improvements discussed above, the markup for the menu would look something like this:

Integrate the Main Menu component with Drupal’s Menu

The last part of the process is to integrate all the work we’ve done with Drupal, so our Main Menu is rendered with the markup, styles and behavior we implemented when we built the component.  

  1. >In your editor, open [site_root]/themes/custom/<your-theme>/templates/navigation/main-menu.html.twig
  2. Delete all the content in the twig template except for the comments, and then paste the code below into it
{{ attach_library('your_theme/main-menu') }}
{% import '@patterns/main-menu/_main-menu-macro.twig' as menus %}
{{ menus.main_menu(items, attributes, 0) }}
  1. Clear Drupal’s cache
  2. Reload Drupal’s page

Since we moved the macro to the component’s location, all we need to do in the main-menu.html.twig template is to import the macro and provide the parameters the macro expects. These parameters can be found in the twig template’s comments.

If we did our job right, Drupal’s menu should now look and behave the same way as our component. In addition, if you inspect the Drupal page, the menu should reflect the same markup as the main-menu component.

IMPORTANT: If you are using the Main Navigation blog to position the navigation where you want it in the page, you may need to make a copy of the twig template for that block in order to assign the main-menu class the menu needs.  

Drupal Libraries

As a best practice, we should create a drupal library to attach any styles and javascript to our component. See this article for adding CSS and JS to a page or component.

In our case our library would look like this:

main-menu:
  css:
    component:
      dist/css/main-menu.css: {}

This library has already been attached above inside menu--main.html.twig

By doing this any styles we wrote for the component will apply to the main navigation when it’s rendered in Drupal. Drupal libraries have no effect in Pattern Lab.

After completing the steps above, clear your Drupal’s cache and reload your Drupal site. You should see your Drupal menu being rendered with all the styles and markup we wrote throughout this post.

In closing

I’d like to admit that I went about the long way to get the main menu working on both, Pattern Lab and Drupal. There are other ways to accomplish this by using contrib modules such as Simplify Menu (full disclosure, I helped create the module), and perhaps Twig Tweak among several others, however, the approach I took here gives you the most control and that can make all the difference if you are dealing with a pretty advanced or complicated menu.

Jun 03 2019
Jun 03

In the battle for insurance customer loyalty, the best customer experience wins. Equipped with a powerful content management system (CMS) like Drupal, insurance web teams are prepared for a competitive landscape crowded with fast-on-their-feet insurtech startups and looming giants of tech, Amazon and Google

The Drupal 7 Versus 8 Debate: A Team Approach 

Drupal 9 is coming. With the release just under a year away, the time is now for insurers’ teams to resolve their internal CMS debate — remain on Drupal 7 or upgrade to Drupal 8?

Bridging the customer experience gap is no small feat. However, insurance business leaders, marketers and developers are tackling the challenge head on. They comprise the team of experience builders with seats at the table for decisions like a CMS upgrade. To forward growth, their technology decisions are prioritized by data security and cost control. Also topping the list of evaluation criteria is a capacity for continuous improvement and swift speed to market of applications and functionality. Business leaders, marketers and developers bring unique approaches to achieve these common goals. In this article, we’ll evaluate Drupal 7 and Drupal 8 through the lens of these three stakeholders.

Current Drupal 7 sites have captured a glimpse of why Drupal is a fit for insurance, but the real power lies within Drupal 8. Of course, the decision to upgrade requires thoughtful consideration and planning. It’s a significant undertaking, particularly for large sites. However, factoring in the robust features of Drupal 8 with the appealing innovation forecast for Drupal 9—and the simple upgrade path connecting the two—insurers are likely to find that the advantages of upgrading far exceed the disadvantages. 

Drupal 7 Versus Drupal 8 for Business Leaders

Business leaders’ roles and responsibilities revolve around improving operating efficiency and cutting expenses. A flexible technology stack is crucial to stay competitive, perhaps even opening doors to collaborate with emerging insurtech startups. 

Focusing on the bottom line, insurance business leaders are understandably concerned with forecasting migration costs. 

Gaining a Competitive Edge 

With Drupal 8, insurers can gain a foothold to gain, and keep, a competitive edge in the market. 

  • Drupal 8 core offers many advantages, including improved performance and a better editorial and developer experience, to close the innovation loop.
  • To support the leap from Drupal 7, Drupal 8 now includes a built-in user interface to streamline migrations and offers more support for multilingual migrations.
  • More accessible web forms and other accessibility improvements in Drupal 8 serve to support legal compliance efforts and extend insurance offerings to the widest possible audience.

Benefits of Drupal 8 

business benefits of Drupal 8

Source: Mediacurrent

The many advancements in Drupal 8 core are reason enough to consider an upgrade, but contributed modules represent the best innovation in the Drupal ecosystem. The brilliant and globally spread Drupal community has shone a spotlight on Drupal 8. Drupal 7 simply hasn’t received the same level of enhancements and attention. Furthermore, passing on Drupal 8 now can also mean missing competitive advantages during the waiting time before Drupal 9. 

Looking ahead, moving to Drupal 8 now will make for an easier transition to Drupal 9. In the words of Frank Sinatra, “The best is yet to come...and won’t it be fine” (or should we say, nine?).   

Estimating Effort and Cost

Insurance business leaders are naturally concerned with total cost of ownership for their Drupal CMS. The migration roadmap is an important factor in that equation. 

Can you take your time to upgrade for Drupal 9? The answer is, technically, yes — but consider both migration and opportunity costs.  After clearing the jump from Drupal 7 to Drupal 8, expect future upgrades to Drupal 9 and onward will be significantly easier. 

Drupal 8 marked the beginning of a new continuous innovation model where advances in functionality are released rapidly on a six-month release cycle. Also, the Drupal 8 architecture is tuned so that a simplified upgrade path awaits to Drupal 9. This approach allows you to benefit from the innovation of Drupal 8 as Drupal 9 brews in the same codebase. 

Mediacurrent’s Drupal 9 Upgrade Guide can help prep your site for the move to Drupal 9. 

Drupal 7 Versus Drupal 8 for Marketers

Insurance marketers of all types, e.g., home, auto and life, view the customer experience as synonymous with digital experience. They have watched customer loyalty dwindle as the market has shifted online, where it’s never been easier to switch providers and shop online for quotes.

Earning Loyalty, Improving Customer Experience

Drupal 8’s appeal to marketers has grown significantly with major releases emphasizing ease of use and customer experience. Insurance organizations like MagMutual have embarked on the transition from Drupal 7 to Drupal 8 to better serve marketing teams:

Our Drupal platform allows our team to adapt to that very quickly to change marketing strategies as we continue to grow and evolve with our customer base.

Sallie Graves, CIO, MagMutual

Catch up on our CIO Interview with MagMutual to see how the organization is bringing new engagement strategies to life on an adaptable platform.

The key to forging deep customer loyalty lies in improving the customer experience from start to finish. In evaluating a CMS platform, marketers need a solution to tighten the reins on data so that it can be applied to the customer experience. 

For Guardian Insurance, Drupal 8 was a savvy place to land. Read Guardian’s Drupal 8 case study to see how they built a data-informed customer experience to win millennial insurance shoppers. 

Our Drupal 8 platform will serve as a foundation as we scale and enhance our web and mobile experiences for customers.

Peggy Maher, SVP, direct to consumer at Guardian Life Insurance 

Drupal 8 and Modern MarTech Stack 

Insurance marketers on Drupal 7 have most likely been with the same platform for a few years. If that rings true for you, consider the strategic doors that an upgrade can open. Think big about your website as a business tool. 

Consider questions like:

  • Does your conversion rate, bounce rate, site traffic and page load time indicate it’s time for a redesign?
  • Do you have a solution for customer journey mapping? Can you see what works, what doesn’t and, most importantly, why to engage prospective and current customers?
  • What usability improvements can help shape the customer experience?
  • Are there any areas of your digital presence lacking in personalization?

Drupal 8 is built for easy integration with your current and future marketing toolkit. Connect marketing automation, email service providers, CRM and more with Drupal 8 as the foundation for your digital experience ecosystem.

Drupal 7 Versus Drupal 8 for Developers

Security 

Developers in the insurance space are tasked with managing the security implications for mountains of personal data and sensitive information. 

We mentioned previously that the developer community has been laser focused on innovation in Drupal 8 —this also applies to security. Major security flaws are first found—and first fixed—in Drupal 8. If that’s not reason enough to contemplate a move to Drupal 8, consider also the security implications of Drupal 7’s impending end of life where core maintainers check out of security duty.  Beware— your site’s data could become vulnerable to hacking and other exploits. 

A study from 2018 found 63% of hacked sites running Drupal had outdated versions when breached.  

Ahead of the Curve 

The Internet of Things (IoT), which includes smart home devices and new telematics solutions, gives insurers a new opportunity to learn from customers to serve them better. Beyond just a website, insurers need to meet customers on their screen of choice. Whether it’s mobile, wearables or smart home devices, screen time is all the time. Drupal 8 core is built with the elasticity to accommodate customers’ devices of today and tomorrow. 

For more considerations from a site builder’s perspective, read 10 Reasons Why You Should Start Your New Project in Drupal 8 on the Acquia Developers blog. 

Conclusion

For insurance providers, digital transformation is where customer experience meets Drupal 8 technology. With a highly proactive community behind the screens, the Drupal project is paving the runway for next-generation customer experiences. 

Drupal 7 to Drupal 8 converts like the State of Georgia and Pegasystems are but two examples of large, complex sites that saw significant gains from their migration. Acquia and Mediacurrent have proudly supported these organizations on their Drupal journey. Watch their migration stories here

Master Your Drupal 8 Upgrade With a Trusted Partner

The final crucial consideration on the road to adopting Drupal 8 is choosing a migration partner. As a leader in Drupal development, strategy and design, Mediacurrent has partnered with high-profile clients ranging from large enterprise businesses to education. Together with Acquia, our talent, tools and processes ensure a smooth and successful migration. Partnering with us will help you establish the personalized digital experiences that capture customer loyalty — leveraging flexible open source technology and with the lock-tight security the industry requires.

Jun 03 2019
Jun 03

Fresh off the inaugural Flyover Camp, co-organizer Karl Kedrovsky talks organizing local user groups, what it means to give back to the community, and why some furniture is timeless.

You've done it once...you've done it one more time than most people, so you can absolutely give a talk or just share some knowledge on the subject.

Jun 03 2019
Jun 03

Astute marketers have stepped up to the concept of the Buyer’s Journey.  Taking the time to understand the full range of client personas and to gain empathy for the distinct phases that clients progress through as they explore and compare solutions, is now a key component of the marketing mix.

Let’s look at the potential for applying the concept of the Buyer’s Journey to a new leadership model that can serve as an essential resource for setting employees up for success.

First: a review of how understanding the Buyer's Journey is at the core of marketing effectiveness.

The exercise of mapping out the Buyer’s Journey produces insights that equip marketers to craft the right messages for the right media at the right time. The Buyer’s Journey also takes into account that not only do clients continue to have choices after the purchase, they now have a social media megaphone for broadcasting their experiences, and as such, there can be dire consequences for not continuing to pay attention after the purchase.  

While there are different models and different terminology to describe the Buyer’s Journey, the table below represents a snapshot of the distinct phases and the general types of marketing and messaging associated with optimizing impact within each. 

Buyer's Journey Snapshot

Phase Strategy Messaging/Media Awareness of need Focus on pain points / gain mindshare Industry-focused content that emphasizes empathy / Social media and sponsorships Consideration of solutions Education / help determine purchase criteria / Offer insight into what it’s like to work with you Emphasize scope and superiority of your offering / Content-rich blog posts, checklists, white papers, webinars, speaking engagements, case studies, trial offers Decision to purchase Validate decision Ease of implementation / training, support, webinars, user guides, community engagement Evaluation / advocacy Continuous added value Superior support, ongoing education and updates, closed Facebook groups, exclusive invitations, surveys, loyalty programs

 

Functional Model

Clearly, the days of the one-size-fits-all marketing campaign is a thing of the past. The bar has been raised and expectations are high for both messaging and solutions that are relevant to and resonate with clients’ specific needs. 

The concept of the Buyer’s Journey has gained traction because it makes sense and it works. It’s built upon genuine empathy and a sharpened focus on human centeredness in the design and delivery of both messaging campaigns and the solutions that they represent. 

Next Frontier: The Talent Journey

Imagine the impact if business leadership applied a similar model to the recruiting and retention of talent.  

Clearly, employees progress through distinct phases as they: 

  • Decide to search for a new job
  • Evaluate their options
  • Prepare for an interview
  • Participate in the interview process
  • Agree to join forces
  • Get onboarded
  • Become proficient in their new role
  • Evaluate the job and the company against initial expectations, 
  • Grow within the organization, and 
  • Evaluate future options.

Essentially these above phases fall within four basic categories:

  • Search
  • Sign on
  • Onboard
  • Empower

The following is a framework for the Talent Journey that mirrors the four phases of the Buyer’s Journey -- recognizing that this is simply a skeletal overview that needs to be refined and fleshed out to factor in the makeup of your team and the requirements of your company.

Talent Journey Snapshot

Phase Strategy Actions Search
Maximum positive exposure

Consistent social media posting, clear social media guidelines for current employees, presence at industry events, networking, incentive programs to encourage current employees to recruit to their sphere

Sign on Clarify expectations
Behavioral assessments that can be validated at the outset to help launch positive working relationships, detailed job descriptions and clarity concerning expected challenges, thorough information concerning benefits and company policies Onboard Set up for success

Frequent check-in along with a formal 30-day, 60-day, and 90-day program that sets goals and encourages issues and obstacles to be dealt with quickly

Empower Encourage stretch goals, remove obstacles, create a path for growth

Training, memberships in industry organizations, participation in industry events, open communication, employee surveys, 360 degree reviews, recognition programs

 

Talent Optimization

Leaders who adopt a Talent Journey mindset commit to paying attention and always being mindful of where team members are on the journey, within the framework of an intentional, empathetic model for connecting. As is true for the Buyer’s Journey, outcomes are optimized when there’s a recognition that different kinds of outreach are best suited for different phases of the journey.

Too often though, once talent has been hired and onboarded (insofar as such a process exists) they’re expected to merge with the culture, meet whatever demands come their way, and suck up any frustrations about the degree to which the actual job is out of alignment with their original expectations. 

To those who are thinking, “That’s too bad. This is business. The focus needs to be on innovation, attracting clients and maximizing profits--not coddling employees…” consider the cost of constant turnover, losing top talent to your competition, or frustrated employees operating at sub-par levels.

Talent Magnets = Great Leaders

A decade ago, when unemployment was teetering around 10 percent, leadership might have gotten away with more cavalier attitudes about cultivating talent. 

In the current economic climate, competing for talent is as critical of a success factor as competing for customers, and here’s the critical point: The competition is not won on the day that they agree to join forces. 

It’s no secret that turnover in tech is rampant. Talent knows their worth. They are mobile, well-connected, want top dollar for what they have to offer. According to Spicework’s recently published 2018 IT Career Outlook, more than one third of IT professionals in the United States are currently on the lookout for a new opportunity. Within your current team, can you accurately identify this 33 percent? Do you know who would be subject to being poached by a competitor if they got a better offer. Do you know who is frustrated and how that’s having an impact on their performance? 

Just as the Buyer’s Journey calls upon marketers to sharpen proficiency in multiple areas in order to optimize targeted effectiveness, the Talent Journey challenges leaders to be firing on all cylinders as they set talent up for success and help to remove obstacles for growth. The Talent Journey is both a model and a mindset that brings a richer dimension to our professional lives, deepening both relationships and the bottom line.

We’d love to hear from you! Do you view the Talent Journey as a workable model? What kinds of successes have you had in applying various components of it? Add your comments below or contact us today for a workshop on a leadership model that serves the specific needs of the talent journeys within your organization.
 

Jun 01 2019
Jun 01

AmyJune Hineline, Open Source Community Ambassador at Kanopi Studios joins Mike Anello to talk about her upcoming Contribution Tour 2019, as she visits numerous Drupal and WordPress events to help train new contributors.

Discussion

DrupalEasy News

Upcoming Events

Sponsors

  • Drupal Aid - Drupal support and maintenance services. Get unlimited support, monthly maintenance, and unlimited small jobs starting at $99/mo.
  • WebEnabled.com - devPanel.

Follow us on Twitter

Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

May 31 2019
May 31

For all its benefits, working remote— as most of our Mediacurrent team does— still has its challenges. 

The one that people ask me about the most is, "how do you keep any kind of work / life balance when your work and home are inseparable?" For me, the answer to this has been what I call my "shutdown ritual." It's basically just how I try to end my workday every day, but I've found putting some thought into a routine has helped a lot to make my evenings more relaxing and my mornings more productive.

In this post, I'm going to cover:

  • what a shutdown ritual is
  • the benefits  of having a shutdown ritual
  • my specific shutdown ritual

What is a shutdown ritual?

So first, what is a shutdown ritual?

A shutdown ritual is a set routine of actions that you perform at the end of each work day to finalize your day and signify that your work day is done.

I got this concept from an excellent book called Deep Work: Rules for Focused Success in a Distracted World, by Cal Newport. 

His core argument in the book is that the most valuable skill in our economy is deep focused work and that is becoming increasingly rare. If you want to set yourself apart, cultivating a deep work ethic is the way to go. He outlines several rules and guidelines you can follow to start cultivating this habit.

One of the tools he recommends is the shutdown ritual.

The bare outline of the shutdown routine that he outlines in Deep Work is:

  1. update all todo lists
  2. read over the todo lists in their entirety (reprioritizing items as necessary)
  3. review the calendar for the next two weeks, make sure any todos required for events are on the todo list
  4. write down a plan for the next day
  5. close everything on your computer
  6. say a magic phrase, like "Shutdown complete" or "I'm outta here"

Newport also discusses the shutdown ritual briefly on his blog: Drastically Reduce Stress with a Work Shutdown Ritual.

Why do a shutdown ritual?

One of Newport's biggest criticisms of modern workers is that we're always on, and because of this, our attention and energy is too dispersed. We can get notifications or just compulsively check Slack or email, even outside of work hours. But deep work requires disciplined attention and energy. If you want to do deep work during the day, you need to make sure you are not constantly doing shallow work (even off the clock). 

Benefit 1: A defined ending

One of the main benefits of the shutdown ritual is having a well-defined end of the workday. Once the shutdown ritual is done, work is done. Don't think about it. Don't worry about it. Don't check email. Don't look at Slack. If you want to be your most productive self, you need to take a complete break until the next work day.

Now it's time to do all the relaxing evening things like feeding your kids and washing the dishes.

When I tell people I work from home, a majority of them say something like, "You must feel like you're working all the time" or "How do you separate your work life from home life?" and I have certainly found it to be a bigger challenge to turn off at the end of the day since I don't really leave "the office." The shutdown ritual helps define the end of the workday and the beginning of being fully present at home.

It has helped me be more productive during the day and helped me have more focused attention with the family after work.

Benefit 2: Confidence in the ending

The important part about the steps in the shutdown routine is giving you confidence that everything you needed to do is done. 

If you're like me, you might be washing the dishes and still be debugging code in your head. Or you might suddenly remember an important email you were supposed to respond to and didn't. Or you might start thinking about a meeting on your schedule tomorrow that you're anxious about.

But the steps of your shutdown ritual should help you capture all these thoughts before you end your workday. You want to capture them and write them down somewhere, so they aren't floating around in your brain all night. 

Sometimes, you might be in the middle of your shutdown ritual and remember something that can't wait until tomorrow. That's fine, go ahead and do it and then start your shutdown ritual over.

Because once your shutdown ritual is over, and a work worry comes into your head, you want to be confident to say to yourself: 

I went through the shutdown ritual. I know that everything important has already been accounted for. Therefore, there is no need to worry.

And move on with your night.

Benefit 3: Having an anchor for other habits

The last benefit I'll mention is that having a shutdown ritual at the end of the day can be a helpful anchor for other habits.

If you have a well-established habit like a shutdown routine, you can leverage it to help establish other habits. James Clear calls this Habit stacking. The idea is that by pairing a new habit with one that already exists, you make it more likely to stick to a new habit.

Some examples of habit stacking with the shutdown ritual:

  • after my shutdown ritual, I will take 5 deep breaths and smile
  • after my shutdown ritual, I will put on my workout clothes and go to the gym
  • after my shutdown ritual, I will call a friend

A shutdown ritual can help you end your workday productively and launch a new habit or hobby to make the rest of your life even better as well!

My Shutdown Ritual

Here's what my shutdown ritual looks like. At 5:15pm everyday, I get a friendly message from slackbot to start my shutdown ritual. 

You can set a reminder in Slack like this:

/remind me to 

Time to start your shutdown ritual!

- reconcile timesheet
- check email for anything requiring urgent response
- add new / outstanding tasks to todo list
- check JIRA
- skim task lists
- check calendar for tomorrow
- make a rough plan for the next day

Shut down complete

every weekday at 5:15pm

For me, this is actually about 45 minutes before the end of my workday. I used to have the reminder for 15 minutes before I signed off, but I could never get to a stopping point and do the shutdown in 15 minutes. 45 minutes gives me enough time to start looking for an exit in my current work and to go through the routine.

Here is what is on my shutdown ritual list:

  • reconcile timesheet
  • check email for anything requiring urgent response
  • check JIRA
  • add new / outstanding tasks to todo list
  • skim task lists
  • check calendar for tomorrow
  • make a rough plan for the next day

Reconcile Timesheets

I take a look at my time tracking software and make sure all my time is accounted for.

Check Email

I go through my email inbox, responding to anything that is really urgent, and adding tasks to Todoist for anything that is not. My goal is to delete as many as possible.

Check JIRA

I open up JIRA to see what tasks are assigned to me, and add them to Todoist, if they aren't already there. I sometimes remember things I said I was going to do but didn't (like update a ticket or assign to someone else) so if I can quickly do that I will.

Skim Todo lists

This gives me a broad view of what's going on. Sometimes I notice a glaring error or remember something that completely slipped my mind, so I add that here. I also sometimes reorder things based on how priorities changed throughout the day.

Check Calendar

Next, I check my calendar for tomorrow. Do I have any meetings tomorrow that I have a deliverable for? Did I complete the deliverable? Any conflicts?

Make a rough plan for the next day

The last item on my list is making a rough plan for the next day. This really sets me up for success in the morning, and helps prevent a slow, groggy start to the work day. Sometimes I make my plan in Todoist just by setting due dates for todos for tomorrow and putting them in the order I want. Other times I have a simple text file where I make a list. It kind of depends on what projects I'm on and the kind of work I'm doing from week to week.

Shut down

I close all applications on my computer. I put the computer to sleep or shut it down. Sometimes I say "shutdown complete"

Sometimes here I tidy up my desk.

I start singing "It's a wonderful day in the neighborhood" and change into my house sweater and house shoes.

The work day is done. I'll be back tomorrow. 

And that's how I end my days productively with the shutdown ritual.

May 31 2019
May 31

An adapted Pride-themed Drupal Association logo

In June last year, we changed our Drupal Association logo on social media platforms to add a little color for Pride Month and I am really happy to say we will be doing the same again this year.

Since last year, we have introduced better tools for understanding the demographic groups in Drupal and I asked for a report on that. Quite rightly, I don’t have access myself - it is very much locked down. I was interested to see that, of those confirmed users who have filled something into the field (including “none” or “prefer not to answer”), 15.8% have indicated they identify as LGBTQIA. That’s far more than I expected!

We would love to continue to improve our statistics; we're asking everyone to complete the data in the demographics field, even if that is to click “none” - it’s a totally valid and useful response. Go to your user profile, click edit, and find it in the “Personal information” tab.

Finally, whilst the Drupal Association is an educational non-profit and does not advocate policy, I have been personally reminded this week of the extraordinary bravery, friendship, and sheer commitment to overcome challenges by people in the LGBTQIA community and I wanted to help celebrate that in any way we can.

You are strong and you are beautiful. Thank you for being you.

May 31 2019
May 31

How to create a custom Facets query for your Drupal 8 faceted search app

When it comes to allowing users to search a site easily, a faceted search app can be an unparalleled solution. Being able to quickly drill down into search results using specific, easy-to-understand parameters is something that most users now simply expect from any site’s search app.

For Drupal 8 sites, the Facets module makes it relatively simple to create your own faceted search app, whether you’re using the Drupal core Search module or the very popular Search API module to manage your search functionality.

In the case of a site using Search API, the Facets module works particularly well in parallel with more powerful search engine backends like Apache Solr and Elasticsearch. Facets within a search app can take all shapes and sizes, and the Facets module provides a few plugins types that, in concert with each other, can be leveraged to programmatically create any sort of facet you may need for your search app. Because the Facets module relies on the Entity API within Drupal 8, these plugins should appear relatively familiar to most Drupal 8 developers:

  • \Drupal\facets\Entity\Facet
    • Describes the facet entity itself, whose data is received via a widget plugin and parsed by processor plugins
  • \Drupal\facets\Entity\FacetSource
    • Describes the source of the data being fed into the facet
  • \Drupal\facets\QueryType\QueryTypePluginBase
    • Describes the type of query being made against the search backend.
  • \Drupal\facets\Widget\WidgetPluginBase
    • Describes the widget that the user interacts with to control the search UI.
  • \Drupal\facets\Processor\ProcessorPluginBase
    • Describes the processor that translates the user input from the widget into data that can be used within the query.

The Facets module (along with its submodule Facets Range Widget) provides 4 basic query types:

  • \Drupal\facets\Plugin\facets\query_type\SearchApiString
    • The most comment facet query type, based on searching for simple strings.
  • \Drupal\facets\Plugin\facets\query_type\SearchApiGranular
    • Used for numbers-based facets that provide a spectrum of values between a set step size.
  • \Drupal\facets\Plugin\facets\query_type\SearchApiRange
    • Used for queries that allow users to select a range of possible numerical values.
  • \Drupal\facets\Plugin\facets\query_type\SearchApiDate
    • Used for queries to allow users to choose (ranges of) date values.

NOTE: These query types are to be used within the context of a Search API backend, rather than the Drupal core Search module.

So how do we do it?

I’d like to offer a brief example of how you might go about writing your own custom query types for a faceted search app using the Search API and Facets modules.

In our recent scenario, we needed a way to allow users to query against our search backend using numerical values, but in the format of comparing their chosen number value against searchable values using a specific comparison operator. In this case, our users were students who needed to be able to search for specific academic or volunteer programs. They also needed to be able to filter results based on a length of time (in weeks) that would be greater than or less than a specified value.or example, users would need a facet that allowed them to filter results by: any length of time, 1+ weeks, 2+ weeks, 3+ weeks, etc.

With this requirement in mind, the 4 basic query types listed above were not quite up to the task. Instead, we needed to write a custom "Integer Comparison" query type that would take in two key pieces of data. A number to compare values against and a comparison operator with which to make those comparisons. From our example use case above, we only needed the number from the user, because we would be setting the comparison operator (“>=“ AKA “greater than or equal to”) in configuration. However, we wanted to write a generic enough query type that could allow for any basic comparison operator in the future. This is the result:

In the code above, the two key pieces of data (the user-input number and the configuration-defined comparison operator) are $value['int’] and $value['op’]. However, in order to get these two simple values, we also needed to write a custom processor that could receive the raw input in from our facet widget and process that input into those two simple $value['int’] and $value['op'] values.

To understand what’s happening in the preQuery method above, you just need to know that the slider widget we implemented on the frontend had its possible data values encoded in a format like this:

Finally, in the code above, you’ll notice the one method getQueryType(), which is needed to specify which query type the processor should pass its data along to (in this case, our custom integer_comparison query type). In order to make our new query type plugin and processor plugin aware of each other, we need to implement one last hook in our module:

Contributed Customization

We're always looking for ways to customize integrations to fit the specific needs of project goals and we understand that out of the box solutions aren't always going to work. For example, the Facets module itself provides a submodule called Facets Range Widget that allows users to search using a range of numbers or dates. However, the default behavior of this facet assumed the use of a bounded range, as opposed to what we needed, which was an infinite range starting from a definite value. In that case, it was simpler for us to quickly create the exact facet query type that we needed, rather than wrestling with the defaults provided by the Facets module. We were only able to do that thanks to the Facets module’s highly extensible plugin system that leverages the contributed Search API and core Entity API of the Drupal ecosystem. That is why, even when we have a need for custom code, it is always a helpful first step to start from the strong contributed code provided by the Drupal community.

May 31 2019
May 31

Drupal is a great choice for media websites. This is due to easy content editing, flexible moderation workflows, advanced media handling, and much more.

And, of course, media and news websites on Drupal can enjoy unlimited content display options for. Today, we would like to show you one of them that we implemented for our customer’s Drupal website — so-called featured news collections, aka grouped news.

According to this Drupal setup, news on the same topic are grouped together in ways that provide a high level of usability for readers. More details are coming next.

Featured news collections as opposed to standard Drupal setup

Let’s see what makes the grouped news functionality special for news websites on Drupal, and how it differs from the standard Drupal setup:

  • Standard news are represented by Drupal nodes — one node per item. When you open a Drupal node, you see it in full view. When you open another Drupal node — you see another one. They can be grouped together by topic or category if they are tagged with the same taxonomy term. Still, all of them will be opened one by one.
  • On the contrary, featured news collections include multiple news on the same topic. When something happens in the world, they allow the reader to see the situation from all angles, or its step-by-step progress shown by new updates. The display offers a full view of all news items, which is very handy to read.

Featured news collection VS standard Drupal newsThe features of this news setup in more detail

Individual URLs for news items

We provided each featured news page has a general URL that the reader sees in the browser. However, each news item also has an individual direct link. When it is used, the page smoothly scrolls directly to the place where the particular item begins (due to jQuery Animate plugin).

The URL in the browser is also updated to the URL of the particular item. The URL change is achieved through the replaceState() method of the HTML5 History API, which allows developers to change the URL without the full page refresh.

These individual URLs are added to RSS feed and to the sitemap. Each of them also has social share buttons.

When shared, all pieces of news have individual meta tags. When someone follows their individual shared links, the page will smoothly scroll exactly to the place where each of them begins.

social media icons

Individual URLs and SEO

Every SEO expert knows that the same content available at different URls is a bad idea for Drupal sites or any others. We solved this by providing custom functionality that tells search engines to index the featured news collection only. The separate pieces of news will not be indexed or displayed in search results.

Navigation through the page

So the page with featured news has two blocks:

1) the block with news items in full view

If the block with news items has many of them, they will be divided into pages using the pager functionality.

2) the list of titles to navigate between all news items

What happens when a user clicks on a certain news item title in the navigation block?

  • If the item is found on the currently displayed page, the page smoothly scrolls to it and the URL is replaced, as we described above.
  • If it is not found on that page, we query the page that has it, using AJAX. Thanks to AJAX, the page with the full node view is loaded without page refresh. We calculate the position of the news item from the top of the page and animate scroll to it.

Featured news collection — navigation through the pageDesign for mobiles and tablets

News websites on Drupal should be convenient to access from any device. So, for mobiles and tablets, we provided the styling of the navigation block as a fixed floating block that becomes available upon clicks on the floating icon.

Enjoy interesting options for news websites on Drupal!

This was just a simple example of content display options for news websites on Drupal. Anything else is possible exactly in accordance with your ideas. In addition to AJAX for real-time updates, it’s possible to use frameworks like React, Vue, Angular, and so on.

Contact our Drupal team to discuss your news display functionality!

May 31 2019
May 31

Mediacurrent's Rain Install Profile logo

Mediacurrent created the Rain Install Profile to build fast, consistent Drupal websites and improve the editorial experience. Rain expedites website creation, configuration, and deployment.

The Mediacurrent development team is pleased to announce some new updates to the Rain distribution in version 3.0. We have now made Drupal project template easier to use and maintain by splitting Rain content features (all of which are optional) from the main “base” package. This allows developers flexibility in which features they use while still pre-configuring modules that jump-start development.

There are some key changes that we will highlight here:

  1. The Rain package has now been split and renamed to mediacurrent/rain and mediacurrent/rain_features respectively. The latter repository now contains all the optional content features and their dependencies while the base package pre-configures the base installation.
  2. An UPDATE doc has been added to the Rain repository which explains in detail how to update from the 2x branch to 3x. This document will be kept up to date with any future changes that require manual changes or explanation.
  3. A few new dependencies have been added while several less frequently used dependencies have been removed. The UPDATE doc gives further details on what was added or removed and how to upgrade.

Note that the Drupal-project template is only used for provisioning new projects. Any project that currently uses the 2x version of the Rain distribution will not break or be forced to update. Updates to 2x will continue through to Drupal core 8.8 but then be sunset in favor of the 3x branch. Overall the process of updating from 2x to 3x should be relatively painless. 

If you experience any problems updating please file an issue in the official Rain project queue on Drupal.org: https://www.drupal.org/project/rain.

Installing Rain 3.0

To install the Rain distribution, we recommend you leverage our Drupal project template which includes a VM and Guardr security along with the Rain install profile and other tools.

Our recent article entitled “Drupal 8 Rain & GatsbyJS Integration” covered how to install Rain using the project template so we will recap the first step here which remains the same in version 3.0. 

First you will want to create a repository wherever you typically host your Git projects (i.e. Github, Bitbucket or Gitlab). Once you have that setup you can clone Mediacurrent’s repo and point the origin back to your Git repo.

Example:

git remote set-url origin [email protected]:mediacurrent/shortcode_project.git

Next, you will want to initialize the project. You can do that by running the following commands with your local host name and IP.

Example:

composer install

composer drupal-scaffold

./scripts/hobson project:init example.mcdev 192.168.50.4

Finally, to build the project and run the install you can simply run “./scripts/build.sh” which runs composer install as well as the Drupal install. Note that the project README has more detailed instructions but this will give you an idea how to get up and running quickly.

Video Tutorial for Installing Rain

[embedded content]

Related Resources

[Webinar Recording] Rain + GatsbyJS: Fast-Tracking to Drupal 8

May 31 2019
May 31

Open source communities are more about sharing ultimate value rather than just building something. They love to contribute and impact people all across the globe. Open source culture is more than just reusing free code on GitHub to get products to market faster.

The open source culture embraces an approach to software development which totally lays emphasis on all round collaboration and helpful nature, the teams tend to focus more on increased competencies instead of core infrastructure and cross channel implementation.  The culture embraces an approach to software development that emphasises internal and external collaboration, an increasing focus on core competencies instead of core infrastructure, and implementation of DevOps processes commonly associated with microservices and cloud native technologies. 

What are the key traits of an open source community and culture?

A responsibility to contribute 

Open source involves a broad range of technologies and a diverse set of people who bring some or the other expertise to the table. Often people are more inclined towards contributing the best of their individual abilities. They feel the responsibility to contribute and make sure they are often involved in the betterment of multiple projects and are they are often people are members of multiple projects, involving a broad range of technologies. Frequently, member recognition isn’t set by how much they’re paid or what titles they’re called. It’s how much of a headache is solved or endured for others. 

 All round responsibility and accountability

Accountability between members begins when they know each other as people and professionals. It’s especially important to have consistent written contact, ad hoc and scheduled video conferencing, and meeting in person at least once a year to build personal bonds.

Seamless and undeterred Collaboration

Collaboration for an open source organisation culture stretches across multiple areas. Well into domains like organisation goals, cultural fit, and more.

Team members who define together what a cultural fit is demonstrates what's important to the organisation. Just as, a united group of passionate hackers and designers who take part in the joys of community sharing, they want to hire those having like interests and similar ideals.

More inclination towards automation

Automating tasks within an organisational culture is about respecting people’s effort while not wanting them to be distracted from getting the right thing done when needed. 

Organisational members focus ultimately should be on what’s important to them and, in turn, the organisation.

Consistency in everything 

The consistency of people, processes, and management thereof is the glue of an open source organisation culture. Without consistency of action, principles and guidelines flounder despite the best of intentions.

Streamlined Processes

It's extremely hard work to develop fundamentals when shortcuts and hacks so often seem to provide great short-term benefits. However, consistency is the key to positive long-term results.  

For example; there needs to be a detailed and consistent process in hiring for fit, not skills, and for the long-term. Beyond these two key criteria, the candidates should also be demonstrably capable, driven, and passionate for the role to be filled.  

An underlying passion 

The underlying spirit to do good work is hard to find, it comes to you upon due search. And it is more powerful than any other driving force in the professional landscape. You will strive harder and harder for the things which mean something to you and the Drupal community makes you feel connected to their growth, you grow as they grow, which ultimately helps you feel the need to deliver sheer excellence. 

Shared Responsibility

At an organisation, culture becomes the way you work. Through culture, there’s a shared responsibility for good communication and positive results. In communicating with clients and one another, it needs to be timely, considerate, and accurate. 

Drupal: For great community and culture

Drupal has a predefined set of values and principles

Drupal, since its inception was built around a foundational set of values and principles. The agenda was to gather a community of like minded individuals and bring them on the same page about the vision and mission of the product and its roadmap.

Drupal values and principles Source: Dries Buytaert’s Blog 

Drupal’s code of conduct and CWG 

Drupal community's Community Working Group comprises of independent volunteers who strive hard to protect and promote the health of the entire Drupal community, they also help and maintain and keep on track the Drupal Code of Conduct and also act as the escalation body to help mediate conflict between community members. 

What should make you want to contribute to Drupal?

Can you imagine hundreds of thousands of people relying on your code or waiting to get some feedback from you? Their business’s growth is dependent on the advancements you make in your contribution. The more you contribute the better your worth and stance in the community, what is better than people believing, listening and relying on you for some advancements in the community? 

Final word 

Open Source is here to stay and develop software that has a huge impact upon individuals and businesses. People continue to make efforts because of their underlying passion for building great things and open source communities are an example of that. 

May 31 2019
May 31

Open source software has been receiving some serious criticism and some serious applauds from the tech community all across the world. People beg to differ on a lot of ideas about it, it has led to some serious publicity over these years. But hold on a second, with publicity comes myth and with myth comes some serious thoughts and people get mislead. Which at the end of the day hampers people’s thought process. Some think source software is totally free to use and some question its security quotient.

Open source technology has made it nearly possible to do so much in literally no time.

Let’s get into some myths about open source technology about back them with actual facts.

Myth #1: Open Source is free

Many people get more inclined towards open source software because they are misled into thinking that open source software is free to use and there will be hardly any software run costs in the future. On the correct note, this is not true, open source means open source code and that you can easily  access the source code of any system if you are enrolled in any given community.

To break it into a more understandable concept:

An Open Source Content Management System vendor can charge you for the services being provided around the open source software, And by far there is no link between the software license and the what you have to pay to get out of it.

Take Drupal for example, it's free to download and use for personal purposes but the advancements have gone so far that you will need to seek expert services for utilising the software to it's very best potential.

What's the free part?

You are free to access the source code behind the functionality and alter it for your own use case but provided that you abide by the terms and conditions in the license agreement.

Myth #2 - All open source software is Linux based

This myth is one of the most common and it’s fair enough for people to believe, especially when they are new to the open source landscape or just starting off their careers. When OSS came into the picture, this was the most commonly When people mentioned OSS, the quick and common assumption about it is that OSS only runs on the Linux operating system. It is a quick and easy assumption to make as many open source programs are made with Linux availability as a prime motivator.

MYTH #3: Contribution to OpenSource is only for startups

In the government sector, open source contribution is strong and they have the deploy teams to be able to handle and make the best use out of the open source software. Hence they end up making more and more contributions in the process.

On the other hand, the developers in the public sector do contribute to the code base but they have to expect some benefit out of it, either in the financial aspects or on the career trajectory aspect.  Some state and federal agencies like code.ca.gov and code.gov are using code sharing and collaboration to help the government in cutting down the duplicacy costs.

Drupal as an open source software is great for giving startups a heads up for showcasing their expertise and content. On the other hand, it is also one of the best solutions when it comes to enterprise requirements. You can custom build your content management systems which serve for a large scale content repository.

Myth 4 : OSS is less secure than proprietary software

So, is open source software inherently more secure? Of course not. Before going for any open source solution, you should look into its security thoroughly.

You can always review its version history and the frequency of security updates provided by the supporting community, you should also look for the amount of work being poured into its security segment and what is the word of mouth like?

Maybe you’ll even find an independent agency vouching for a product’s security, or certificates proving its reliability, or a respected colleague who can assure you that it's the best option on the market.

Additionally, you can see what tools your competitors, partners, and established companies in the industry are using. For instance, Ruby on Rails is used by 500px and Airbnb, and that alone is a great indicator that this framework is reliable enough for startups.

Drupal is considered one of the most secure content management systems across the world. Why? Because of its dedicated security team and the frequent security releases which make the system more and more robust over time.

Myth 5 - OSS is not scalable

Open source software is never designed to fit in everyone's shoe, the entire agenda of open source software is to make sure people can make it fit in their shoes with the help of respective expertise and their organisational requirements.

Take Drupal for example, It is designed to be scalable and adaptable in comparison to its commercial competitors. It is supposed to be evolved by the community and hence meet enterprise expectations. Developers have been able to adapt projects to small  and enterprise size requirements.

Myth 6 - Open Source is not maintainable

It is a strong assumption that open source software is harder to maintain and it can lead to possible confusion among the user crowd. There is always a sense of responsibility and motivation to improve the code and better the software overall, not for monetary gain, not for any gain other than a feeling of social responsibility.

Open Source softwares generally track all the upgrades, improvements and maintenance measures using paid tools to help maintain a record of the versioning and who was the code contributed by. See? The community has already got the maintenance concern or issue covered before it even gets started.

One more strong foothold about open source is that it can be managed and the work can be overtaken by other technology service providers, in case your technical team decides to move on. So, you should now be sold on the idea that open source is maintained like a premier software.

Myth 7 - OSS doesn’t have a support system in place

Since there is no one to hold accountable openly, people think open source software is less cared about or not supported so well in the industry.

But things are the absolute opposite, the amount of care and support put in by the community support teams is enthralling and it can completely change your mindset about it. Companies which run on the software bring in their brightest minds to help provide support for their software so that they don't get shut down at the end of the day due to lack of sincerity in support and care.

Final word

There might be a ton of myths and rumors circulating within and outside the communities but one should always think and work this out before making any harsh assumptions. Myths often keep us from adopting or trying out a technology and this has to come to an end sooner or later because the technology and the community speak for themselves.

May 31 2019
May 31

With Drupal 9 on the verge of release in June 2020, the Drupal community has about 18 months to map out a transition plan. The latest versions of Drupal in recent times saw a major breakthrough from the past versions. As the philosophy of development has changed, Drupal 9 is said to be built in Drupal 8 and the migration will be super easy this time.

Released in 2011, Dries announced the end-of-life (EOL) for Drupal 7 to be due in November 2021 after serving for more than 8 years. However, many people are still on Drupal 7 given the compatibility issues in the two versions which caused major disruption and migration became a task for developers. However, the new philosophy makes it easier to plan and anticipate any unforeseen obstacles that you may encounter. Are you prepared for it?

Planning for Drupal 9?

Launching with the objective to modernise the dependencies such as Twigs and Symfony and to remove support of deprecated APIs, Drupal 9 is making its way into the Drupal community soon.

Every new information being released about the update and new features is gearing us up for the big leap. The first and foremost action to be taken in consideration is to plan and upgrade no later than the summer of 2019. Experts believe, as long as your modules are updated with minor releases like Drupal 8.7 and the upcoming Drupal 8.9 in December 2019, there won’t be much to worry during the main release of Drupal 9. Being upto date with Drupal 8 is a crucial step for adaptability and easier usability in the future.  

Dries Buytaert wrote recently in a blog:

‘’Instead of working on Drupal 9 in a separate codebase, we are building Drupal 9 in Drupal 8. This means that we are adding new functionality as backwards-compatible code and experimental features. Once the code becomes stable, we deprecate any old functionality.’’
Timeline of Drupal versions

What’s New in Drupal 9?

With a lot of buzz around the new features to be delivered, let’s understand few important reasons for the strategic release of Drupal 9:

  • The innovative model of Drupal 8 had new releases every six months which led to adding of new features and enabling improved ways of problem solving. However, Drupal 9 will deprecate the codes which are needed for backward compatibility. In the process, it will provide an opportunity to remove the codes and anything else that is no longer needed.
  • As of now, Drupal needs to adhere to the vendor support life cycles and integrates with common PHP projects like Twig and Symfony. But the third-party dependencies will reduce with Drupal 9 and we’ll have supported versions of software for a long time such as Twig 2 and Symfony 4/5.

Why upgrade Drupal 8 when Drupal 9 is coming?

Drupal 9 is not being built on a new core and its functionalities will not look alien to Drupal 8 users. Instead, they will be added to D8 as backward-compatible code. Only with time and familiarity, as the new features will hold a stable position and mark their success, the older counterparts will be deprecated. As a result, D9 will be stripped of all deprecated code and only the complete collection of stable features will be termed as Drupal 9.

For example, in Drupal 8.0.0, the Drupal::l($text, $url) was deprecated. Instead of using \Drupal::l(), you can use Link::fromTextAndUrl($text, $url). The \Drupal::l() function was marked for removal as part of some clean-up work.

What does it Mean…

With no new paradigms of development and yet being a big leap, how will Drupal 9 change the workings?

For Core Contributors:

Your tasks will get limited in Drupal 9 even before the release. Making the quality robust and release more predictable, new features will remove deprecated functionality and lead to Drupal's dependencies to a minimum.    

For contributed module authors

Similarly, authors can also start working on the compatibility issues before the release as their Drupal 8 know-how will still remains relevant in Drupal 9 with no dramatic changes in the core.

For Drupal site owners

The release of Drupal 9 will make the upgradation much easier for site owners. It will be the same as Drupal 8, only with its deprecated codes removed. According to the experts, keeping your modules and themes stay up-to-date with the latest Drupal 8 APIs will do and a 12- to 18-month upgrade period will be sufficient.

What happens to module, profile and theme maintainers?

Though existing Drupal 8 sites have a year and a half to upgrade to Drupal 9, the technology in Drupal 9 would be already battle-tested in Drupal 8. The set of tasks for module and theme maintainers involve getting updated with the new and better APIs. It would be a mandate to check if your code is compatible with Drupal 9 as it may hold invalid when sites migrate. However, do not wait till the release of Drupal 8.8 which is expected at the end of 2019. As six months will be a limited time to upgrade to Drupal 9 for complex codes, it’s advisable to start assessing now.

How to Prepare for Drupal 9

The big catch in this whole drill of migration is to make sure that you no longer use the deprecated codes. Following are few ways suggested by Acquia:

  • Be updated with Drupal 8 features and modules
  • Create a report for deprecation using Drupal Check.
  • Check for your active modules which might be deprecated at api.drupal.org
  • Address a consolidated list of errors that can occur and need upgradation to Drupal 9 by generating a ‘’readiness assessment’’.
  • Use the latest versions of dependencies in line with Drupal 9.
Drupal 9 loading

Wrapping it up

As Drupal 9 will emerge as a phoenix from the ashes of Drupal 8, Buytaert sums it up best, “The big deal about Drupal 9 is that…it should not be a big deal.”

Excited? Have questions about how Drupal 9 will impact your site? Want to chalk out a plan for upgradation? We are here to help. Drop a line to our experts at [email protected].

May 31 2019
May 31

Usain Bolt, in his last appearance at the World Track and Field Championships in 2017, stood third by a narrow defeat in the 100m race leaving behind a yawning gulf. Bolt finished the race just a hundredth of a second later than his fellow competitors.

Every (nano)second counts!

Four sprinters crossing the finishing line with crowd cheering them on in the background


Such is the importance of speed that even a three-time Olympic gold medallist, Usain Bolt, had to bear the brunt of those nanoseconds. Someone might ask “How do I get started learning about web performance?”

Visualise that it is the Mega Book Sale Day and the bookworms are thronging the best performing online stores that are selling the books of renowned authors. Coping with such a colossal turn-up, a site with much faster page load speed would be preferred over the ones that are a bit sluggish. Drupal offers a superb platform for an effective website performance optimisation thereby making it faster and user-friendly.

The Significance of Website Performance Optimisation

Web performance optimisation involves monitoring the performance of web application analysing and assessing it, and identifying the best practices to improve it.

Web applications are a combination of server-side and client-side code. To improve the web performance, both the sides need to be optimised.

The client-side optimisation relates to the initial page load time, JavaScript that runs in the browser, downloading all of the resources etc. that are seen in the web browser.

The server-side optimisation relates to database queries and other application dependencies to check how long it takes to run on the server for executing requests.

Performance optimisation is significant because of the following factors:

User retention

BBC found that they are losing out of 10% of users for every extra second their website took to load. Also, DoubleClick by Google found that if the web page took more than 3 seconds to load, 53% of mobile site visitors tend to abandon the page.

Infographic showing statistics on the importance of performance optimisation for improving user retention

 

We all strive to make our users engage in a meaningful interaction with what we have built for the web.

So, if it is an online store, you would like to see a prospective audience turning into buyers. Or if it is a social networking web application, you would want your online visitors to get ensconced in an arresting interaction with one another. High performing sites play a vital role in engaging and retaining users.

An increase in user retention by 5% can result in increased profits by up to 95%.

It costs 5 to 25 times more to attract new customers. So, even a 5% enhancement in customer retention can lead to increased profits of 25%-95%.

By redesigning their web pages, Pinterest combated a 40% reduction in perceived wait times and witnessed a 15% increase in their search engine traffic and sign-ups.

COOK, a provider of high-quality frozen meals, was able to address the average page load time and cut it down by 850 milliseconds which resulted in 7% in conversions, 10% increase in pages per session and 7% decrease in bounce rate.

Improved Conversions

User retention ultimately leads to better conversion rates. Slow sites can have huge repercussions on the business revenues. Better performance of sites can be highly profitable to shore up revenues.

Graphical representation depicting conversion rate and bounce rate with respect to page load timeSource: Hubspot

According to 2016 Q2 Mobile Insights Report by Mobify, 1.11% increase in session-based conversion was seen for every 100ms decrease in homepage load speed. Moreover, a 1.55% increase in session-based conversion was noticed for every 100ms decrease in checkout page load time. The outcome was an increase in the average annual revenue by approximately $530,000.

Also, AutoAnything revved up their sales by 12-13% after decreasing their page load time by half.

User experience

When sites ship tons of code, underwhelming performance persists as the browsers chew through megabytes of it on snail-paced networks. 

Infographic showing statistics on importance of web user experienceSource: Impactbnd

Even the devices with limited processing power and memory can find it hard to cope up with the modest amount of unoptimised code. With poor performance taking centre stage, application responsiveness and availability diminishes.

Better optimised code lead to high functioning and better-performing sites which in return alleviate the digital user experience.

Strategising the web performance

Formulation of strategies to improve web performance can be done in two ways:

Bottom-up strategy

Also known as performance-by-design, the bottom-up strategy is the preferred approach to integrate performance as a core development principle. In this strategy, the performance optimisation principles are framed, applied and maintained. This is done right from the application design phase. 

The key stages that are involved in this approach are stated below:

  • Performance principles are laid out.
  • The key pages/transactions are identified, optimised accordingly, and then performance principles are executed.
  • Performance SLAs (Service Level Agreement) are monitored and maintained.

Here's a chart by Infosys which explains it best: 

Illustration showing the key stages involved in bottom-up strategy for improving the web performanceKey stages involved in bottom-up strategy

Top-down strategy

If an existing application needs to be optimised for performance, top-down strategy comes into play. This is a preferred option only when the legacy applications are being optimised for high performance. Also, this is not cost effective and the optimisation options are limited.

Steps involved in this strategy are as follows:

  1. Factors that are contributing to the page performance are assessed using tools like PageSpeed Insights, WebPageTest etc.
  2. Activities that would lead to maximum performance improvements are optimised.
  3. Other optimisations with subsequent releases are iteratively implemented.

In addition to these strategies, one must consider an important methodology called ‘Performance Budgeting’. It means setting a performance threshold that you aim to stay within. You can safeguard your site speed and detect any regression in the performance by setting up a performance budget to ensure continual eye on performance.

This is how we do it!

Expected load time and Google page speed score, as shown below, is the core of our perpetual and iterative development process.

Illustration showing the key processes involved in the performance budgeting methodology 

The above chart shows that, while applying performance budgeting methodology, we take note of:

  1. Average load time of 2 seconds or less
  2. Defined maximum limit on page size and number of HTTP requests
  3. Verification of all server site tuning for an efficient and responsive site
  4. Google page speed performance grade of above 90
  5. Implementing performance optimisation

Implementing Performance Optimisation

How to speed up my Drupal website performance? Drupal is loaded with an enormous amount of features which, when implemented smartly, can lead to superfast page loads. There are several techniques to make your website faster by leveraging the amazing features of Drupal.

Keeping your site and modules updated

Outmoded modules can deter your efforts in speeding up your website. Thus, it is important to update every module enabled on your Drupal site.

Uninstalling unused modules

Like those outdated modules, it is significant to keep a tab on least used or no longer used modules. The number of Drupal modules installed on the site is directly proportional to the time taken for code execution which affects page load time. Uninstalling unwanted modules can alleviate execution time.

Moreover disabling the modules also adds to the execution time of the code. So, a complete removal by uninstalling the unused modules can speed up the Drupal site.

Optimising Cache

Optimisation of native cache system ensures that all the web page components are stored in an easily accessible location after a user visits your site for the very time. So, whenever the user visits your site again, the page elements are loaded from the cache which leads to increased page load speed.

Drupal has the provision of advanced caching with a great set of modules:

  • Internal Page Cache module helps in caching the web pages for anonymous users to increase the speed for subsequent users.
     
  • Dynamic Page Cache module caches web pages for the anonymous and authenticated users and is recommended for the websites of all screen sizes.
     
  • BigPipe module allows your users to quickly see the unchanged, cacheable page elements while the personalised content is exhibited next. This technology was inspired by Facebook. Drupal 8’s much improved render pipeline and render API is of huge help.
     
  • Redis module helps in integrating Drupal with Redis key-value store thereby providing a robust cache system for static pages.
     
  • Varnish module lets you integrate Drupal sites with an advanced and fast reverse-proxy system - Varnish cache -  to serve static files and unknown page-views quicker and at high volumes.

Optimising database

Website coding is not the sole thing that can be optimised. Optimising database by regularly cleaning up the data and removing the unwanted piece of information.

Memcache API and Integration module, help in the integration of Drupal and Memcached. It stores your data in active memory for a limited period of time thereby making it faster to access. 

So, instead of making queries to the database constantly, the information is readily available. Such a system also works on the shared web hosting plans.

Incorporating a Content Delivery Network (CDN)

Components like CSS, JavaScript and media are hosted by CDN and served to the online visitors from the nearest location. This can help in mitigating the page load time by rapidly delivering web page components.

Drupal module, CDN, helps in the integration of Content Delivery Network for Drupal websites. It changes the file URLs so that files like CSS, JavaScripts, images, videos, and fonts are downloaded from the CDN instead of your web server.

Optimising bandwidth

Aggregating all CSS and JavaScript files to make them load together is what bandwidth optimisation refers to. Such a parallel processing ensures that all the page elements can be seen by the users almost immediately.

Optimising images

Drupal 8 core is loaded with image optimisation feature to set the compression ratio of the images and fine-tune the page performance.

Moreover, the size of the images for screen sizes of different devices can be optimised in Drupal 8 to enhance the page load speed.

Handling 404 errors

Whenever something on the website breaks to cause a 404 error, it can lead to sluggishness. For instance, a failed image can damage the performance of the site. Drupal 8 provides a module called Fast 404 which utilises the resources better and whitelists files and verifies pathways of problem.

Managing the use of CSS and JavaScript

CSS and JavaScript provide wonderful methods for customisation and flexibility. But, too much of good things can be troublesome for your websites. Avoiding excessive use of CSS files and JavaScript use and keeping the code to a minimum can improve performance.

Advanced CSS/JS Aggregation, Drupal module, can help in keeping a tab of your front-end performance by aggregating CSS and JavaScript files to improve speed.

Using lazy loading

Lazy or on-demand loading is a perfect way to optimise your site’s performance. In this method, you split your code at logical breakpoints and then load it once the user has done something that requires a new block of code.

Basically, in traditional websites, all the images and content are preloaded into the web browser when someone accesses the site. Lazy loading loads these elements as soon as a user scrolls to view a content.

Blazy, Drupal module, provides the functionalities of lazy loading and multi-serving the images to save bandwidth and server requests.

Better web hosting

It is of consummate importance that, while implementing every possible tips and trick and utilising the Drupal’s amazing features, you chose the best web hosting provider that will decide your site’s ultimate speed, stability and security.

Upgrading the server hardware

Server scaling is of paramount importance in order to optimise the website. And to do so, you can either upgrade the server hardware by scaling vertically or by scaling horizontally. When you scale vertically, more resources are thrown at the same server and is considered the simplest approach of scaling the hardware. And when you scale horizontally, more servers are added to separate the load. This approach, when executed well, can minimise the load that any single server receives. In case, you have multiple app servers for Drupal, you will need a method of deploying code to each server concurrently. For example, plartform.sh and pantheon.io can manage the entire hosting setup for you but if you are handling it by yourself, you would require rsync setup or git push to each of your servers etc.

Case Study

The Drupal website of the Farm Journal’s MILK was optimised for high performance and better search engine rankings with a help of carefully drafted audit report by Opensense Labs.

In this section, we will focus on how we used our Drupal expertise to resolve the performance issues.

Project highlights

Previously segregated CSS and JS files cached separately which escalated the page load time. We aggregated all these files and put them in one place which assuaged the page load time.

Moreover, we used Advanced CSS/JS Aggregation Drupal module to minify CSS, JS and HTML and reduce load time.

In addition to these, we enabled Redis, used as a database, cache and message broker, so that it can be used as the backend instead of MySQL. This allowed cached items to be retrieved swiftly and improved performance.

Project outcome

On testing the performance metrics on tools like PageSpeed Insights and Pingdom, we witnessed significant improvement.

PageSpeed Insights

  • Result on handheld devices
Google pagespeed insights result for mobile devices before implementing performance enhancement in the sitePre-implementation (Live Instance)

 

Alt text: Google pagespeed insights result for mobile devices after implementing performance enhancement in the sitePost-implementation (Live Instance)

 

  • Result on Desktop
Google pagespeed insights result for desktop before implementing performance enhancement in the sitePre-implementation (Live Instance)

 

Google pagespeed insights result for desktop after implementing performance enhancement in the sitePost-implementation (Live Instance)

 

Pingdom

Pingdom scores on different performance metrics of site before implementing performance enhancementPre-implementation Pingdom Score (Live Environment)

 

Pingdom scores on different performance metrics of site after implementing performance enhancementPost-implementation Pingdom Score (Live Environment)

 

Conclusion

Speed can be the determining factor in the amount of time an online user spends on your website. It’s important that you remove the sluggishness from your website and inculcate betterments in its performance. Drupal 8 can help by incorporating wonderful features to make your site a high performing space.

Feel free to reach us at [email protected] for developing a high performing Drupal website

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