Fatal error: Uncaught Error: Too few arguments to function

#581970
  • Resolved herogame2019yt
    Rank Math free

    when i creating a wordPress post, it show the error

    Fatal error: Uncaught Error: Too few arguments to function RankMath\Instant_Indexing\Instant_Indexing::before_save_post(), 3 passed in /var/www/html/wp-includes/class-wp-hook.php on line 303 and exactly 4 expected
    in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/instant-indexing/class-instant-indexing.php on line 262

    Call stack:

    RankMath\Instant_Indexing\Instant_Indexing::before_save_post()
    wp-includes/class-wp-hook.php:303
    WP_Hook::apply_filters()
    wp-includes/plugin.php:189
    apply_filters()
    wp-includes/post.php:4179
    wp_insert_post()
    wp-admin/includes/post.php:694
    get_default_post_to_edit()
    wp-admin/post-new.php:66

    disable Rank Math SEO it works fine

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

    Thank you for contacting Rank Math support.

    I’m sorry to hear that you are experiencing this error when creating a WordPress post. This error seems to be related to the Instant Indexing module of Rank Math, which allows you to submit your URLs to IndexNow-enabled search engines such as Bing and Yandex.

    To fix this error, please try the following steps:

    • Make sure you have the latest version of Rank Math installed and activated on your website. You can check for updates in WordPress Dashboard > Updates.
    • Go to Rank Math > Dashboard > Modules and disable the Instant Indexing module. Then, clear your website cache and browser cache.
    • Go to Rank Math > Dashboard > Modules and enable the Instant Indexing module again. Then, go to Rank Math > Instant Indexing > Settings and configure the automatic URL submission according to this tutorial: https://rankmath.com/kb/how-to-use-indexnow/
    • Try creating a new WordPress post and see if the error persists.

    If the error still occurs, please let me know and provide me with some more details, such as:

    This will help me to troubleshoot the issue further and provide you with a solution.

    Thank you for choosing Rank Math

    hi support
    disable the Instant Indexing module , it can creating a new WordPress post fine .
    enable the Instant Indexing module again , it cant work.

    this is wp-debug log

    [01-Jun-2023 00:00:51 UTC] PHP Fatal error Uncaught ArgumentCountError: Too few arguments to function RankMath\Instant_Indexing\Instant_Indexing::before_save_post(), 3 passed in /var/www/html/wp-includes/class-wp-hook.php on line 303 and exactly 4 expected in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/instant-indexing/class-instant-indexing.php:262

    Stack trace:

    #0 /var/www/html/wp-includes/class-wp-hook.php(303): RankMath\Instant_Indexing\Instant_Indexing->before_save_post(Array, Array, Array)
    #1 /var/www/html/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
    #2 /var/www/html/wp-includes/post.php(4179): apply_filters(‘wp_insert_post_…’, Array, Array, Array)
    #3 /var/www/html/wp-content/plugins/hummingbird-performance/core/modules/minify/class-minify-group.php(1275): wp_insert_post(Array)
    #4 /var/www/html/wp-content/plugins/hummingbird-performance/core/modules/minify/class-minify-group.php(1226): Hummingbird\Core\Modules\Minify\Minify_Group::insert_group(Object(Hummingbird\Core\Modules\Minify\Minify_Group), Arra in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/instant-indexing/class-instant-indexing.php on line 262

    [01-Jun-2023 00:01:54 UTC] PHP Fatal error Uncaught ArgumentCountError: Too few arguments to function RankMath\Instant_Indexing\Instant_Indexing::before_save_post(), 3 passed in /var/www/html/wp-includes/class-wp-hook.php on line 303 and exactly 4 expected in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/instant-indexing/class-instant-indexing.php:262

    Stack trace:

    #0 /var/www/html/wp-includes/class-wp-hook.php(303): RankMath\Instant_Indexing\Instant_Indexing->before_save_post(Array, Array, Array)
    #1 /var/www/html/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
    #2 /var/www/html/wp-includes/post.php(4179): apply_filters(‘wp_insert_post_…’, Array, Array, Array)
    #3 /var/www/html/wp-includes/class-wp-embed.php(344): wp_insert_post(Array)
    #4 /var/www/html/wp-includes/class-wp-embed.php(463): WP_Embed->shortcode(Array, ‘https://youtu.b…’)
    #5 [internal function]: WP_Embed->autoembed_callback(Array)
    #6 /var/www/html/wp-includes/class-wp-embed.php(445): preg_replace_callback(‘|^(\\s*)(https?:…’, Array, ‘

    Hello,

    Thanks for sharing more details with us. We’re really sorry that you’re having trouble with the Instant Indexing module.

    It looks like there’s some kind of incompatibility between our plugin and the Hummingbird Performance plugin, which is triggering the PHP fatal error. I tested the free Hummingbird plugin with the Rank Math Instant Indexing feature turned on but I didn’t get the same error.

    Can you please try this: deactivate the Hummingbird plugin and see if you can save your post without any errors? If that works, then it means you’ll need to contact the Hummingbird support team for help with fixing this issue.

    We apologize for the hassle and we hope you can sort this out soon. If you have any other questions or issues, please don’t hesitate to reach out to us. We’re always here to help.

    Cheers

    hi support
    it cant work.
    i deactivate the Hummingbird plugin, still cant creat new post.

    this is the error message when i deactivate the Hummingbird plugin and creat new post.

    Fatal error: Uncaught Error: Too few arguments to function RankMath\Instant_Indexing\Instant_Indexing::before_save_post(), 3 passed in /var/www/html/wp-includes/class-wp-hook.php on line 303 and exactly 4 expected
    in /var/www/html/wp-content/plugins/seo-by-rank-math/includes/modules/instant-indexing/class-instant-indexing.php on line 262

    Call stack:

    RankMath\Instant_Indexing\Instant_Indexing::before_save_post()
    wp-includes/class-wp-hook.php:303
    WP_Hook::apply_filters()
    wp-includes/plugin.php:189
    apply_filters()
    wp-includes/post.php:4179
    wp_insert_post()
    wp-admin/includes/post.php:694
    get_default_post_to_edit()
    wp-admin/post-new.php:66

    Hello,

    We apologize for any trouble you might be facing due to this issue.

    First of all, please make sure that you have the latest versions of Rank Math and your theme and other plugins installed on your website. If not, please update them as soon as possible.

    The most likely cause of this issue is a conflict with another plugin or your theme. To find out which one is causing the problem, you need to do some troubleshooting steps. Don’t worry, it’s not hard and it won’t affect your visitors.

    Here’s what you need to do:

    If the issue is still there:

    Before you share any information with us, please make sure you have a full backup of your website. This is very important in case something goes wrong.

    We look forward to helping you troubleshoot this issue.

    hi support
    i update wordpress to latest versions
    and it work.

    thank you for help

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Fatal error: Uncaught Error: Too few arguments to function’ is closed to new replies.