Top Drupal blog posts from October 2020
Like every month, we’ve compiled some of the top Drupal blog posts written the previous month. Take a look at our list for October.
Drupal Association Board Election 2020 – winner announced
The first post we’re covering this month is Pedro Cambra’s announcement of winning the 2020 election for the Community At-Large director position on the Drupal Association board.
Pedro starts off by thanking all participants who voted and inviting those who didn’t to share with him their reasons for not doing so. He then lists his goals for the two-year term which began on November 1st.
These include getting more information on the recent changes in the community and informing the community about them, revisiting the initiatives aimed at engaging with the community, providing a voice for the community, and helping non-native English speakers better engage with the DA.
Migrating Paragraphs to Layout Builder in Drupal
Next up, this post by Phase2’s Daniel Sasser shows how you can migrate Drupal Paragraphs to the block-based Layout Builder. He begins with the setup (a Drupal 7 to 8 migration in this case), then covers the different types of Layout Builder’s Section storage as well as the construction of the Section storage.
In the second half of the post, Daniel gets to the meat of the matter - the actual migration. The first and key step is migrating paragraphs to blocks, starting with building the block structure for the destination site. Once that’s done, you can proceed with migrating the nodes.
Web Development Strategy in a Drupal 9 World
June’s release of Drupal 9 represented a truly major change for the platform, paving a new future for Drupal. In this next post, Lullabot’s Matt Robison discusses how development strategies will evolve in this new future for companies relying on Drupal.
The first point Matt covers is establishing a new cadence for your development work. The most important things here are planning out releases, new initiatives and features, addressing technical debt and allocating resources.
Next is a section on revisiting architecture and content, then finally one about leveraging outside help within this new model. With the latter, it can be either for maintenance and support, to fill in-house skill gaps or increase your development velocity.
Drupal 8/9 Migration Performance Tips and Tricks
John’s first trick is to use the Migrate Booster module, which nets a decent performance gain by allowing you to disable modules that rely on hooks. The other two more important considerations are database tweaks and batching the migration.
John finishes his post with some other more general tips, such as keeping your site up to date with the latest minor versions of Drupal and running your migration in Drush rather than the UI.
An Absolute Beginner’s Guide: Using a Drupal Core Method in Your Own Code
Moving on, we have Mike Madison’s beginner guide to using a Drupal core method in your code. In the post, he works on the example of the Random::word() method.
He starts by giving a brief description of object-oriented programming and its benefits, then how it fits into the context of the example of patching the Honeypot module to randomly assign a title to a field.
In order to follow the OOP approach and avoid code duplication, Mike uses the core Word method, but with first instantiating the Random class before using the method. He also recommends using an IDE for this, as they are very useful for catching errors.
Local Behat Testing with Lando and Pantheon
We continue with a blog post by Zakiya Khabir of Chapter Three on doing local Behat tests with Lando and Pantheon. While very useful, as Zakiya points out the default Behat tests provided by Pantheon may not work properly on a custom site which has made changes to the default Drupal installation.
Zakiya’s post shows how you can remedy that and have your Behat tests run locally by making minor file changes to your Lando-based project: adding a drush alias file, adding Behat-specific config and Behat tooling, and finally running the tests with
lando behat. She concludes with some other general tips, such as not foregoing other types of tests because of Behat.
Adding a WYSIWYG to text fields in Drupal 8 and 9
Heather proposes two ways to go about it. The first solution is writing an update hook to create a new field, migrating data to it, then deleting the old field as well as reconfiguring. As she states, though, this solution takes much longer and is much more error-prone.
The more efficient way is to add a form alter, then enable the fields to render as formatted text, which can be done with just a few lines of code.
Debunking 4 CMS Migration Myths
We round off this month’s list with another migration-related article, this one by Mobomo. It's not Drupal-specific, but discusses and debunks 4 common myths of migrating to a new CMS.
The first one is the fear of losing all data when migrating, which is justified but can be easily resolved by taking the proper steps. The second myth is having to invest in a redesign while performing a migration, which should be approached more thoroughly and holistically.
Third is another well-known fear - that of losing SEO ranking. While you’re likely to have a SEO dip right after migrating, a better optimized site will actually benefit SEO in the longer term. The last myth pointed out by Mobomo is that migration is simply a “lift-and-shift”, which is in reality very rarely the case.
We hope you enjoyed this month’s recap and found some useful information for something you’re working on. Stay tuned for more for a new recap next month!