Support » Fixing WordPress » no longer able to edit menu items

  • I have today gone into my site to edit the menus, and found I am unable to edit my menus. If I click on any menu item, nothing happens, I cannot access any of the settings, they do not expand/collapse. Also the “all items, search” tabs do not work either.
    I can add a new item to the menu, and that new item works, it will expand/collapse etc.

    I have already tried the following.

    1. used different browsers, with cache cleared etc
    2. disabled all plugins
    3. tried different theme

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi lordsnake

    Did you install any updates since the menu editing feature worked last time?
    Have you tried to update or manually reinstall WordPress?
    You can choose to ‘reinstall Now’ under Dashboard > Updates.
    Let me know how you’re getting on.

    It turned out to be the theme, or rather the fault of the theme support guy.
    In a previous ticket he had told me to do this.


    If you are using a child theme you need add this to your child theme functions.php :

    wp_deregister_script( ‘customjs’ );
    wp_enqueue_script( ‘customjs’, get_stylesheet_directory_uri() .’/js/customjs.js’, array( ‘jquery’ ), false, true );

    which is causing this error


    Notice: wp_deregister_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /www/wp-includes/functions.php on line 4138 Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /www/wp-includes/functions.php on line 4138
    —-

    I’m glad you figured out where the problem lies. Did you manage to get it sorted then?

    There is some information on the correct use of wp_enqueue_script:
    https://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts

    sadly no reply from the theme developer yet.

    To fix an issue, I was told to copy the custom.js to the child theme, and then add the fix code to it.
    I was then told to do as mentioned in the last post to tell WP to use the custom.js from the child theme instead.
    Even though it worked, Presumably it is not the correct way to do it being as it is causing that error and breaking my admin.

    Hi @lordsnake

    Try this in your child theme’s functions.php:

    function my_custom_scripts() {
    wp_dequeue_script( 'customjs' );
    wp_deregister_script( 'customjs' );
    wp_enqueue_script( 'customjs', get_stylesheet_directory_uri() .'/js/customjs.js', array( 'jquery' ), '1.0' );
    }
    add_action( 'wp_enqueue_scripts', 'my_custom_scripts' );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘no longer able to edit menu items’ is closed to new replies.