[wp-trac] [WordPress Trac] #53397: Update the WordPress Packages with the Gutenberg fixes during the 5.8 beta/RC lifecycle

WordPress Trac noreply at wordpress.org
Wed Jun 30 00:39:34 UTC 2021


#53397: Update the WordPress Packages with the Gutenberg fixes during the 5.8
beta/RC lifecycle
--------------------------------------+-----------------------
 Reporter:  youknowriad               |       Owner:  (none)
     Type:  task (blessed)            |      Status:  reopened
 Priority:  normal                    |   Milestone:  5.8
Component:  Editor                    |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------

Comment (by desrosj):

 It looks like the notice is being caused by the fact that the `viewScript`
 in the `core/file` block is set to `file:./view.min.js`. When
 `register_script_handle()` is called, it checks that the file exists using
 `realpath()`, but first replaces `.js` within the `$script_path` with
 `.asset.php` ([https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/blocks.php?rev=51265#L88 see here]).

 This causes `realpath()` to return false because `view.min.asset.php` does
 not exist.

 It looks like this notice is causing many of the
 [https://wordpress.slack.com/archives/C02RQBWTW/p1625009868478000 hosting
 tests to fail], so I'd like to fix this even if temporarily.

 As I understand it, the right fix is to update the `block-library` to
 point the `core/file` block's `viewScript` to the unminified version of
 the script. But we could also fix this in Core with (even if temporarily)
 by replacing `.min.js` with `.js` prior to running the `$script_path`
 through `realpath()`.

 I've opened a PR that takes the latter route. Since `viewScript` is brand
 new and only included for the `core/file` block, I think this may be
 acceptable for the time being.

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


More information about the wp-trac mailing list