-
Notifications
You must be signed in to change notification settings - Fork 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
Editor: Barnsbury page layout breaks editor in sandboxed site with Gutenberg 8.7 #44783
Comments
@ramonjd and I encountered this issue using the Stratford page layout, with the latest posts block set to display post date. If we access the site from the front-end, we get the same error: And in the backend, it results in a white page and the editor won't load I think this would be because the PHP warning is being outputted to the response from the server. Do we know why these warnings are being outputted in the sandbox instead of being suppressed or being sent to error logs instead of being part of the response? This error that we could replicate is only happening for us while sandboxed. |
Okay, my current hunch is that we're seeing this warning now due to the change in WordPress/gutenberg#24351 where At any rate, in https://github.com/WordPress/gutenberg/blob/master/lib/block-supports/index.php#L54 @Addison-Stavlo I see you reviewed WordPress/gutenberg#24351, so I wondered if you might have more context here? CC: @ramonjd |
Thanks for getting to the bottom of it @andrewserong I don't agree with using But DOMDocument does not support HTML5 so we're going to see more of this in development environments if we don't turn it off fully. Therefore +1 on using |
We're setting our own error handler via 🤔 Confirmed. Commenting out our error handler allows See 26096-pb for where we call |
Sets the charset of the html passed into DomDocument to utf-8. Replaces the mb_convert_encoding call replacing utf-8 with html entities before handing off to DomDocument. This avoids the need to later convert back to utf-8 from html entities afterward. This secondary mb_convert_encoding call was converting not only the utf-8 we converted earlier but also entity encoding html stored inside data-* or other attributes of html elements. Fixes Automattic/wp-calypso#44897 Maintains the fix for WordPress#24445 (WordPress#24447)
@andrewserong this wasn't fixed in WordPress/gutenberg/pull/24645, creating a new PR for this as I think it should probably be changed. |
Thanks so much @lsl! |
This should be fixed in 8.9 - WordPress/gutenberg@33c83fa |
Steps to reproduce
What I expected
The editor reloads as expected. If you view the newly published page on front end you see the Barnsbury page layout. This is what happens when the site isn't sandboxed, so users aren't seeing the issue reported here.
What happened instead
After refreshing the editor placeholder appears for a bit but then the screen goes blank and fails to load.
If you load the page on the front end the page is filled with
DOMDocument::loadHTML(): Tag time invalid in Entity
warnings. I wonder if it's the editor trying toBrowser / OS version
Using GB 8.7. I believe this is the culprit because when I downgrade to 8.5.1 in the sandbox the warnings go away.
Screenshot / Video
Screenshot of the front end
![Untitled](https://user-images.githubusercontent.com/1500769/89756442-a3243f00-db36-11ea-96df-0e298c37861b.png)
The text was updated successfully, but these errors were encountered: