Fatal Error with PHP 8.1 – ValueError: Missing padding character in Breadcrumbs

#1051541
  • Resolved Francine Lu
    Rank Math free

    Hello Rank Math Support Team,

    I’m reporting a fatal error that occurs specifically on my website’s search results pages after upgrading PHP to version 8.1. My WordPress version is 6.8.1. The rest of the website functions normally.

    When users perform a search, the search results page displays a “There has been a critical error on this website.” message (or equivalent, as my WP_DEBUG was enabled).

    Upon enabling WP_DEBUG, the following fatal error was logged in debug.log:

    Disabling the Rank Math SEO plugin from the WordPress backend immediately resolved the critical error on the search page, confirming it’s directly caused by the plugin’s interaction with PHP 8.1 in this specific context.

    Could you please advise on this issue and if there’s a specific update or fix available for PHP 8.1 compatibility concerning the search page breadcrumbs?

    Thank you for your time and assistance.

    Sincerely,
    Xuan

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

    We apologize for the issue you are facing with the fatal error related to breadcrumbs on your search results pages after upgrading to PHP 8.1. Thank you for providing detailed information about the error and your website URL.

    This issue seems to be related to how the breadcrumbs module interacts with PHP 8.1, and it may require a specific fix or update from our development team. We recommend checking for any available updates for the Rank Math plugin, as we continuously work on improving compatibility with newer PHP versions.

    In the meantime, if you would like to troubleshoot further, you can try the following steps:

    1. Clear your site cache and any server cache if applicable.
    2. Disable other plugins temporarily to check for conflicts.
    3. Revert back to an earlier PHP version (like 7.4) if possible, until a fix is released.

    If the problem persists, please reply to this ticket with any additional details or questions, and a human agent from our support team will assist you further.

    Thank you for your understanding, and we appreciate your patience as we work to resolve this issue!

    Sources:
    Fatal Error Happening on Some Installations After 1.0.49 Update » Rank Math

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello Rank Math Support Team,

    Thank you for your prompt reply and the suggestions.

    I appreciate your advice, and I’ve already performed the troubleshooting steps you recommended:

    + Rank Math has been updated to the latest version.
    + I have cleared my site cache and all applicable server caches.
    + I have temporarily disabled other plugins to check for conflicts the issue persists. This confirms the problem isn’t due to a conflict with another plugin.
    + Unfortunately, reverting to an earlier PHP version (like 7.4) is not an option for my hosting environment.

    Since the problem persists after performing these steps, and it seems to be directly related to Rank Math’s breadcrumbs module on PHP 8.1 search pages, could you please escalate this to your development team for further investigation? I am unable to downgrade PHP, so a fix for PHP 8.1 compatibility is crucial.

    Thank you for your continued assistance.

    Sincerely,
    Xuan

    Hello,

    The issue is coming from the search results format in the breadcrumb settings of our plugin.

    If you head over to WordPress Dashboard > Rank Math SEO > General Settings > Breadcrumbs, you can see that you are missing the padding character (%s) on that option.

    Please set that option to the following to resolve the issue:

    padding

    Hope that helps.

    Thank you so much. It’s resolved.

    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://www.trustpilot.com/evaluate/www.rankmath.com and
    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 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this ticket.