Top Drupal blog posts from July 2022
Despite the summer vacations being in full swing, last month featured a lot of great Drupal content. Here is an overview of our favorite July articles.
Automatic Updates in Drupal: How Things are Going With the #1 Requested Feature
The first article in this month’s overview comes from ImageX and gives an update on the progress and functioning of the Automatic Updates initiative, which is the number one requested feature as Dries Buytaert announced during his keynote at DrupalCon Portland in April, since website updates are one of Drupal’s biggest issues for customers and users.
The article starts off with a more general section with information about the initiative’s recent progress and future plans. The larger portion of the article is then dedicated to an overview of the different features and modules that comprise the Automatic Updates initiative.
An Introduction to Design Patterns in PHP (and leveraging it in Drupal)
Moving on, we have an introduction to PHP design patterns and making use of them in Drupal, written by Mohammed Farhaz of Specbee. In the first half of the article, he describes design patterns in PHP and why you should use them, and provides a breakdown of the most widely used design patterns in PHP.
The second half of Mohammed’s article is dedicated to using design patterns in Drupal 9. Specifically, these are object-oriented programming, dependency injection, the factory pattern and the singleton pattern. He finishes with a more in-depth overview and examples of dependency injections.
Composer Managed Custom WordPress & Drupal Dependencies
In the next post, Jonathan Daggerhart presents the Composer Merge Plugin, which enables more streamlined dependency management for Drupal and WordPress.
This plugin allows developers the ideal scenario, as Jonathan puts it, of having each custom module or plugin define its own dependency packages, which results in better maintained relationships between these custom functionalities and their dependencies.
He shows the examples for both WordPress plugins and themes, as well as for Drupal modules and themes, and closes with a brief overview of the main takeaways.
Supporting an unknown amount of menu items within Olivero’s menu
We continue with a post by Mike Herchel, lead developer of Drupal’s new default front-end theme Olivero, who shows how to enable support for an undefined amount of menu items in a menu built in Olivero.
A straightforward solution would be to default to the mobile menu style over the desktop style when there’s a large amount of menu items, but as Mike points out, this can still result in problems with presentation if you’re not sure how exactly the items will fit the viewport.
Rediscovering Balance in Drupal Core Contribution with #bugsmash
Next up, we have a great post by Amber Himes Matz of Drupalize.me who shares how she was able to find a way to contribute to Drupal core that works best for her through the Bug Smash Initiative on the #bugsmash channel on Drupal Slack.
The way the initiative works is through issue triaging – providing feedback and updating issue metadata to facilitate the job of committers and contributors – which is a great way to tackle the large amount of outstanding bugs in Drupal, also perfect for developers who want to contribute but don’t have a lot of time to devote to doing so.
Exporting Drupal body classes to use with Tailwind CSS
The next post, written by Oliver Davies, is about exporting content from Drupal’s body classes so that it can be used by Tailwind CSS’s JIT (just in time) compiler and PurgeCSS. One approach is to add the classes to a safelist, and extract them to a file if necessary.
Another option is to use a custom Drush command to automatically generate the safelist based on the database contents. As Oliver shows, this is done through creating a new PHP class within a custom module, then injecting the database service and completing the handle method.
Manage Terms in Bulk using Taxonomy Manager in Drupal
Approaching the end of this month’s overview, we have a guide for managing terms in bulk with the Taxonomy Manager module, written by Ivan Zugec of WebWash. He shows how to install it and set up the initial configuration, then goes into the specifics of the module’s functionality.
The user interface of Taxonomy Manager allows users to bulk import or delete terms, add new terms to existing vocabulary in bulk, easily export all the terms, as well as manage individual terms and search through them. The module currently doesn’t enable the re-ordering of taxonomy terms.
Open Source vs Proprietary for Government Websites
We’re concluding the July selection with an article which is less Drupal-specific and more about open source in general, coming from Cassey Bowden of Promet Source who compares the use of open source versus proprietary software for government websites.
Cassey’s article starts with a definition of the two types of software, followed by the advantages of open source software, with flexibility and cost savings being among the top ones.
She even dedicates an entire section to discussing vendor lock-in and how an open-source platform such as Drupal eliminates the risk of getting locked in. In the final section, she answers a couple FAQs regarding open source before wrapping up.
We hope you enjoyed checking out this month’s selection of Drupal articles. Don’t forget to tune in next month for an overview of the top content from August!