Error: Call to a member function transformDimensions() on null in template_preprocess_image_style() (line 303 of /core/modules/image/image.module) #0 /core/lib/Drupal/Core/Theme/ThemeManager.php(287):
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | Before-patch-pic-2.png | 224 KB | vikashsoni |
| #16 | Before--patch--pic.png | 9.11 KB | vikashsoni |
| #15 | 3056841-15.patch | 773 bytes | dhirendra.mishra |
| #3 | null_image_style-3056841-3.patch | 773 bytes | scuba_fly |
| #2 | null_image_style-3056841-2.patch | 3.51 KB | amsteri |
Comments
Comment #2
amsteri commentedComment #3
scuba_flyNice work! Makes sense.
Instead of adding another else here, we could do an early return.
This would make the code a little less complex.
Also this would make the patch a lot smaller:
Comment #4
scuba_flyComment #7
robcarrI encountered a problem with the Simple Login module (#3166927)- the patch at #3 sorted this issue out.
Comment #8
andrewsuth commentedI can also confirm that patch #3 works as expected.
Comment #9
chaithanya.m commentedI have applied the patch #3 and it works fine after applying the patch.
Comment #10
scuba_flyAfter reconsideration this does not significantly impacts ( only one ) subsystem. Removing the tag.
Thanks for @lauriii for pointing this out on slack.
Comment #11
jsutta commentedI can confirm patch #3 works.
Comment #12
quietone commentedThis looks like a nice fix but I am pretty sure this will need a test. And let's use the issue summary template and explain the proposed resolution.
Comment #14
sbasile commentedIs this still an issue for 8.9.15? Trying to determine if I should use #3.
Comment #15
dhirendra.mishra commentedRe-rolled this against 9.3.x from #3
Comment #16
vikashsoni commentedThe patch is working fine after the patch i am able to access site for ref sharing screenshot
Comment #17
bnjmnmThis may be a duplicate of #2957368: Call to a member function transformDimensions() on null in template_preprocess and #3145187: Default image + No preview = fatal error?
If this isn't a duplicate, adding "Needs steps to reproduce", just to ensure that is taken into account when "needs issue summary update" is addressed.
Similarly, #16 Does not provide any new information, just what was already provided in the issue summary but as a screenshot instead of code snippet.
Comment #19
dqd@bnjmnm #17 - Thought the same. I think #2957368: Call to a member function transformDimensions() on null in template_preprocess is related, just affecting another preprocess function.