[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
Tue May 3 07:13:39 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 costdev):
@jsnajdr What are your thoughts on a possible solution to this?
Here are some that come to mind:
- We modify `WP_Scripts::do_item()` to allow the registration of custom
versions of dependencies.
- We add a check specifically for Gutenberg.
- e.g. This removes the errors.
{{{#!php
// src/wp-includes/class.wp-scripts.php:338
$is_gutenberg_script = str_contains( $srce, plugins_url(
'gutenberg/build/' ) );
if ( $is_gutenberg_script || ( $this->in_default_dir( $srce ) && (
$before_handle || $after_handle || $translations ) ) ) {
$this->do_concat = false;
// Have to print the so-far concatenated scripts right away to
maintain the right order.
_print_scripts();
$this->reset();
}}}
- We revert one of the changes in [52937] - this is what
[https://core.trac.wordpress.org/attachment/ticket/55628/55628.revert-52937
-for-testing-do-not-commit.diff 55628.revert-52937-for-testing-do-not-
commit.diff] does.
I'm sure there are other options available to us, but I'm also mindful
that we're going into RC. Would it be prudent, or not, to commit
[https://core.trac.wordpress.org/attachment/ticket/55628/55628.revert-52937
-for-testing-do-not-commit.diff 55628.revert-52937-for-testing-do-not-
commit.diff] until such time as we resolve the investigation and solution
to the `WP_Scripts::do_item()` issue?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55628#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list