• Resolved brittanyio

    (@brittanyio)


    Since upgrading to WordPress 5.3, this plugin is throwing the following error:
    Notice: add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position.

Viewing 10 replies - 1 through 10 (of 10 total)
  • jhwwp

    (@jhwwp)

    Same issue.

    jhwwp

    (@jhwwp)

    Changing line 48 in admin-ui.php from

    $hook = add_management_page( 'Keyring', 'Keyring', 'read', 'keyring', array( $this, 'admin_page' ), '' );

    to

    $hook = add_management_page( 'Keyring', 'Keyring', 'read', 'keyring', array( $this, 'admin_page' ), null );

    appears to clear it. The last parameter needs to be an integer or null.

    Plugin Author Beau Lebens

    (@beaulebens)

    Thanks for the report brittanyio, and for the fix jhwwp.

    I’ve added that as an issue here; https://github.com/beaulebens/keyring/issues/55 and am hoping to get some time to address a few of those this week.

    Plugin Author Beau Lebens

    (@beaulebens)

    jhwwp

    (@jhwwp)

    Thanks, Beau! And thank you for the great plugin.

    Hello,

    Apologies if this is not the correct place to ask this question.

    I am also having this error on my website and I can see your solution above.

    I work for a small charity and I update our website, however I’m not an expert in webdev.

    I was wondering if you could explain how I am able to fix this using your solution above so I can remove this error.

    Many thanks,

    Emily

    Thread Starter brittanyio

    (@brittanyio)

    Emily, you will need to edit code to fix this. You will need to find the file admin-ui.php in the keyring folder in your plugins folder. wp-content/plugins/keyring/admin-ui.php. And you will need to replace line 48 as detailed above. If you are not comfortable editing code, you will need to ask a web developer to do this for you.

    Plugin Author Beau Lebens

    (@beaulebens)

    You can also just replace that entire file with a copy from here; https://raw.githubusercontent.com/beaulebens/keyring/master/admin-ui.php if that’s easier.

    I need to get another official release of the plugin out, then you’ll be able to just click “update” in wp-admin.

    A happy new year ??
    In my case I do not have a plugin named “keyring”. But the issue apears annyway. What can I do?

    Thread Starter brittanyio

    (@brittanyio)

    @geddi this seems to be a common bug coming into WordPress 5.3. It’s being caused by one of your plugins. If you’re not sure which one, deactivate each plugin one by one until the problem disappears, then you know which one it is. Then you can reach out to that plugin developer for a solution.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Notice: add_submenu_page was called incorrectly’ is closed to new replies.