Error when searching

#78746
  • Resolved Kristian
    Rank Math free

    Hello Rank Math!

    We are using your plugin to our site. However, when doing a search, it throws an error:
    Fatal error: Uncaught Error: Call to undefined method RankMathPaperSearch::set_object() in /wp-content/plugins/seo-by-rank-math/includes/frontend/paper/class-paper.php:110

    This happens on prod environment. So as a workaround, I’ve tried going through the plugin files and commented out the line that causes the Fatal Error.

    In seo-by-rank-mathincludesfrontendpaperclass-paper.php line 106

    if ( Post::is_home_static_page() ) {
        $this->paper->set_object( get_queried_object() );
    } elseif ( Post::is_simple_page() ) {
        $post = Post::get( Post::get_simple_page_id() );
        //$this->paper->set_object( $post->get_object() );
    }

    Please help out. I’ve also attached system info in Sensitive Data.

    Thank you so much!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hey, can anyone help?

    Thanks

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Could you please create a screencast, with https://www.loom.com, of where you are experiencing this issue.
    ​​​​​​​
    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP 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/

    We really look forward to helping you.

    Hello,

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

    Thank you.

    Hi Michael,

    Thank you for your assistance. I have modified the sensitive data section.

    Regards,
    Kristian

    Hello,

    It looks like your theme is conflicting with the Rank Math plugin. I tried to reproduce the issue on my setup by dowloading the theme from your site but the theme didn’t worked. I got some missing files error in the wp-content folder. Have you made any changes in the core WordPress file or have you added any files in the wp-content or wp-include files which are required by the theme?

    Also, can you add add your site’s FTP access details in the Sensitive Data Section so we could debug this issue by changing some plugin files?

    Looking forward to helping you.

    Hello Pratik,

    Thanks for your time for looking through our issue.

    I’ve updated the sensitive data for requested FTP access.

    Regards,
    Kristian

    Hello,

    Thank you for providing the FTP access. I still couldn’t reproduce the issue on my setup but I have logged it as an issue and we’ll fix it in the upcoming update.

    For now, to fix this on your site, I have changed following code in /wp-content/plugins/seo-by-rank-math/includes/frontend/paper/class-paper.php file on line 108

    Replaced:
    } elseif ( Post::is_simple_page() ) {
    with:
    } elseif ( Post::is_simple_page() && method_exists( $this->paper, 'set_object' ) ) {

    The Search form is working fine on your site now.

    I hope that helps.

    Hi Pratik,

    Cheers. Big thanks for that.

    Regards,
    Kristian

    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 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.

    Hello,

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

    That should fix the issue for you.

    The final version will be released in a few weeks and you will see a notification in your dashboard when an update comes.

    Please let us know if there’s anything else we can help you with.

    Thank you.

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

The ticket ‘Error when searching’ is closed to new replies.