328 Results
  • Latest
  • Oldest
Article
Posted on 15th March 2023
Takes about 2 mins to read
This article is part of the series
Drupal 10 upgrade: www.computerminds.co.uk

One of the 'new' features in Drupal 10 is that it has removed lots of deprecated code. One of the things that means for our Drupal 10 upgrade project is that some of the modules that this website used are no-longer in Drupal core. Either there's a replacement for each one or they are simply in contrib-land and not supported using the full resources of Drupal core. We'll go one by one looking at the...

Published in:
Article
Posted on 13th March 2023
Takes about 5 mins to read
One of our big Drupal 7 to Drupal 9 migration projects included bringing across image cropping functionality and data on a longstanding client's website. This site had used the Imagefield Crop module, but that was only for Drupal 7. We set up Image Widget Crop for the new site, which is better in a few ways but is also fundamentally different. The old site referenced the cropped images from content, only bringing in the originally-uploaded images for edit pages, to allow editors to adjust the cropping, which was then used wherever that image appeared on the frontend. But the new Image Widget Crop module allows configuring different crops for different situations. The real challenge was in migrating the data! But we call ourselves Drupal experts, so of course we dug to find solutions. We found the following steps were necessary...
Article
Posted on 7th March 2023
Takes about 2 mins to read

Years ago, when Drupal 8 was released not only did it usher Drupal into the modern age of PHP frameworks and CMSs but it changed how Drupal upgrades were managed and controlled. Gone were the days of painful major upgrades with frequent compatibility breaks; instead we got lovely 6 monthly upgrades that added functionality followed by occasional major releases that removed old code and marked certain features as old ('deprecated' in technical jargon). Several years...

Published in:
Article
Posted on 7th March 2023
Takes about 4 mins to read
This article is part of the series
Drupal 10 upgrade: www.computerminds.co.uk

This one is entirely on us, we wrote the custom code, which makes us responsible for maintaining it. The upgrade status module gives us a nice report of each custom project and what changes it thinks are required to bring the code up to date to work with Drupal 10. We really don't have a lot of custom module code, and the code that we do have is very simple, standard Drupal 8/9/10 stuff, so...

Published in: #Drupal Planet
Article
Posted on 2nd March 2023
Takes about 8 mins to read
This article is part of the series
Drupal 10 upgrade: www.computerminds.co.uk

We're continuing our series on upgrading this very website to Drupal 10...but our first proper bit of work to upgrade this site is essentially nothing to do with Drupal 10! We built this site in the early days of Drupal 8 and Drupal core didn't really handle 'media' any differently to Drupal 7, but we wanted to try out some new modules that included having a library and drag&drop upload. However, these modules are an...

Published in: #Drupal Planet
Article
Posted on 25th February 2023
Takes about 3 mins to read
This article is part of the series
Drupal 10 upgrade: www.computerminds.co.uk

Let's define the scope and goals of our project to upgrade this very website to Drupal 10. Essentially, that's it: we want to upgrade this website to Drupal 10 so that we can benefit from security releases etc. At the moment we want to do so with the minimum of effort, so I don't want to have to be writing lots and lots of code or changing fundamentally how the site works, but I am...

Published in: #Drupal Planet
Article
Posted on 22nd February 2023
Takes about 1 min to read
This article is part of the series
Drupal 10 upgrade: www.computerminds.co.uk

On 14th December 2022 Drupal 10 was released. We can't say we immediately set about the task of upgrading all our Drupal 9 sites, but we did start thinking and planning to move all our sites in 2023. I thought it might be fun to take a look at how we do an upgrade and specifically the upgrade of this very website. So over the next few weeks we'll be slowly getting this site ready...

Published in: #Drupal Planet
Article
Posted on 26th October 2022
Takes about 4 mins to read

Drupal provides an excellent sanitisation system to filter the HTML content that editors might create. Think of it like a series of traffic cops that filter different vehicles into different lanes. Some content is allowed through to its destination, some has to be transformed along the way, and some is simply blocked from displaying. Administrators can use the 'Limit allowed HTML tags and correct faulty HTML' option to configure which HTML elements and attributes they...

Article
Posted on 29th June 2022
Takes about 2 mins to read

Here's a super simple tip to help you work with services for Drupal in PhpStorm ( our favourite IDE). First, ensure you have enabled the Drupal Symfony Bridge and Symfony Support plugins; they're brilliant for auto-complete suggestions, and navigating around services, controllers, annotations and twig templates! I find it so helpful to be able to cmd+click (or ctrl+click) on a service name, whether in a YAML definition, or PHP code, and jump straight to the service class. But I'd noticed that PhpStorm often didn't recognise the method used after my code referred to a service like this: \Drupal::service('my_service') ->something($id);

Published in: #Drupal Planet #Custom code #Symfony
Article
Posted on 19th October 2021
Takes about 3 mins to read
This article is part of the series
Core web vitals

If your website gets a lot of traffic from search engines, and Google in particular, then you need to care about all the things that Google wants you to care about, including 'First input delay'. If you don't pay attention to this metric then you may find Google lowering your site in their rankings and thus you get less and less traffic to your site. Usually, we aim for more traffic, not less :) ###...

Published in: