[wp-meta] [Making WordPress.org] #6195: Quick Edit and other JS broken on .org

Making WordPress.org noreply at wordpress.org
Wed Mar 16 10:04:35 UTC 2022

#6195: Quick Edit and other JS broken on .org
 Reporter:  tobifjellner  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:
Component:  General       |  Resolution:
 Keywords:                |

Comment (by youknowriad):

 Ok, so here’s what I found so far:

 In Core, there’s this function call https://github.com/WordPress
 includes/script-loader.php#L260 I think the intent of the 1 (last
 argument) is to register the script in the footer like Gutenberg, but the
 reality is that it’s misused, this 1 argument at the end doesn’t do
 anything IMO (the last argument is supposed to be an array).

 In Gutenberg we correctly set the scripts to load in the footer. Meaning
 in core scripts are in the header, in Gutenberg they are in the footer
 causing the issue. I’m not sure yet how it’s related to the commit about
 empty translations but it’s this difference in script registration that
 triggers the error.

 A simple fix could be to just load the scripts in the header in Gutenberg
 (like core) but that won’t solve the root of the issue. Ideally I guess
 core should load the scripts in the footer, but I suspect that if we do
 this change in Core, we’d break the translations similar to when using the
 gutenberg plugin.

Ticket URL: <https://meta.trac.wordpress.org/ticket/6195#comment:8>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list