[wp-trac] [WordPress Trac] #55628: Numerous console errors on Theme/Plugin File Editor screens and syntax highlighting not working
WordPress Trac
noreply at wordpress.org
Mon May 2 15:01:46 UTC 2022
#55628: Numerous console errors on Theme/Plugin File Editor screens and syntax
highlighting not working
---------------------------------------+-------------------------
Reporter: ndiego | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.0
Component: Script Loader | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch needs-testing | Focuses: javascript
---------------------------------------+-------------------------
Comment (by jsnajdr):
I think there is a bug in `WP_Scripts::do_item`. For every script to be
printed, it does a `$this->in_default_dir()` check and if the script is in
the default dir and satisfies a few other conditions, it will be
concatenated. On encountering a script that can't be concatenated, the so-
far concatenated scripts will be printed and the processing proceeds
without concatenation.
Things go wrong when a script in default dir (like `common`) depends on a
script that's not in the default dir. Then the dependency won't be printed
correctly. And that's exactly the case with our `wp-i18n` dependency. With
Gutenberg disabled, it's in default dir and everything works. But when
Gutenberg registers its own version of `wp-i18n`, it's no longer in
default dir and the printing becomes incorrect.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55628#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list