Making WordPress.org

#3735 closed defect (fixed)

Frontenberg broken on Rosetta websites: Block "core/shortcode" is not registered.

Reported by: audrasjb Owned by:
Milestone: Priority: normal
Component: International Sites (Rosetta) Keywords:



Hello, fronteberg seems to be broken.
This error appear in browser console: Block "core/shortcode" is not registered.

Change History (8)

#1 @audrasjb
19 months ago

  • Priority changed from highest omg bbq to normal

The issue seems to be fixed now, thanks :)

#2 @netweb
19 months ago

  • Resolution set to fixed
  • Status changed from new to closed

This ticket was mentioned in Slack in #meta by garrett-eclipse. View the logs.

19 months ago

#4 @garrett-eclipse
19 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This issue continues to persist and seems to be a RACE condition so doesn't always surface

#5 @aduth
19 months ago

Still seeing this happen as of today, August 3, 2018.

I commented in Slack with a suspected cause.

The white screen is caused by this line: https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php?rev=7584#L158
Probably a race condition with the initialization of the editor, which is slightly more involved https://github.com/WordPress/gutenberg/blob/9ae5aa223ef80c48f2352e4b90ffaefc37bc5258/lib/client-assets.php#L1292-L1298
Instead of wp.domReady, it should probably be using window._wpLoadGutenbergEditor.then

Edit: To clarify, the race condition is that it is initializeEditor which registers the core set of blocks:


I suspect that what is happening is that the wp.api.init in Gutenberg's own initialization is slightly more delayed than the wp.domReady in the gutenberg frontend theme, so it's attempting to unregister the block before it's yet been registered.

Last edited 19 months ago by aduth (previous) (diff)

#6 @obenland
19 months ago

In 7592:

Gutenberg: Don't unregister block until after editor initialized.

Props randerson, aduth.
See #3735.

#7 @dd32
19 months ago

In 7593:

Gutenberg: Override wp.domReady with a version which doesn't contain a race-condition, this fixes the whitescreen on frontendberg on first load.

wp.domReady() is incorrectly regisering callbacks (such as the Gutenberg init function) to be fired on DOMContentLoaded AFTER that event has already fired, causing the callbacks to never run.
This replaces it with a version which does work, calling the callback immediately when document.readyState is at interactive (which is what fires DOMContentLoaded) or complete (when styles/images/etc are loaded, which the Gutenberg wp.domReady does).

See #3703, #3735.

#8 @obenland
19 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.