WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#52785 closed defect (bug) (invalid)

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

Reported by: 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
7 months 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
7 months 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
7 months 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.