Planet image

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.

Article
Posted on 9th June 2021
Takes about 5 mins to read

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)...

Article
Posted on 1st April 2021
Takes about 3 mins to read
The last year has highlighted to us all how important it is for the global community to come together and solve problems. We rate ourselves highly at ComputerMinds, and figure it's time to share and stretch our abilities to the full. So I'm here on this special day to announce that we are branching out beyond just resolving bugs on websites, to fixing any kind of bugs in any problem space. There's so much market...
Published in: #Drupal Planet #Drupalgive
Article
Posted on 12th January 2021
Takes about 5 mins to read
Update! Since this article was written, a new 'lenient' composer endpoint has been created on Drupal.org to support using modules with Drupal 9 that haven't been marked as compatible with it yet. See the documentation, which boils down to adding a new common entry under 'repositories' in your composer.json, above the usual https://packages.drupal.org/8 one. The rest of this article is still useful for understanding how patching fits into composer's workflow. The vast majority of community-contributed...
Article
Posted on 11th November 2020
Takes about 2 mins to read
This article is part of the series
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...

Published in: #Drupal Planet
Article
Posted on 27th October 2020
Takes about 3 mins to read
This article is part of the series
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...

Published in: #Drupal Planet #contributing
Article
Posted on 28th July 2020
Takes about 2 mins to read
This article is part of the series
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...

Article
Posted on 14th July 2020
Takes about 4 mins to read
This article is part of the series
CM Drupal Contribution Challenge 2020
I recently released a new contributed module to aid translation on Drupal 7 sites: Entity Translation: Separated Shared Elements Form (ETSSEF). Yes, it has a convoluted name! It finally resolves a suggestion from years ago in an Entity Translation project issue, to allow editing untranslatable fields separately to translatable ones. One of our clients has a multilingual product database site with a few hundred fields on their content, so anything like this that could reduce...
Article
Posted on 7th July 2020
Takes about 5 mins to read

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...

Published in: #Drupal Planet #database #users #content
Article
Posted on 23rd June 2020
Takes about 4 mins to read
This article is part of the series
CM Drupal Contribution Challenge 2020
So we challenged ourselves to contribute back to the Drupal community this year. How are we doing? Here's a simple update on what each of us has done so far. Hopefully we'll see other ComputerMinds team members join this list by the end of the year.
Article
Posted on 16th June 2020
Takes about 4 mins to read

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...