PHP Notice: add_submenu_page

#114053
  • Hi,

    Landed here to report the issue:
    WooCommerce version: 4.7.1
    WordPress version: 5.5.3
    Instant Indexing by Rank Math – 1.0.0

    [30-Nov-2020 08:46:17 UTC] PHP Notice: add_submenu_page was called <strong>incorrectly</strong>. The seventh parameter passed to <code>add_submenu_page()</code> should be an integer representing menu position. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.3.0.) in [path]\wp-includes\functions.php on line 5229

    This notice is definitely linked to this plugin!

    Please review and guide / fix.

    Thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hello,

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    If the issue persists, please record a video screencast using a tool like Loom showing the troubleshooting and edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Please do take a complete backup of your website before sharing the information with us.

    We really look forward to helping you.

    @Michael Davis It is simple. You do NOT need access to check this.

    Activate this plugin and the notice appears, deactivate this plugin and the notice is no longer seen!

    Please see others who have reported the same thing!
    https://wordpress.org/support/topic/notif-error-functions-php-on-line-5225/

    Incidentally, add_submenu_page appears in your code below:

    [path]\wp-content\plugins\fast-indexing-api\includes\class-instant-indexing.php (3 hits)
    	Line 379: 			$this->dashboard_menu_hook_suffix = add_submenu_page( 'instant-indexing-dashboard', 'Rank Math', __( 'Dashboard', 'fast-indexing-api' ), apply_filters( 'rank_math/indexing_api/capability', 'manage_options' ), 'instant-indexing-dashboard', array( $this, 'show_dashboard' ), 'none', 76 );
    	Line 380: 			$this->menu_hook_suffix           = add_submenu_page( 'instant-indexing-dashboard', __( 'Instant Indexing', 'fast-indexing-api' ), __( 'Instant Indexing', 'fast-indexing-api' ), apply_filters( 'rank_math/indexing_api/capability', 'manage_options' ), 'instant-indexing', array( $this, 'show_admin_page' ) );
    	Line 384: 		$this->menu_hook_suffix = add_submenu_page( 'rank-math', __( 'Instant Indexing', 'fast-indexing-api' ), __( 'Instant Indexing', 'fast-indexing-api' ), apply_filters( 'rank_math/indexing_api/capability', 'manage_options' ), 'instant-indexing', array( $this, 'show_admin_page' ) );

    Thanks

    Hello,

    Could you please update to the latest version of Rank math and let us know if this issue persists?

    Looking forward to helping you. Thank you.

    Hi,

    I am referring to this plugin:

    https://wordpress.org/plugins/fast-indexing-api/

    This DOES NOT require Rank Math to be installed.

    The original reported issue is NOT fixed as yet.

    Can you please check again?

    Hello,

    Where are you having the notice appear?

    I have deactivated and activated the plugin on my site but I can’t replicate this. Here is a screencast from my test site: https://i.rankmath.com/iaU43k

    Looking forward to helping you.

    Hi,

    For some reason you are NOT reading my replies!

    Your screencast shows that you HAVE Rank Math / Rank Math SEO Pro plugin installed and active.

    I do NOT have Rank Math plugin installed and active. As this plugin Instant Indexing DOES NOT REQUIRE Rank Math. Please see the FIRST FAQ on the plugin page: https://wordpress.org/plugins/fast-indexing-api/

    Hence in my plugin section there is no Rank Math

    When I activate Instant Indexing I get the notice

    I hope you will understand better this time and take steps to fix the issue!

    Thanks

    Hello,

    Thank you for keeping in touch with us and we do apologize for the inconvenience that might have caused you.

    Let’s try to do some troubleshooting on your end.

    1. Have you tried disabling all the plugins except Instant Indexing? If not yet, please do try and see if the issue disappears. If so, you might need to check each plugin until you find the culprit causing the error. Also, do make sure all your plugins and themes are in the latest version as mentioned by my colleague.

    2. Try to use the default WordPress plugin (Twenty-Twenty or Twenty-Twenty-One) and try to activate Instant Indexing.

    3. Please reinstall and reconfigure the plugin making sure you follow our guideline here: https://rankmath.com/blog/google-indexing-api/. It is very likely that you missed a step and didn’t follow the instructions correctly. We request you to check each step and follow the guide religiously.

    If the troubleshooting tips above do not solve your issue. It would be really helpful for us if you share your admin login so that we can further check your issue.

    We are looking forward to helping you.

    @Jeremy

    While I will ALSO try the steps give by you as well!

    I have a SIMPLE question for you / your team:

    Has ANYONE of you TRIED to use this plugin WITHOUT Rank Math plugin installed / activated?

    Specially AFTER me mentioning this SO MANY TIMES HERE?

    I am really curious to know the answer to this!!!

    Hello,

    You had not mentioned not having Rank math installed. Your steps to replicate the issue are:

    You do NOT need access to check this.

    Activate this plugin and the notice appears, deactivate this plugin and the notice is no longer seen!

    That said, I activated | deactivated | activated the plugin, this time without Rank math and I still can’t replicate the issue, here is a screencast: https://i.rankmath.com/LbjcOv

    If it still seems I am missing something, sharing a screencast from your end would save us all the time in trying to replicate the issue.

    Looking forward to helping you

    Hi,

    Looks like there is some major communication gap here!

    About not reporting correctly:

    You had not mentioned not having Rank math installed.

    Please see:
    1. https://support.rankmath.com/ticket/php-notice-add_submenu_page/

    WooCommerce version: 4.7.1
    WordPress version: 5.5.3
    Instant Indexing by Rank Math – 1.0.0

    2. https://support.rankmath.com/ticket/php-notice-add_submenu_page/#post-120802

    This DOES NOT require Rank Math to be installed.

    Any ways, please see screenshots from a FRESH Install of WordPress with TwentyTwentyOne Theme and debug.log enabled on my local installation

    1. See existing plugin list. No Rank Math installed

    2. Install Instant Indexing for Google plugin

    3. Activate Instant Indexing for Google plugin and see PHP Notice

    4. DEACTIVATE Instant Indexing for Google plugin and see PHP Notice is GONE

    Let me know in case you require any additional information

    Thanks

    Hello,

    Thank you for providing the screenshot so that we can further replicate your issue. I tried replicating the issue on my end with the very exact plugins installed and I don’t have the error message in my end.

    Please see this screenshot:
    https://i.rankmath.com/dTHk0C

    Can you please disable the WP debug mode and see if the error disappears?

    If the issue persists, we do need to check your WP admin so that we can identify what’s causing this problem.

    Thank you and we are looking forward to helping you.

    Hello,

    Just to add on this, which PHP version are you using?

    You can also activate free rank math and share/paste the data from here:
    WP Dashboard > Rank Math > Status & Tools > System Status and click the Copy System Info to Clipboard button
    system info

    We really look forward to helping you.

    Hello,

    Since I can’t replicate the issue and you are not okay with sharing your site access, please try the following:

    1. Install and activate Rank math on your site.

    2. Delete, re-install and activate the indexing plugin and check if the issue appears. Make sure you follow our guideline here: https://rankmath.com/blog/google-indexing-api/.

    3. Once done, you can deactivate and delete Rank math from your site.

    It might be related to the plugin trying to hook to Rank math submenu which doesn’t exist in your site.

    Let us know if this fixes the issue. Thank you

    @Jeremy

    Can you please disable the WP debug mode and see if the error disappears?

    Of course, the PHP Notice WOULD disappear if I disable WP Debug. The idea of keeping WP Debug enabled is to identify such issues.

    Did YOU check with WP Debug log ENABLED as done by me? and CLEARLY mentioned


    @Michael
    Davis

    Just to add on this, which PHP version are you using?

    I am on PHP version 7.3.24 (Supports 64bit values)

    I do not need to install Rank Math for this. Anyone can get this info using the built in Site Health Info tab.

    Please let me know in case you require anything else from me!

    I am really curious how much longer will this conversation prolong until you identify the issue with the plugin AND THEN try to fix it!

    Site Info:

    
    ### wp-core ###
    
    version: 5.6
    site_language: en_US
    user_language: en_US
    timezone: Asia/Kolkata
    permalink: /%postname%/
    https_status: false
    multisite: false
    user_registration: 0
    blog_public: 0
    default_comment_status: undefined
    environment_type: production
    user_count: 1
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: F:\laragon\www\TwentyTwentyOne
    wordpress_size: 43.22 MB (45318050 bytes)
    uploads_path: F:\laragon\www\TwentyTwentyOne/wp-content/uploads
    uploads_size: 0.00 B (0 bytes)
    themes_path: F:\laragon\www\TwentyTwentyOne/wp-content/themes
    themes_size: 5.06 MB (5305014 bytes)
    plugins_path: F:\laragon\www\TwentyTwentyOne/wp-content/plugins
    plugins_size: 12.18 MB (12767321 bytes)
    database_size: 2.09 MB (2195456 bytes)
    total_size: 62.55 MB (65585841 bytes)
    
    ### wp-active-theme ###
    
    name: Twenty Twenty-One (twentytwentyone)
    version: 1.1
    author: the WordPress team
    author_website: https://wordpress.org/
    parent_theme: none
    theme_features: core-block-patterns, automatic-feed-links, title-tag, post-formats, post-thumbnails, menus, html5, custom-logo, customize-selective-refresh-widgets, wp-block-styles, align-wide, editor-styles, editor-style, editor-font-sizes, custom-background, editor-color-palette, editor-gradient-presets, responsive-embeds, custom-line-height, experimental-link-color, custom-spacing, custom-units, widgets
    theme_path: F:\laragon\www\TwentyTwentyOne/wp-content/themes/twentytwentyone
    auto_update: Disabled
    
    ### wp-themes-inactive (1) ###
    
    Twenty Twenty: version: 1.6, author: the WordPress team, Auto-updates disabled
    
    ### wp-plugins-active (1) ###
    
    Mailhog for WordPress: version: 1.0, author: Tareq Hasan, Auto-updates disabled
    
    ### wp-plugins-inactive (2) ###
    
    Instant Indexing: version: 1.0.0, author: Rank Math, Auto-updates disabled
    Post SMTP: version: 2.0.16, author: Yehuda Hassine, Auto-updates disabled
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1799
    imagemagick_version: ImageMagick 7.0.7-11 Q16 x64 2017-11-23 http://www.imagemagick.org
    file_uploads: File uploads is turned off
    post_max_size: 2G
    upload_max_filesize: 2G
    max_effective_size: 2 GB
    max_file_uploads: 20
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 8 GB
    	imagick::RESOURCETYPE_DISK: 1.844674407371E+19
    	imagick::RESOURCETYPE_FILE: 1536
    	imagick::RESOURCETYPE_MAP: 8 GB
    	imagick::RESOURCETYPE_MEMORY: 4 GB
    	imagick::RESOURCETYPE_THREAD: 8
    gd_version: bundled (2.1.0 compatible)
    ghostscript_version: not available
    
    ### wp-server ###
    
    server_architecture: Windows NT 10.0 AMD64
    httpd_software: Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.3.24
    php_version: 7.3.24 64bit
    php_sapi: apache2handler
    max_input_variables: 1000
    time_limit: 36000
    memory_limit: 2048M
    max_input_time: 60
    upload_max_filesize: 2G
    php_post_max_size: 2G
    curl_version: 7.70.0 OpenSSL/1.1.1g
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: false
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 5.6.41
    client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
    
    ### wp-constants ###
    
    WP_HOME: http://twentytwentyone.test
    WP_SITEURL: http://twentytwentyone.test
    WP_CONTENT_DIR: F:\laragon\www\TwentyTwentyOne/wp-content
    WP_PLUGIN_DIR: F:\laragon\www\TwentyTwentyOne/wp-content/plugins
    WP_MAX_MEMORY_LIMIT: 512M
    WP_DEBUG: true
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: true
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_LOCAL_DEV: undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    

    @Michael Davis

    This thread is one of the most amazing thread that I have come across!

    I am sorry I am not clear how to communicate in a manner which you can understand!!

    you are not okay with sharing your site access

    As I have been repeatedly saying, this in on my LOCAL machine. Have can I give you access?

    About you asking me to install Rank Math, I do not see the value addition of installing an unwanted plugin which just bloats my database.

    According to YOUR plugin FAQ, I do not need to install Rank Math (I have mentioned this earlier as well).
    Please see the FIRST FAQ on the plugin page: https://wordpress.org/plugins/fast-indexing-api/

    It might be related to the plugin trying to hook to Rank math submenu which doesn’t exist in your site.

    It looks like the REAL issue is finally dawning on you! Please get your team to FIX THIS ISSUE!!

Viewing 15 replies - 1 through 15 (of 16 total)

The ticket ‘PHP Notice: add_submenu_page’ is closed to new replies.