[wp-trac] [WordPress Trac] #65260: Emoji detection script breaks the script modules import map in the Site Editor

WordPress Trac noreply at wordpress.org
Mon May 18 15:52:19 UTC 2026


#65260: Emoji detection script breaks the script modules import map in the Site
Editor
---------------------------+-----------------------------
 Reporter:  wildworks      |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Abilities API  |    Version:  6.9
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 When the site editor is opened by **Firefox**, an error occurs regarding
 the script module, preventing the use of the following two features. This
 issue should have potentially occurred at r60899, where the emoji loader
 was converted into a script module, which was around WordPress 6.9.

 === 1. Client-side Abilities API

 Access the Abilities API in the browser console.

 {{{
 const { registerAbilityCategory } = await import( '@wordpress/abilities'
 );
 }}}

 The following error occurs.

 {{{
 Uncaught (in promise) TypeError: The specifier “@wordpress/abilities” was
 a bare specifier, but was not remapped to anything. Relative module
 specifiers must start with “./”, “../” or “/”.
 }}}

 This means that the client-side accessibility API cannot be used in the
 site editor.

 === 2. Math Block preview

 Insert a math block and enter some mathematical formula. The following
 browser console error occurs, and the formula preview is not rendered.

 {{{
 Uncaught (in promise) TypeError: The specifier “@wordpress/latex-to-
 mathml” was a bare specifier, but was not remapped to anything. Relative
 module specifiers must start with “./”, “../” or “/”.
 }}}


 This is because the emoji loader is output as a script module within the
 head tag before the import map.

 {{{
 <html>
 <head>
 <script type="module">
 /**
  * @output wp-includes/js/wp-emoji-loader.js
  */
 </script>
 </head>
 <body>
 <script id="wp-importmap" type="importmap" crossorigin="anonymous">
 {
   "imports": {
     "@wordpress/route":           "http://localhost:8888/wp-
 content/plugins/gutenberg/build/modules/route/index.js?ver=48a77bfa70722b4254e4",
     "@wordpress/latex-to-mathml": "http://localhost:8888/wp-
 content/plugins/gutenberg/build/modules/latex-to-
 mathml/index.js?ver=e5fd3ae6d2c3b6e669da",
     "@wordpress/vips/worker":     "http://localhost:8888/wp-
 content/plugins/gutenberg/build/modules/vips/worker.min.js?ver=de1b94d254f242c2192e",
     "@wordpress/abilities":       "http://localhost:8888/wp-
 content/plugins/gutenberg/build/modules/abilities/index.js?ver=f3475bc77a30dcc5b38d"
   }
 }
 </script>
 </body>
 </html>
 }}}

 Fortunately, this issue does not occur in the post editor because the
 emoji loader is disabled there.

 https://github.com/WordPress/wordpress-
 develop/blob/5a96ff4d54a97955b02ac3c20f3ae7f21185232f/src/wp-admin/edit-
 form-blocks.php#L39-L42

 As a short-term solution, we might need to disable the emoji loader in the
 site editor as well.

 cc @westonruter @jonsurrell

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


More information about the wp-trac mailing list