• WordPress 5.7 with Goya theme.
    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)`

    Further investigation shows that “Select Image” is probably added by my theme.
    Furthermore, this functionality is broken by “Product Category Tree” which changes it to “Insert into Post” and causes the problem.
    Deactivating the plugin restores the default theme functionality.

  • The topic ‘Uncaught TypeError in media-editor.js on nav-menus.php’ is closed to new replies.