Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48620 closed defect (bug) (invalid)

Javascript error when opening file uploader inside the editor

Reported by: rogeriomoreira's profile rogeriomoreira Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3
Component: Media Keywords:
Focuses: accessibility, javascript Cc:

Description

I updated one of my WordPress installations to version 5.3 and I'm getting a Javascript error.

Steps to reproduce:

  1. Create a new post
  2. Go to Select or Upload Media button
  3. Click on Upload Media

When I click Upload Media, the click generates the following error:

https://i.imgur.com/ms19jG5.png

From my initial investigation, it seems that it is related to the accessibility improvements made on version 5.3.
I also made a test with the JS files from version 5.2.4 and everything works as expected, so it was some change introduced on 5.3.

Attachments (1)

add media.png (20.5 KB) - added by afercia 5 years ago.
Default Add Media button in the Classic Editor

Download all attachments as: .zip

Change History (10)

#1 @rogeriomoreira
5 years ago

Just on additional note: the site is using the Classic Editor.

#2 follow-up: @afercia
5 years ago

  • Keywords reporter-feedback added

@rogeriomoreira thanks for your report! I wasn't able to reproduce on a standard WordPress 5.3 installation. Also, I'm not sure about the steps to follow:

Go to Select or Upload Media button
Click on Upload Media

There's no "Select or Upload Media" button in the core Classic Editor. Instead, there's the "Add Media" button. Are you using a plugin that alters the editor or media modal by any chance?

Can you confirm that the bug still exists with the default theme activated and all other plugins deactivated?

@afercia
5 years ago

Default Add Media button in the Classic Editor

#3 @SergeyBiryukov
5 years ago

Related/duplicate: #48604

#4 in reply to: ↑ 2 @rogeriomoreira
5 years ago

Thanks for replying @afercia.

I said the Select or Upload Media button because I translated it directly from the portuguese version. I also don't have any installed plugins interfering with the Media Modal.

I will test this further today.

Replying to afercia:

@rogeriomoreira thanks for your report! I wasn't able to reproduce on a standard WordPress 5.3 installation. Also, I'm not sure about the steps to follow:

Go to Select or Upload Media button
Click on Upload Media

There's no "Select or Upload Media" button in the core Classic Editor. Instead, there's the "Add Media" button. Are you using a plugin that alters the editor or media modal by any chance?

Can you confirm that the bug still exists with the default theme activated and all other plugins deactivated?

#5 @afercia
5 years ago

@rogeriomoreira thanks for the clarification. One more thing to check: clear your browser cache completely :) Modern browsers tend to hold onto old JavaScript files after updates.

This ticket was mentioned in Slack in #core-media by sergey. View the logs.


5 years ago

#7 @azaozz
5 years ago

@rogeriomoreira This looks like an error with Backbone, possibly caused by either stale cache or a plugin that extends the "media view".

Could you add define( 'SCRIPT_DEBUG', true ); to your wp-config.php file. That will load the non-minified js files and produce a better "error trace" so the problem can be pinpointed.

#8 @rogeriomoreira
5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

It was a plugin conflict. Thank you all for your help.

#9 @SergeyBiryukov
5 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted

Thanks for the follow-up!

Note: See TracTickets for help on using tickets.