REST API + JSON Response

#150745
  • Resolved Karlijn
    Rank Math free

    Hoi!

    I’m a satisfied user of RankMath, but as of today, I get an error message, saying:
    “Updating failed. The response is not a valid JSON response.”
    This occurs when I hit the save changes button, after editing a page or post.

    I deactivated all my active plugins (which are just a few), and learned that RankMath is the one that is causing this issue. Also, when I perform a site health check, I get the message: “The REST API did not process the context query parameter correctly”.

    This message and the error disapear when I deactivate the RankMath plugin. RankMath was working fine before, so what happened and how can I fix it?

    Thanks in advance!

    Best,
    Karlijn

Viewing 11 replies - 1 through 11 (of 11 total)
  • Anas
    Rank Math business

    Hello,

    Thank you for contacting Rank Math, and sorry for any inconvenience caused.

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

    Thank you for that additional information.

    I’ve tried creating a test page named Rank Math Test Page and replicated the issue. Those errors usually are caused when something is blocking access to the WordPress REST API.

    This could also suggest that there is a conflict between Rank Math and one of your installed plugins which might be having the WordPress REST API disabled. To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Please try activating only Rank Math and a default theme and see if the issue persists.

    If that didn’t help, please contact your web host and ask if your server is blocking it, firewall policies, or even a security plugin.

    I hope that helps. Thank you, and looking forward to your update.

    Hi Reinelle,

    Thanks for replying. With the help of the troubleshooting guide, I learned that my theme (Flatsome) and RankMath are not working together anymore. I don’t know why, because they were both working fine before. Is there something I can do about this? Or should I contact the authors of Flatsome?

    Hello,

    Thank you for keeping in touch with us.

    Can you please enable your WordPress debugging mode so we can locate the cause of this conflict? https://wordpress.org/support/article/debugging-in-wordpress/

    After you can get the error logs, it will help us and the developers from the Flatsome theme fix this issue. You may also contact the support from Flatsome about this issue as they may already have a solution for this.

    We are looking forward to helping you.

    I’m so scared to do this *lol*

    OK, i’ve enabled the debugging mode, I think. But I can’t find the log file in the WP-content directory.

    Hello,

    Thank you for the update, and sorry for the delay.

    I’ve checked your site, and it seems that Rank Math is deactivated. However, the issue still persists even without Rank Math.

    In this case, you can coordinate with your theme provider (Flatsome) and ask for further assistance. You can also share this video screencast with them as well:
    https://i.rankmath.com/iB5sJJ

    I hope that helps. Thank you, and please don’t hesitate to contact us if you need further assistance.

    Thank you for the video screencast, Reinelle.

    I activated RankMath again, can you please take another look?

    I deactivated Rankmath because I needed to work on my website, and I cannot use the UX Builder if RankMath is activated. When RankMath is deactivated, everything works. So I don’t understand why you say the issue still exists, even when RankMath is deactivated. Because on my computer, in my browser everything works fine when RankMath is deactivated. Obviously I want RankMath activated, so I really like the issue fixed.

    The errors in the video, what are they? Are they theme related and have nothing to do with RankMath? If so, i’ll ask Flatsome for further assistance.

    Hello,

    I was able to troubleshoot this issue and I believe it is now resolved.

    It seems to have been related to how you had added the breadcrumbs code in your child theme functions.php file.

    I removed this at the moment. To add the breadcrumbs through your fucntions.php, please use the following which will prepend it to your content.

    
    function rm_breadcrumbs( $content ) {
    	if ( function_exists('rank_math_the_breadcrumbs') && is_singular() ) rank_math_the_breadcrumbs();
    	return $content;
    }
    add_filter( 'the_content', 'rm_breadcrumbs' );
    

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thank you so much, Michael Davis!

    The issue is now fixed!
    I’m able to edit pages and posts again, with RankMath activated, and I’m not receiving any errors anymore.

    I’ll add your your code snippet in functions.php.

    Thanks again, Michael!

    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.

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

You must be logged in to reply to this ticket.