[wp-trac] [WordPress Trac] #55311: Style and JS URLs for some blocks are broken when using WP outside of the current prefix

WordPress Trac noreply at wordpress.org
Fri Mar 4 09:43:51 UTC 2022


#55311: Style and JS URLs for some blocks are broken when using WP outside of the
current prefix
---------------------------+------------------------------
 Reporter:  pgpagely       |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  5.9.1
 Severity:  major          |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by pgpagely):

 An additional finding is that if the `gutenberg` plugin is enabled then
 the following hack is needed so that the `view.min.js` URL is not broken
 (with `gutenberg` disabled only the hack in the original message is
 needed):

 {{{#!php
 add_filter("script_loader_src", function ($src) {
     return preg_replace("#/wp-includes/wordpress-versions/[0-9.]+/#", "/",
 $src);
 });
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55311#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list