Top Drupal blog posts from May 2023
We’re back with an overview of our top picks of monthly Drupal-related articles. We hope you enjoy our selection for May!
Drupal Takes a Step Forward in Accessibility with Automated Testing Integration
The article starts with a look into the history of introducing automated axe testing into Core, followed by a detailed breakdown of what this will look like in core: axe tests are run on different types of Drupal pages, catching changes causing accessibility issues which need to be addressed and resolved before getting committed.
The authors also consider what this integration will mean for contributed Drupal modules, then conclude the article with acknowledgements and additional resources to check out.
Dependency injection anti-patterns in Drupal
Next up, we have an article from Matt Glaman that discusses dependency injection anti-patterns in Drupal, which are realized as adding additional logic to the constructor of a class. He takes a look at three of the most common anti-patterns, breaking each of them down further.
The three cases he looks at are: assigning the current request object to a property instead of the request stack; assigning entity storage to a property instead of the entity manager; and assigning a configuration object to a property instead of the configuration factory. All of these cause extra code execution in the service’s constructor, as well as potentially lead to invalid objects.
Understand your project's site structure and data with Xray Audit
In the third article from May, Luis Peidró of Metadrop presents the Xray Audit module for Drupal, which addresses many of the limitations to effective agile auditing, chiefly: the need for technical roles, the typically infrequent nature of audits and the extra time investment, and issues with centralization and maintainability.
Xray Audit enables any user profile to instantly generate different types of reports (content entity reports, display reports and reports for Drupal modules). The module is based on the Drupal plugin system, which allows developers to easily extend it by integrating new reports if needed, and Metadrop plan on adding a lot more functionality themselves as well, such as core status and lists of different entities.
Questions to Ask When Choosing a Drupal Hosting Platform
Moving on, this article by Andrew Berry of Lullabot goes through the key considerations to have when deciding on the right Drupal hosting provider. The primary one should be knowing what your goals and priorities are, and/or knowing what’s not working for you with your current hosting solution if you already have one.
Other considerations include having your finger on the pulse of your in-house experts and their availability; knowing which of your different platform options you’re considering and need to more thoroughly evaluate; and determining whether you need the extra services of a particular provider. Andrew also provides some practical tips on how to carry out and keep track of the evaluations.
The Non-Profit’s Guide to Drupal Structured Data SEO
We continue with a guide by Venis Guzman of Promet Source on how to implement structured data on a Drupal website to improve search visibility. While the article is primarily directed towards nonprofit organizations, the tips and practices can come in handy for any website using Drupal as its CMS.
In the first part, Veniz defines structured data SEO and breaks down its main benefits, namely, a better understanding of your content by the Google algorithm, and a better search experience for your visitors. The second part then serves as a step-by-step guide to applying schema markup to a Drupal website.
Disabling Twig Caching Just Got A Helluva Lotta Easier (in 10.1)!
The next article comes from Mike Herchel who wrote about a new Drupal feature coming out in 10.1 which will allow developers to easily control Twig caching from the UI, without the need to clear the cache for each edit or go through the typical time-consuming process.
In contrast, the straightforward new UI provides a new form with a Twig development mode checkbox that opens up two additional options, Twig debug mode and Disable Twig cache, empowering both junior as well as more senior developers.
In the final section of his article, Mike gives an overview of the origins of this feature and the process of developing it, including shout outs and thank yous to everyone who contributed in any way.
Simplifying the frontend developer experience in Drupal with a click of the button
For the second time this month, we have another article by Matt Glaman; in this one, he wrote about the same Twig caching feature as the above article by Mike Herchel, but it’s much more focused towards the front-end developer persona, including an in-depth breakdown of the existing way to bypass markup caching as well as the functionality of the new feature.
The new Development settings form takes care of all the complex steps from the previous process under the hood. It works by storing development settings in the State API rather than the Configuration API and modifying the service container with state values. To apply changes immediately without having to rebuild the cache, the form also invalidates the service container.
Drupal 7 to Drupal 9: More than a migration
The final article we’d like to mention comes from Acro Media’s Laura Meshen who wrote about the upgrade from Drupal 7 to Drupal 9 and why it can’t be treated as just a migration. While the Drupal 7 end of life has received an additional extension since the publication of this piece, that doesn’t mean you should keep postponing the move off D7.
The most basic way to explain the difference between the two concepts is that migration only constitutes a transfer of data to a new platform, while an upgrade also includes new features and major (structural) changes, while not necessarily moving to a new platform. One of the biggest challenges of a true upgrade is achieving feature/function parity, which includes both new and improved features as well as the removal of old/outdated ones.
That’s all for this month’s overview. Stay tuned for more content on Drupal and digital strategy coming soon!