• Resolved Antony Booker

    (@antonynz)


    A fatal PHP error is occurring when attempting to add new posts with instant indexing enabled on the new version.

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

    This is due to the update argument not being passed. Changing the following code:

    public function before_save_post( $data, $postarr, $unsanitized_postarr, $update ) {
    	if ( ! $update ) {
    		return $data;
    	}

    to

    public function before_save_post( $data, $postarr, $unsanitized_postarr, $update=false ) {
    	if ( ! $update ) {
    		return $data;
    	}

    Should stop that error from happening.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @antonynz,

    Thank you for reporting the issue. We’ve identified a potential bug in our Instant Indexing module causing this on some setups.

    As a temporary solution, we recommend disabling the Instant Indexing module in our plugin. This should allow you to create new posts without any issues.

    Our team is actively working on a fix which will be available in the next plugin update. We appreciate your understanding and patience in this matter.

    Feel free to reach out if you have any other concerns.

    Gal Baras

    (@galbaras)

    Which setups are affected by this?

    David Levine

    (@justlevine)

    @galbaras AFAIK 5.9 and below, WP6.0 added that extra parameter…

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @justlevine,

    Thank you for sharing the insights. Yes, it’s true that the issue is occurring for the setups that have WordPress version below 6.0.0.

    Hope that helps.

    We are here to assist. Thank you.

    Arsooni

    (@absoonoo)

    I have the same problem:

    public_html/wp-admin/includes/post.php(423): wp_update_po in domains/domain.com/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/instant-indexing/class-instant-indexing.php on line 262

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @absoonoo,

    We released a quick Beta update with a fix for this issue.

    Please enable the Beta update by following this: https://rankmath.com/kb/version-control/#beta-updates

    If you are unable to see an update, please clear Rank Math’s transients from:
    WP Dashboard > Rank Math > Status & Tools > Database Tools > Remove Rank Math Transients > Remove transients

    Please clear the caches, server, and WordPress after updating.

    You can disable the Beta updates once you update to the latest version and if the issue is fixed.

    We are here to assist. Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error when creating new posts V1.0.116’ is closed to new replies.