-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Show a dismissible notice when browser is in quirks mode #15206
Comments
This sounds like a similar issue to #10212 and could probably be handled in tandem to ensure these notices are as user-friendly as possible whilst providing helpful prompts to developers. |
Absolutely. Though an important aspect t this one, which is probably fixable entirely through proper phrasing, is that it needs to be clear that the block editor is not at fault here, it's a plugin or less likely, a theme function, that's breaking things. Moreso, there's no way to know for us which plugin or function breaks the block editor, all we can know is that it's broken. |
Should these be merged as issues? |
If we utilize existing notification methods (ie. standard top notifications or snackbars) then I don't think this requires any design work. We just need to nail down the messaging. Any thoughts on the copy, @michelleweber? |
Hi @mapk / @jasmussen -- as Michelle is AFK this week, I looked at the copy myself, and think it could use some tweaks to make it user-friendlier / less technical jargon-y. For example:
Does this work for you / accurately represent the issue at hand? |
When a WordPress plugin outputs HTML or scripts in a way so that the
<!doctype html>
is not the first thing the browser encounters when rendering the editor, it causes the block editor to render in “quirks mode”. Because we use flex for layout, and flex is something quirks mode doesn’t handle well, it means the user will see layout errors, and they will rightly assume it's a bug in the block editor.Steps to reproduce:
1: Have a metabox on the page. Can be custom fields (More Menu > Options > Custom Fields)
2: Put the following in functions.php:
add_action('init', iAmError)
The above code example will cause a PHP error to be rendered before the
doctype
definition, invoking quirksmode and it will show layout issues. As of #12575 we have a warning present in the JS console, however this has proven to be insufficient in explaning why the error occurs, as we still see reports trickling into #11378.In light of that, we should consider creating a user-visible, dismissible notice, for when we detect quirks mode.
It could say this:
Note: an error, likely from a plugin, is causing the editor to render in compatibility mode. This may cause layout errors with metaboxes. Read more
.The Read More link could take you to a documentation page in the Gutenberg handbook that explains what's going on in more in depth, and suggest steps to try and reproduce. Those steps usually mean disabling plugins one by one to figure out which one is causing the issue.
The text was updated successfully, but these errors were encountered: