-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gutenberg_pre_init() does not prevent plugin from loading #27998
Comments
We don't support versions less than 5.3. Line 6 in 35a94fd
|
@noisysocks I think you misunderstood the purpose of this ticket. I'll try to explain it differently :) I know that Gutenberg does not support WP < 5.3. There's even this function that should warn the user about it: Lines 139 to 151 in 35a94fd
However, it does not work as intended. Neither does That's because there's a fatal error happening before this code can even run. This ticket is about this fatal error and how this logic needs to be fixed so that this notice is being displayed as intended. |
Ah! Thanks for clarifying 🙂 |
I have just installed WordPress-Develop and on latest master + latest master Gutenberg repository, I am still getting this fatal error after activating the plugin :/
So the WP version is 5.7, not <5.3; Gutenberg v.9.7.1 I might be missing something obvious, it's my first time setting up the two. Considering how the fatal error showed up right after doing the latest pull from both, I guess I might be wrong as I am not finding it reported, but still, posting if it helps. Apologies if this needs a separate ticket |
@xavortm Since you are using Gutenberg master Have you built Gutenberg properly? |
Apologies :( I did |
I saw the flaw in my logic just before I went to sleep - there is no concern for backwards compatibility at all. It's very likely, I am missing something essential, though. Please forgive my ignorance. |
Describe the bug
When using Gutenberg on WP < 5.3,
gutenberg_pre_init()
will trigger an admin notice and won't loadlib/load.php
because of that.However, the rest of the code in
gutenberg.php
is still executed, including all theadd_action
calls, likegutenberg_menu()
.That function in turn calls
gutenberg_use_widgets_block_editor()
, which only exists ifload.php
is loaded.Because of that, on WP < 5.3 you will not get any admin notice, but instead this fatal error:
To reproduce
Steps to reproduce the behavior:
Expected behavior
Admin notice instead of fatal error
Screenshots
If applicable, add screenshots to help explain your problem.
Editor version (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: