After deleting image style, that is in active use by consumer I get:
The website encountered an unexpected error. Please try again later.
Error: Call to a member function label() on null in consumer_image_styles_consumers_list_alter() (line 53 of modules/contrib/consumer_image_styles/consumer_image_styles.module)when accessing /admin/config/services/consumer.
The deleted image style is still visible on consumer config page.
Temporary solution: comment line 53 of modules/contrib/consumer_image_styles/consumer_image_styles.module and deactivate the image style on consumer admin page.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | consumer_image_styles-issue-2956739-breaks-on-missing-image-styles-D8.patch | 7.85 KB | ndobromirov |
Comments
Comment #2
e0ipsoThanks for the report! This is definitely an oversight.
I see two different solutions:
Comment #3
ndobromirov commentedHere is a patch that aims at resolving the issue.
There is a new utility service in the class that handles loading of image styles for the consumer.
Loading happens in bulk (loadMultiple).
The new service is injected in the ImageEntityNormalizer and used in the summary lists generation.
Small refactorings here and there.
Comment #4
e0ipsoThanks for the fix @ndobromirov. You are all over the place! Kudos on the fantastic work, and thanks for the help.