PHP Warning in seo-analysis-tests.php on line 55

#113110
  • Resolved Andre
    Rank Math free

    Hi,

    since Nov, 30th I receive lots of errors in my PHP log. They all refer to the same issue:

    PHP Warning: sprintf(): Too few arguments in /wp-content/plugins/seo-by-rank-math/includes/modules/seo-analysis/seo-analysis-tests.php on line 55

    I already flushed analysis data and cache, but the issue persists. Line 55 refers to the SEO analysis of the permalink structure/description. I don’t know what the problem is, because my site is working, neither the backend nor the frontend throw any errors (it’s just in the log file). I also have set the permalinks accordingly, so the text from line 55 is not shown anywhere.

    Where does this come from?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 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.

    Andre
    Rank Math free

    Hi,

    I don’t think that another plugin causes this. The error is complaining about sprintf and the missing param. I tried some things in the mentioned file and realized that line 55 is different from other lines. So I changed this

    'description' => sprintf( __( 'For the best SEO results, use a custom permalink structure, preferably one that includes the post title (<code>%%postname%%</code>). You can change it by navigating to <a href="%s">Settings > Permalinks</a>', 'rank-math' ), admin_url( 'options-permalink.php' ) ),

    to this

    'description' => sprintf( __( 'For the best SEO results, use a custom permalink structure, preferably one that includes the post title (<code> %%postname%% </code>). You can change it by navigating to <a href="%s">Settings > Permalinks</a>', 'rank-math' ), admin_url( 'options-permalink.php' ) ),

    I added two blanks. One before and one after the %%. Although, only the second occurrence seems to cause the error.

    That fixes the error in my logs. It would be great if you can verify it and add it to your code as well.

    Best
    Andre

    Thank you for the details.

    Yes, there was a problem in German translation, and we have fixed it. Could you please make sure Rank Math Plugin’s translations are up to date from WordPress Dashboard >> Updates page?

    Looking forward to helping you. Thank you.

    ​​​​

    Andre
    Rank Math free

    All my plugins and translations are up to date. The error message does not pop up anymore. Looks good! Thank you!

    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.

    Thank you.

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

The ticket ‘PHP Warning in seo-analysis-tests.php on line 55’ is closed to new replies.