• Resolved themightyant

    (@themightyant)


    Hi I am recieveing this error on several sites with WP 5.3. ON each when I disable this Cookie Bar plugin the error disappears.

    The error is
    Notice: add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.) in /home/alixlaw1/public_html/wordpress-cms/wp-includes/functions.php on line 4903

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

    I just ran several tests on v5.3 and I can not reproduce this error. What PHP version are you using? By “disable” you mean “deactivate” the plugin I guess, is this correct?

    Thread Starter themightyant

    (@themightyant)

    Hi Thanks for the prompt response.
    I’m running 7.3 but have tested in 7.1 with the same problem. Below is a link to an image with all other plugins disabled, default theme and the problem still appearing (it is a dev site so errors are on).
    Yes, the notice goes away when Cookie Bar plugin is deactivated.

    https://www.dropbox.com/s/x4eacn57bpwv789/alp-error-cookie-bar.png

    • This reply was modified 4 years, 11 months ago by themightyant.

    After quite a bit of narrowing down it was definitely your plug-in creating the problem on one of my client sites. Here is the debug information.

    
    
    Notice: add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.) in /home/bushrasl/public_html/wp-includes/functions.php on line 4903
    
    #0 _doing_it_wrong() called at [/home/site/public_html/wp-admin/includes/plugin.php:1385] 
    #1 add_submenu_page() called at [/home/site/public_html/wp-admin/includes/plugin.php:1481] 
    #2 add_options_page() called at [/home/site/public_html/wp-content/plugins/cookie-bar/cookie-bar.php:16] 
    #3 cookie_bar_menu() called at [/home/site/public_html/wp-includes/class-wp-hook.php:288] 
    #4 WP_Hook->apply_filters() called at [/home/site/public_html/wp-includes/class-wp-hook.php:312]

    Hope that helps.

    I confirm the bug with wordpress v5.3. Cookie Bar v1.8.7 is now available which should be resolving this issue.

    Please update and let me know if you need anything further.

    Thread Starter themightyant

    (@themightyant)

    Thank you @nimonogi that solves it and @stevember for the extra info.
    Thanks for the great plugin also.
    Case closed

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Notice with WP 5.3’ is closed to new replies.