Closed davidfcarr closed 6 years ago
Through long process of elimination, I found that the issue went away if I prevented admin notices associated with my plugins from displaying on the edit page and post listings page. Even though you don't see notices displayed on the edit page when Gutenberg is active, they are still there, just hidden. Exactly what in that code was causing problems, I'm still not sure. Because of the way Gutenberg enforces strict validation of the DOM, it could just be a bit of sloppy HTML.
FWIW, here is what I added to the top of my admin notices block:
function rsvpmaker_admin_notice() {
if(isset($_GET['action']) && ($_GET['action'] == 'edit'))
return; //don't clutter edit page with admin notices. Gutenberg hides them anyway.
if(isset($_GET['post_type']) && ($_GET['post_type'] == 'rsvpmaker') && !isset($_GET['page']))
return; //don't clutter post listing page with admin notices
I have been adding Gutenberg extensions to a couple of related plugins, RSVPMaker and RSVPMaker for Toastmasters, and am seeing the benefits. However, I am currently wrestling with an intermittent bug that occurs only in a few circumstances but is proving very difficult to debug. I have seen some other posts about "white screen" problems, and I'm hoping someone who reads this will have seen something similar and will clue me in on what to look for.
The most puzzling thing is that on a multisite install, the error occurs on some subdomains but not others -- with no obvious configuration differences between them. To my great frustration, it works perfectly on a subdomain used for demo purposes but not on the subdomain I'm using in production.
In these cases:
How it is supposed to work - demo.toastmost.org editor view
How it is supposed to work - demo.toastmost.org event post listing
Error on op.toastmost.org - editor
Error on op.toastmost.org - events post listing
Console log for events post listing screen (key might be Uncaught TypeError: Cannot read property 'hasClass' of undefined)
Console log for editor screen (no obvious error)
Sample block content
Block definitions