Problem/Motivation
After updating to 8.12, I'm getting Error: Call to a member function get() on null in Drupal\blazy\BlazyFormatter->preBuildElements() (line 61 of /var/www/html/web/modules/contrib/blazy/src/BlazyFormatter.php) on certain pages. Not sure what exactly is causing this but I know how to prevent it and will provide a patch in a minute.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3282785-WSOD-15.patch | 605 bytes | gausarts |
| #14 | 3282785-14.patch | 1.31 KB | rajab natshah |
Issue fork blazy-3282785
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jurgenhaasComment #4
michèle commented#2 fixes the issue. thank you!
Comment #5
trickfun commentedSorry for my stupid question but how can use the patch with composer?
Comment #6
gausarts commentedThank you.
Alternative solution to avoid this WSOD without the patch is to install the latest sub-modules accordingly, e.g.:
https://www.drupal.org/project/slick/releases/8.x-2.7-beta1
Regarding patch, the
$plugin_idwill be undefined here:https://git.drupalcode.org/project/blazy/-/merge_requests/10/diffs?commi...
Feel free to update your patch if you'd like to add another check to avoid that warning.
I'll get back to it shortly, and release another one. Thanks again.
UPDATED
Added a new beta for testers.
Comment #7
anybodyConfirming the issue with 8.x-2.12! MR!10 fixes it, but raises:
Comment #8
anybodyThe warning should now also be fixed. Please review and create a hotfix release as soon as possible. Thanks :)
Comment #9
quotientix commented+1 - experiencing the same WSOD
Comment #10
gausarts commentedThinking this over we should probably supply
Blazy::verify($settings);at the top, and remove the current checks/ patch.
Like everywhere else during this transition.
This way, it will facilitate, not negate, the feature. Might be useful for potential third tier sub-modules like EZ Plus, SB, etc.
And please allow some delay to get back to it. I thought I could make it shortly, but not. I am sorry about it.
For immediate solution without patches, please see #6.
Comment #11
rajab natshahFacing the same issue.
Using the following patch link from the MR commit
https://git.drupalcode.org/project/blazy/-/commit/41feec129ab1c60c90d77a...
This is for the dev branch
Comment #12
anybody@gausarts: Thank you for your quick reaction. Just an idea to save you from further WSOD reports and users from frustration, wouldn't it make sense to create a hotfix release with the MR to make it at least "work" without error until there is a clean solution?
The solution from #6 also requires manual interaction. Everyone doing typical "
composer update" will crash its project and come to this issue... that's quite a heavy thing.I guess then you'll have all the time it needs to fix this and the priority can be reduced?
As a result
composer updateshould just work.PS: It was a stable release killing the sites... so I think this is critical for up to 50.000 sites? ;)
(REALLY No offense, just my two cent, such things can happen to everyone of us and this is open source :) So THANK YOU however you decide.)
Comment #13
drupalfan2 commentedSame error here (8.12):
Error: Call to a member function get() on null in Drupal\blazy\BlazyFormatter->preBuildElements() (Zeile 61 in /var/www/html/web/modules/contrib/blazy/src/BlazyFormatter.php)Comment #14
rajab natshahThank you, Jürgen (jurgenhaas), and Julian (Anybody) for the quick fix
Only having the merge_requests/10.diff as 3282785-14.patch, as the 10.diff file keeps changes by each commit on the issue fork.
For a quick use patching on the 2.12 release and the dev branch
Comment #15
gausarts commentedThank you.
As I don't want to change it back after being released, here is as described at #10 -- to facilitate not negate.
Comment #17
gausarts commentedTo avoid this type of potential repeated issue, please read project home warning, or here for convenience:
It is a contrib, not core, with very limited resources, and contributions. At least this issue would not happen if contributions were happening at DEV phases, not just RELEASE ones. That is fine, I know anybody are busy in this very short life. But kindly bear with and accept such limitations.
Thanks to those who are showing cool manners on this critical issue. You are awesome.
And again all apologies for inconveniences.
May you all be blessed with happy, healthy and good living :)
Committed. Again thank you all for contributions.
Comment #18
anybodyThank you very much for your great work on this great project and the fix in this issue. Completely agree :)
There's a good reason why > 60.000 projects use it: It's super awesome and helpful, you can be really proud. Things like these happen, while we all try to prevent it.