
The articles on this page are ComputerMinds' contribution to the Planet Drupal aggregated article feed. Planet Drupal is intended to collate interesting and useful Drupal content from around the web.
Defining your own Drupal block plugins in custom code is really powerful, but sometimes you can feel limited by what those blocks have access to. Your block class is like a blank canvas that you know you'll be pulling data into, but how should you get that data from the surrounding page? Often you have to resort to fetching the entity for the current page out of its route parameters (e.g. on a node page)...
Core web vitals
TLDR : Check your cookie popup! It seems everyone is talking about core web vitals at the moment, spurred on by Googles’ recent announcement that page experience (which includes core web vitals) will start influencing search ranking in May 2021. We won’t go into detail on web vitals in this post - there is plenty of information already on the web, including from Google themselves on the excellent web.dev site. Instead, this post will look...
CM Drupal Contribution Challenge 2020
Over the last year or so, I've got quite engaged with Drupal slack. I've loitered in channels like #d9readiness and #config, discussed issues with members of the security team, and asked questions to module maintainers (and received answers!). But most of all, I've helped people out in the #support channel. This has been an interesting experience in many ways, so I thought I'd share my reflections. The Drupal slack workspace is intended for the community...
Upgrading to Drupal 9
Many of us at ComputerMinds have always taken pride on doing Drupally things the right way whenever possible, and then helping the community do so too. One of these things is displaying values from fields on content entities. We wrote before about how to do this in Drupal 7 and Drupal 8. It's now the turn of Drupal 9! Thankfully, this updated version is basically the same as the last one, as D9 is very...
CM Drupal Contribution Challenge 2020
Drupal 7 introduced the brilliant feature of letting users cancel their own account and with it various options for what to do with content they've created when they are cancelled. One of these options is to: > Delete the account and its content. Which can prove somewhat problematic if used incorrectly. You see, Drupal is very good at the latter part: deleting all the content created by the user. It's not very good at warning...
CM Drupal Contribution Challenge 2020
There are some key files like robots.txt and .htaccess which are often tweaked for Drupal websites. These can be considered part of the 'scaffolding' of a site - they control the way the site works, rather than its content or design. Any new release of Drupal core that includes changes to them specifically mentions that they need updating, as those changes may have to be merged with any customisations made on your site. For example...