Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
WSOD with:
Call to a member function getCacheTags() on null in Drupal\svg_image\Plugin\Field\FieldFormatter\SvgImageFormatter->viewElements() (line 102 of modules/contrib/svg_image/src/Plugin/Field/FieldFormatter/SvgImageFormatter.php).
Occurs if an image style was selected that doesn't exist anymore.
So I guess in these lines it should be checked, if the image style could be loaded, before proceeding:
$cacheTags = [];
if (!empty($imageStyleSetting)) {
$imageStyle = $this->imageStyleStorage->load($imageStyleSetting);
$cacheTags = $imageStyle->getCacheTags();
}
Comment | File | Size | Author |
---|---|---|---|
#6 | 3069658.patch | 660 bytes | batkor |
Comments
Comment #2
imyaro CreditAttribution: imyaro at DrupalJedi commentedComment #4
imyaro CreditAttribution: imyaro at DrupalJedi commentedHello!
Thank you for your contribution.
I've added fix into the dev branch, release coming soon.
Comment #6
batkorNew release not created.
This patch help you now.
Comment #7
AnybodyNew stable release would be very helpful @zvse. Thank you very much for your work on this.