WordPress Canonical.php Error

#670057
  • Resolved Anonymous
    Rank Math free

    Hey there,

    I have noticed I’m getting a PHP error and not too sure how to fix it, or the root cause. Last night I installed Rank Math and right after I updated WordPress to the latest version that just came out. I thought I would check with you guys first before I move onto my other plugins, only because this is the newest one. These are my errors I’m seeing.

    [10-Nov-2023 04:54:31 UTC] PHP Warning: Undefined array key “host” in /public_html/wp-includes/canonical.php on line 704
    [10-Nov-2023 04:54:31 UTC] PHP Warning: Undefined array key “host” in /public_html/wp-includes/canonical.php on line 715
    [10-Nov-2023 04:54:31 UTC] PHP Warning: Undefined array key “host” in /public_html/wp-includes/canonical.php on line 718
    [10-Nov-2023 04:54:31 UTC] PHP Warning: Undefined array key “scheme” in /public_html/wp-includes/canonical.php on line 739

    Thank You,
    Ken

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

    We apologize for the inconvenience you’re experiencing with the PHP errors. The warnings you’re seeing are related to the canonical.php file in WordPress and are not directly caused by Rank Math. These warnings are likely due to a conflict between WordPress and another plugin or your theme.

    To resolve this, we recommend following the troubleshooting guide provided by WordPress to check for conflicts with other plugins and themes. You can find the guide here.

    If the issue persists after following the troubleshooting guide, please feel free to reach out to our dedicated support team by clicking here. Our team is available 24/7, 365 days a year and will be happy to assist you further.

    Thank you for bringing this to our attention.

    Sources:
    How to Fix Undefined Offset: 0 Warning » Rank Math
    Confirming a Theme/Plugin Conflict With Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Fatal Error Happening on Some Installations After 1.0.49 Update » Rank Math

    Anonymous
    Rank Math free

    Hello,

    The issue does seem to be with Rank Math, If I remove Rank Math I no longer get that error message, I have also found many other people having the same issue as me with Ran Math – Example here – https://support.rankmath.com/ticket/canonical-url-help/

    If I google this error, I see others with Rank Math having this issue.

    Thank YOu
    Ken

    Anonymous
    Rank Math free

    The only changes I have made to the site are to move from Yoast to Rank Math and update WordPress to 6.4.1.
    The site and all current plugins have been the same for over a year without this PHP error showing up.

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Could you please share the PHP version you’re using on your site?

    We have asked since we recommend updating your PHP version to PHP 8.0 because anything below that has reached its end of life:
    https://www.php.net/supported-versions.php

    Let us know how this goes.

    Thank you.

    Anonymous
    Rank Math free

    Hey, Yes, I was using PHP 8.2 most the most part of the year, and before that was PHP 8.1 – I have never used 8.0 or anything below on this site.

    Anonymous
    Rank Math free

    The only thing different on my site is Rank Math and WordPress 6.4.1.
    The site has been up for over a year using the same theme ( last updated in August ) same PHP version – the only thing I did was install Rank Math and remove YOAST and update WordPress – that’s when this error started showing up.

    Anonymous
    Rank Math free

    Any idea what to do with this error? I have a WordPress theme developer telling me the problem is with Rank Math and its not compatible with PHP 8.1 or 8.2. So I’m hoping there is a fix or I need to remove Rank Math and PHP 8.0 will not work as it does not support IonCube

    Thanks,
    Ken

    Hello,

    To help you investigate this issue, we might need to take a closer look at your website and settings. Please follow these steps:

    • Edit the first post on this ticket and include your WordPress and FTP logins in the Sensitive Data section. This is a secure section that only our support staff can access.
      Sensitive Data Section
    • Make sure you take a complete backup of your website before sharing the information with us.
    • If you prefer, you can use this 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 also use this plugin to monitor what changes our staff might make on your website (if any): https://wordpress.org/plugins/wp-security-audit-log/

    We appreciate your cooperation and patience. Thank you for choosing Rank Math.

    Anonymous
    Rank Math free

    Hello,

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

    Thank you.

    Hello,

    We logged in to your site using the provided access details in the sensitive data section of this ticket.

    Upon checking we updated the Rank Math SEO Free plugin to the latest beta version.
    https://rankmath.com/changelog/

    The issue has now been resolved and the error log does not fill with errors anymore.

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘WordPress Canonical.php Error’ is closed to new replies.