Drupal.

Improving performance of Drupal Sites - Part O

I have some good news and some bad news. The good news is that my website(s) are bringing in traffic, the load is spiking. No thanks to google - I am still on their terrorist list or whatever, so even when I'm directly in front of their faces they don't see me. But my sites are gaining popularity anyway.

A first functional test in Drupal 9 (test a redirect in a controller)

...of course this took longer than anticipated, but I have achieved this milestone, writing and executing a complete functional test in Drupal. It was not an easy, trivial test - and the path I took in implementing it highlights the gotchas and difficulty of writing such tests. As well, my process is likely not be unique, and the challenges I faced appear common. It there appears valuable for me to put down a quick writeup on quirks and tricks I saw along the way. In this article, I assume the reader is an intermediate Drupal developer.

[FIXED]: Error: Call to a member function transformDimensions() on null in core/modules/ image/image.module

The issue stems from the preview being in an undefined style.

1. Go to configuration -> image styles and review the styles available. I have a style called "200x200 thumb".

2. After adding an image field to a content type, go to manage form display, expand the display of the image, and specify an existing style from step 1 as the preview style.

After taking these steps, the page for adding/editing this content type should render correctly.