Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#49457 closed defect (bug) (invalid)

wp-admin javascript issues after update to 5.3.2

Reported by: pegla Owned by:
Priority: normal Milestone:
Component: Media Version: 5.3.2
Severity: normal Keywords:
Cc: Focuses: javascript, administration

Description

Hi,
I believe there's an issue with media-library/theme customizer specifically with 2 files on lines (I turned on script debugger and these are unminified files):

- line 207 in media-audiovideo.js
Uncaught TypeError: wp.media.collection is not a constructor

wp.media.playlist = new wp.media.collection({

- line 602 in media-grid.js

Uncaught TypeError: Cannot read property ‘extend’ of undefined

Details = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{
// ....

I initially thought this as theme error or server error but my guys from Mochahost said all is good on their end specially since this is Javascript error. And I did fresh wordpress install and update - 0 plugins 0 themes it still happens. Also tried different browsers, Firefox, IE, Edge and Chrome...

I tried some javascript hacking did some workarounds - but none of it worth mentioning - except from debugging I found out that:
'collection' doesn't exist on wp.media at all and even when I wrapped it in setTimeout for few seconds it's still wasn't there. I also tried accessing objects directly from window.wp.media/window.wp.media.view.EditImage -> no luck there
I'm not good with backbone and these files are webpack build so it's bit hard to figure out what's wrong.

I filed a support questions here:
​https://wordpress.org/support/topic/media-library-not-working-26/
​https://wordpress.org/support/topic/wordpress-5-3-2-javascript-errors/

I'm using PHP 7.3 and I tried with 5.6 same thing happens - fix for now would be to downgrade to WordPress 5.2.5 where it also happens but media library and appearance/customizer seem to work fine with this error:
Uncaught TypeError: wp.media.collection is not a constructor

Main issue is that this is happening when I update my websites - and it's on all of them. I usually build wordpress sites and when I give access to admin to clients they update wordpress to get latest security updates - I now need to tell them not to update and if they do update I will need to revert back versions and hopefully they won't break anything.

Anyone interested I can share more details or access for the site to check it up.

Thanks,

Attachments (4)

error_on_wp_admin_luckproject.png​ (76.9 KB ) - added by pegla 7 years ago.
backend error on second site - no plugins - no themes - basic stuff only - fresh installation
error_luckproject2.png​ (128.9 KB ) - added by pegla 7 years ago.
error on customizer - no custom themes - no plugins
error_on_customizer_mushrom_errorsame_as_luck.png​ (20.9 KB ) - added by pegla 7 years ago.
First site error found on empty customizer - errors are same as on the luck project .png file
with_theme_error_on_wpbakery_related_mushroom.png​ (384.1 KB ) - added by pegla 7 years ago.
this is with wp_bakery plugin from where you can't access media library - same error plus one more I assume derivated from this error. Even if I used /wp-admin/upload.php?mode=list to workaround error on media library this one still apears.

Download all attachments as: .zip

Change History (8)

@pegla
7 years ago

backend error on second site - no plugins - no themes - basic stuff only - fresh installation

@pegla
7 years ago

error on customizer - no custom themes - no plugins

@pegla
7 years ago

First site error found on empty customizer - errors are same as on the luck project .png file

@pegla
7 years ago

this is with wp_bakery plugin from where you can't access media library - same error plus one more I assume derivated from this error. Even if I used /wp-admin/upload.php?mode=list to workaround error on media library this one still apears.

#1 @SergeyBiryukov
7 years ago

  • Component Administration → Media
  • Focuses javascript added

#2 @SergeyBiryukov
7 years ago

  • Focuses administration added

#3 @pegla
7 years ago

  • Resolution → wontfix
  • Status new → closed

If someone gets this same issue - try asking your hosting to update MYSQL - I didn't realize DB can actually be culprit, sorry for raising bug.

#4 @SergeyBiryukov
7 years ago

  • Keywords needs-patch dev-feedback removed
  • Milestone Awaiting Review
  • Resolution wontfix → invalid
  • Severity blocker → normal

No worries, thanks for the follow-up!

Note: See TracTickets for help on using tickets.