Hi, if you configure Blazy with an image style and after you delete the image style, when you open a page with that blazy formatter (page or layout builder UI if you're using it), the website returns this type of error:
Error: Call to a member function buildUri() on null in /var/www/html/web/modules/contrib/blazy/src/BlazyManager.php
I've had to debug the code in order to get the names of the deleted image styles and recreate them. This allowed me to change the Blazy settings with another image style and after I've safely deleted the outdated image styles.
The blazy source code should verify the existence of image styles to avoid this bug.
I've created a small patch, let me know if it is ok (it also fixes the lightbox related code)
| Comment | File | Size | Author |
|---|---|---|---|
| check-if-image-style-exists.patch | 2.3 KB | finex |
Comments
Comment #2
gausarts commentedGood catch. Thank you.
Please allow some delay to get back on this.
Comment #3
gausarts commentedComment #5
gausarts commentedCommitted with minor changes related to CS and correction to use $box_media_style accordingly. Thank you for contribution!