• Resolved Raghav

    (@mraghavboob)


    Hii Team,

    I Installed WP Custom Admin Interface plugin but admin menu is not working. Even Default admin menu is not visible

    I think there might be some java script error :

    Log from google console:

    load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:5 JQMIGRATE: Migrate is installed, version 3.4.1
    admin.php:2240 Third-party cookie will be blocked. Learn more in the Issues tab.
    admin.php:2240 Third-party cookie will be blocked. Learn more in the Issues tab.
    load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2 jQuery.Deferred exception: Cannot read properties of null (reading 'indexOf') TypeError: Cannot read properties of null (reading 'indexOf')
        at removeNotificationsFromLabels (https://realmydomain.com/wp-content/plugins/wp-custom-admin-interface/inc/options/options-page-admin-menu.js?ver=7.34:169:37)
        at renderAdminMenuManager (https://realmydomain.com/wp-content/plugins/wp-custom-admin-interface/inc/options/options-page-admin-menu.js?ver=7.34:218:49)
        at HTMLDocument.<anonymous> (https://realmydomain.com/wp-content/plugins/wp-custom-admin-interface/inc/options/options-page-admin-menu.js?ver=7.34:240:5)
        at e (https://realmydomain.com/wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2:27028)
        at t (https://realmydomain.com/wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2:27330) undefined
    ce.Deferred.exceptionHook @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    t @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    setTimeout (async)
    (anonymous) @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    c @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fireWith @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fire @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    c @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fireWith @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    ready @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    P @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2 Uncaught TypeError: Cannot read properties of null (reading 'indexOf')
        at removeNotificationsFromLabels (options-page-admin-menu.js?ver=7.34:169:37)
        at renderAdminMenuManager (options-page-admin-menu.js?ver=7.34:218:49)
        at HTMLDocument.<anonymous> (options-page-admin-menu.js?ver=7.34:240:5)
        at e (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2:27028)
        at t (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2:27330)
    removeNotificationsFromLabels @ options-page-admin-menu.js?ver=7.34:169
    renderAdminMenuManager @ options-page-admin-menu.js?ver=7.34:218
    (anonymous) @ options-page-admin-menu.js?ver=7.34:240
    e @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    t @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    setTimeout (async)
    ce.readyException @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    (anonymous) @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    e @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    t @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    setTimeout (async)
    (anonymous) @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    c @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fireWith @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fire @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    c @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fireWith @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    t @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    setTimeout (async)
    (anonymous) @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    c @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fireWith @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fire @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    c @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    fireWith @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    ready @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    P @ load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.4.3:2
    

    Please check and Help.

    Screenshot : https://paste.pics/3c4f0139481d853fb8b2db46db03576a

    Let me know, If site access is required to check, Please give your mail ID Will send you temporary access to the site on mail.

    • This topic was modified 1 year ago by Raghav.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @mraghavboob,

    I am not sure what specifically might be the issue here. But I can recommend 2 things. Firstly, try deleting the settings for the admin menu. This can be done by going to: Custom Admin Interface > Manage Settings. Then click “Delete Plugin Settings” and then select “Admin Menu” and then “Delete Settings”. If that doesn’t work, can you please try deactivating all other plugins except ours as there might be a plugin conflict. You can slowly re-activate plugins to see which one might be the culprit.

    Please note, as per the forum rules, we can’t exchange login information or other details. Even if we could do this, my level of support for the free plugin is limited.

    Thanks,

    Thread Starter Raghav

    (@mraghavboob)

    I found out solutions, may be this is temporary.

    Original Error :

    //File name
    
    wp-custom-admin-interface/inc/options/options-page-admin-menu.js
     
    
    //this function is required to remove notification numbers from labels
    function removeNotificationsFromLabels (input){
    //declare the input
    var originalText = input;
    //check to see if a span exists as this means there's a number
    if(originalText.indexOf('<span') !== -1) {
    //find the position of the span and lets get just the content before the span
    var positionOfSpan = originalText.indexOf('<span');
    return originalText.substr(0,positionOfSpan-1);
    } else {
    //otherwise just leave the text how it is
    return originalText;
    }
    }

    In above code there is below error

    TypeError: Cannot read properties of null (reading 'indexOf')

    I add one condition so now it is working

    if(originalText!== null){
    //check to see....
    ....  
    }

    Final Code :

    function removeNotificationsFromLabels (input){
                        //declare the input
                        var originalText = input;
    					
    					if(originalText!== null){
                        //check to see if a span exists as this means there's a number
                        if(originalText.indexOf('<span') !== -1) {
                            //find the position of the span and lets get just the content before the span
                            var positionOfSpan = originalText.indexOf('<span');
                            return originalText.substr(0,positionOfSpan-1); 
                        } else {
                            //otherwise just leave the text how it is
                            return originalText;
                        }
                    }
    				}

    Please update this plugin in your next update.

    Thank you..

    Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @mraghavboob,

    Good job working that out on your own! It saves me a lot of time, I appreciate it ??

    There must be something unique about your menu for this issue to occur, as otherwise this issue would have arisen a long time ago. I have implemented a solution for this and it will be out in the next release.

    Thanks,

    I have the same problem!

    Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @nikoslefkas,

    Can you please create a new support request for your issue. Because I already released a fix for this. Thanks,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Admin Menu not working’ is closed to new replies.