Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#52785 closed defect (bug) (invalid)

Uncaught TypeError in media-editor.js on nav-menus.php

Reported by: aristotelisj's profile aristotelisj Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords: reporter-feedback
Focuses: Cc:

Description

WordPress 5.7

To replicate:
Create a menu item.
Add a sub menu item to the above.
Click "Select Image" and choose an image in the media library pop-up.
Click the "SELECT" button to insert the image.
The image is added to the sub menu.
Click "Save Menu"

Now, open the sub menu again
Click "Select Image" and choose an image in the media library pop-up.
NOTICE: The button for inserting the image has changed to "Insert into Post"!
Click "Insert into Post"
An error is recorded in the console and the image is NOT added.

Uncaught TypeError: Cannot read property 'value' of null

at Object.insert (media-editor.min.js?ver=5.7:formatted:315)

Change History (3)

#1 follow-up: @audrasjb
4 years ago

  • Component changed from General to Menus
  • Keywords reporter-feedback added

Hello @aristotelisj and thank you for opening this ticket,

Click "Select Image" and choose an image in the media library pop-up.
Click the "SELECT" button to insert the image.
The image is added to the sub menu.

As far as I know, there is not "Select Image" field in WordPress Core native menus. Where does it come from? Does the issue still exists on a WordPress fresh install?

Thanks

#2 in reply to: ↑ 1 @aristotelisj
4 years ago

Too right.
Further investigation shows that "Select Image" is probably added by my theme.
Furthermore, this functionality is broken by a plugin called "Product Category Tree by AWESOME TOG" which changes it to "Insert into Post" and causes the problem.
Deactivating the plugin restores the default theme functionality.
Please close this ticket.

#3 @audrasjb
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the feedback 👍

Note: See TracTickets for help on using tickets.