Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48071 closed defect (bug) (fixed)

Can't install plugins on trunk due to 'Cannot read property speak of undefined'

Reported by: garrett-eclipse's profile garrett-eclipse Owned by: afercia's profile afercia
Milestone: 5.3 Priority: high
Severity: major Version: 5.3
Component: Script Loader Keywords: has-patch has-screenshots
Focuses: accessibility, javascript Cc:

Description (last modified by SergeyBiryukov)

Hello,

On a clean install of trunk I'm no longer able to install plugins due to a11y speak property not defined.

The error is related to this line;
https://github.com/WordPress/wordpress-develop/blob/c957e2573e7911c772ec85eb9f339ee34a9fd470/src/js/_enqueues/wp/updates.js#L563
*But I assume affects all speak commands in the script.

Error in js console;

Uncaught TypeError: Cannot read property 'speak' of undefined
    at Object.b.updates.installPlugin (load-scripts.php?c=1&load[chunk_0]=hoverIntent,common,admin-bar,jquery-ui-core,thickbox,plugin-install,underscore,wp-util,wp-sanitize,wp-a11y,updates,svg-painter&ver=5.3-alpha-20190919.002339:359)
    at HTMLAnchorElement.<anonymous> (load-scripts.php?c=1&load[chunk_0]=hoverIntent,common,admin-bar,jquery-ui-core,thickbox,plugin-install,underscore,wp-util,wp-sanitize,wp-a11y,updates,svg-painter&ver=5.3-alpha-20190919.002339:359)
    at HTMLFormElement.dispatch (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.3-alpha-20190919.002339:3)
    at HTMLFormElement.r.handle (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.3-alpha-20190919.002339:3)
b.updates.installPlugin @ load-scripts.php?c=1&load[chunk_0]=hoverIntent,common,admin-bar,jquery-ui-core,thickbox,plugin-install,underscore,wp-util,wp-sanitize,wp-a11y,updates,svg-painter&ver=5.3-alpha-20190919.002339:359
(anonymous) @ load-scripts.php?c=1&load[chunk_0]=hoverIntent,common,admin-bar,jquery-ui-core,thickbox,plugin-install,underscore,wp-util,wp-sanitize,wp-a11y,updates,svg-painter&ver=5.3-alpha-20190919.002339:359
dispatch @ load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.3-alpha-20190919.002339:3
r.handle @ load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.3-alpha-20190919.002339:3
00:39:55.057 

I believe this is related to the commit today - [46169]
Related Ticket - #45066

Attachments (3)

Screen Shot 2019-09-19 at 12.44.59 AM.png (152.3 KB) - added by garrett-eclipse 5 years ago.
Install is stuck on the ajax-loader gif
48071.diff (625 bytes) - added by sstoqnov 5 years ago.
Remove wp-a11y from script-loader.php
237ae944b2bbdc30437ac12f8fd08a81.gif (3.1 MB) - added by garrett-eclipse 5 years ago.
Illustrating remaining issue with install on popup. Note: no error in js console for this issue.

Change History (14)

@garrett-eclipse
5 years ago

Install is stuck on the ajax-loader gif

#1 @SergeyBiryukov
5 years ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 5.3
  • Priority changed from normal to high
  • Severity changed from normal to major

@sstoqnov
5 years ago

Remove wp-a11y from script-loader.php

#2 @sstoqnov
5 years ago

The wp-a11y script is still loaded in wp-includes/script-loader.php.

In [46167] and [46169] this change is not merged, but it exists in https://core.trac.wordpress.org/attachment/ticket/45066/45066.8.diff

It's my fault. Sorry for the mess with these gazillion patches

Version 1, edited 5 years ago by SergeyBiryukov (previous) (next) (diff)

#3 @garrett-eclipse
5 years ago

Thanks @sstoqnov testing the patch it fixed the issue on the install boxes. But on the popup modal for More Details the Install Now doesn't seem to trigger. Creating screen

@garrett-eclipse
5 years ago

Illustrating remaining issue with install on popup. Note: no error in js console for this issue.

#4 @afercia
5 years ago

@garrett-eclipse "Install now" from the modal works for me. Can you try npm install && grunt build after applying the patch?

#5 @sstoqnov
5 years ago

It works for me too

#6 @garrett-eclipse
5 years ago

  • Keywords has-patch commit has-screenshots added

Thanks for your patience @afercia & @sstoqnov took me some time to sort that. I'm running MAMP on 8888 so my URL was localhost:8888/48071 and apparently the _parent frameception that goes into the modal install doesn't fly on localhost. I bundled up my install and moved it to a server and everything worked as expected.

The patch looks good to commit.

Is the issue with installing plugins on localhost (MAMP) worth another ticket (one less major)?

#7 follow-up: @afercia
5 years ago

  • Component changed from Upgrade/Install to Script Loader

@garrett-eclipse not an expert but it may be because of browsers restrictions? Not sure the plugin details modal is supposed to work from localhost because of the iframe?

Going to commit this.

#8 @afercia
5 years ago

  • Owner set to afercia
  • Resolution set to fixed
  • Status changed from new to closed

In 46179:

Script Loader: Remove old wp-a11y from the loaded scripts after [46167] and [46169].

Props garrett-eclipse, sstoqnov.
See #45066.
Fixes #48071.

#9 @afercia
5 years ago

  • Keywords commit removed

#10 @SergeyBiryukov
5 years ago

In 46180:

Tests: Update unit tests to account for the removal of old wp-a11y from the loaded scripts in [46179].

Props sstoqnov.
See #45066, #48071.

#11 in reply to: ↑ 7 @garrett-eclipse
5 years ago

Thanks @afercia / @sstoqnov / @SergeyBiryukov I appreciate you all jumping on this to resolve.

Replying to afercia:

@garrett-eclipse not an expert but it may be because of browsers restrictions? Not sure the plugin details modal is supposed to work from localhost because of the iframe?

Appreciated, I'm not too concerned now that I'm aware but added #48077 to make it known and maybe someone knows how those limitations work.

Note: See TracTickets for help on using tickets.