[wp-trac] [WordPress Trac] #59090: Twenty Twenty: 'Uncaught TypeError' when unregistering the squared button block style

WordPress Trac noreply at wordpress.org
Sun Aug 13 06:44:44 UTC 2023


#59090: Twenty Twenty: 'Uncaught TypeError' when unregistering the squared button
block style
---------------------------+-----------------------------
 Reporter:  poena          |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:  6.3
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 In WordPress 6.3.0 when the iframe is used in the block editor, there is a
 JavaScript error:

 {{{
 editor-script-block.js?ver=2.2:7 Uncaught TypeError: wp.domReady is not a
 function
 }}}

 This error does not happen in earlier versions of WordPress or when the
 block editor does not use the iframe, for example, when there is a plugin
 active that uses meta boxes.


 editor-script-block.js is used to unregister the squared button block
 style, which was removed in WordPress version 5.3.

 To find the version, I looked at the Gutenberg pull request
 https://github.com/WordPress/gutenberg/pull/17253
 and this list:
 https://developer.wordpress.org/block-editor/contributors/versions-in-
 wordpress/


 There is no point in the theme unregistering the non-existing style in
 WordPress 5.3 or newer, so the file should be loaded conditionally
 depending on the WordPress version.


 Steps to reproduce:
 1) Activate Twenty Twenty
 2) Open the block editor
 3) Open the console in the browser developer tools and confirm if there is
 a JavaScript error.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59090>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list