The same error on CPT’s on different websites with different set ups.

#749124
  • I’ve been encountering some debug code in my website when setting it to ‘true’. Specifically on certain Custom post type’s pages.

    It is on different websites with different plugins.

    I’ve been trying to use rankmath because we want to switch to it coming from yoast. But would like to have a bug free experience.

    Same Codes on each site but with different url’s:

    Deprecated
    : preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in
    /www/clares_479/public/wp-content/plugins/seo-by-rank-math/includes/frontend/class-link-attributes.php
    on line
    114

    Deprecated
    : preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in
    /www/clares_479/public/wp-includes/formatting.php
    on line
    3506

    Deprecated
    : preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in
    /www/clares_479/public/wp-content/plugins/seo-by-rank-math/includes/frontend/class-link-attributes.php
    on line
    114

    Deprecated
    : preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in
    /www/clares_479/public/wp-includes/formatting.php
    on line
    3506

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

    I apologize for the issue you are facing with the debug code on your website when setting it to ‘true’, specifically on certain Custom Post Type pages. It seems like you are encountering deprecated code warnings related to Rank Math on different websites with different setups.

    The debug code you provided indicates deprecated functions being used in the Rank Math plugin. These warnings are related to the preg_match_all() and preg_split() functions being passed null values, which is causing the deprecation notices.

    To address this issue, you can follow these steps:

    1. Check for Plugin Conflicts: Ensure that there are no conflicting plugins causing these deprecated warnings. You can refer to our list of known plugin conflicts to identify any conflicting plugins.

    2. Update Rank Math: Make sure you are using the latest version of Rank Math to ensure compatibility and access any bug fixes related to deprecated functions.

    3. Contact Support: If the issue persists after updating Rank Math and checking for conflicts, you can reach out to our dedicated support team by clicking here. They are available 24/7 to assist you with any problems you encounter.

    Thank you for bringing this concern to our attention, and we appreciate your interest in switching to Rank Math from Yoast. We aim to provide a seamless and bug-free experience for all our users.

    If you need further assistance or have any more questions, please feel free to reply to this ticket, and a human agent from our support team will assist you promptly.

    Warm regards.

    Sources:
    Fatal Error Happening on Some Installations After 1.0.49 Update » Rank Math
    List of Known Plugin Conflicts » Rank Math
    How to Fix Problems While Connecting Account Using Rank Math » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    How to Fix Duplicate Meta Tags » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    dxvwebmaster
    Rank Math free

    I tried conflict testing already. I’d like to have some real support please!
    Everything is up to date aswell.

    thank you

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    Please ensure you are using the latest version of the Rank Math plugin: https://rankmath.com/changelog/

    Also, ensure your website meets the minimum requirements to run the plugin: https://rankmath.com/kb/requirements/

    We look forward to helping you resolve this issue.

    Thanks.

    dxvwebmaster
    Rank Math free

    As said before ,
    Everything is up to date , i did conflict testing aswell and it’s still an issue.
    Server & minimum requirements are also fine.

    Thanks in advance

    Studioxxi
    Rank Math free

    I have the same notices.
    They start with PHP8.1 (no probs with 8.0)
    The issue is occuring on pages where both fields for Meta Description and OG-description are empty.

    Hello,

    We tried to replicate the issue on our test environment with the PHP version set to 8.0 and 8.1.

    We created a Custom Post Type and then created entries under it. We turned debug mode to true and opened the CPT pages on the frontend and backend, and we did not get any errors even with the meta information being blank or set to the default value.

    For us to know more about your setup, please head over to your WP Dashboard > Rank Math > Status & Tools > System Status and click the “Copy System Info to Clipboard” button, and paste it here so we can further analyze the issue.


    @dxvwebmaster
    , if possible, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    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/

    We really look forward to helping you.

    Hello,

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

    Thank you.

    Hello,

    It seems that the error is rendered when your WPbakery is enabled. Allow us to check this further with our developers.

    We should get back to you shortly with a solution.

    Looking forward to helping you.

    Okay thank you !

    Hello,

    Your site was showing 4 PHP Deprecated warnings. Of these, 3 were being triggered by the Rank Math Link Attribute code, which adds “nofollow” and “target” attributes to external links. To fix this, I added the following condition on line 114 in the includes/frontend/class-link-attributes.php file:

    
    if (empty($content)) {
        return $content;
    }
    

    I have also logged this issue and we will include a fix in the upcoming update.

    Now, your site is showing only 1 warning, which seems to be triggered by the WP Bakery plugin when the get_the_excerpt() function is used in the wp_head hook. We use this function to add the excerpt content to the Opengraph description. This issue is not specific to the Rank Math plugin; you’ll see this issue with other plugins as well that use this function in the head hook. Please forward this to the WPBakery team so they can take a look at it.

    Hope that helps.

    Okay thank you very much for the effort. Great work. I’ll wait for the update on my other sites 🙂 !

    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
    https://www.trustpilot.com/evaluate/www.rankmath.com

    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.

    When is this going to be released?

    Thanks in advance

    Hello,

    Thank you for getting back to us.

    We still don’t have an update for this but we went ahead and asked the developers for a follow-up.

    Rest assured that our developers are still working on this matter. We will let you know surely once we release a fix for this issue.

    We appreciate your time and patience in the meantime.

    Hello,

    We released a quick Beta update you can try to see if that helps.

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

    beta update

    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
    remove transients rank math

    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 15 replies - 1 through 15 (of 15 total)

You must be logged in to reply to this ticket.