• Resolved jamminjames

    (@jamminjames)


    It appears that turning the “REST API: Head endpoint” option on in “Features” causes a json error when using WordPress’ Block Editor.

    Whenever saving a draft or attempting to publish, we get a “Updating failed. The response is not a valid JSON response” error. When we turn that option off, the error does not occur.

    Is it best to leave this off for most WordPress sites? It would be good to add something to the choice in Features explaining this, if that’s the case.

    The “?” help thing says it helps with “headless” WP sites. I had to look that up, a lot of WP users probably are in the same boat, so a little more explanation would be good.

    Thank you.

    • This topic was modified 4 years, 1 month ago by jamminjames.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Michael Tiña

    (@mikes41720)

    Hi @jamminjames

    In Yoast SEO 14.0, we introduced a REST API endpoint that will give you all the necessary metadata for a specific URL. This makes it easier for headless WordPress sites to use Yoast SEO for their SEO meta output.

    The REST API: Head endpoint feature is enabled by default, but you can definitely disable it if you aren’t using this feature – https://yoast.com/help/how-to-disable-or-enable-the-rest-api-endpoint-in-yoast-seo/

    We tried this on a test site with a default WP theme and just the Yoast SEO plugin, and by enabling this feature and updating or publishing a post, but we were unable to replicate the issue.

    Could you check if you were to perform a conflict check and with a default WP theme and just Yoast SEO as the plugin enabled, and see if you can still replicate this issue?

    Thread Starter jamminjames

    (@jamminjames)

    This makes it easier for headless WordPress sites to use Yoast SEO for their SEO meta output.

    Isn’t a “headless” site the less likely possibility? Shouldn’t the default be disabled?
    Anyway, since ours is not headless, I’ll just leave it off. Thanks.

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @jamminjames

    Yes, headless setups are less than common. I’ll try to check regarding the reasoning as to why that feature is enabled by default, but disabling it shouldn’t cause any effects on your particular setup.

    Thanks!

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @jamminjames

    Just to add, the REST API head endpoint feature is enabled by default because our SEO data optimization process, which does the indexables, text link counter, and prominent words calculation (premium only), utilizes the REST API head endpoint. So the process might be affected if you’ve disabled this feature, so we recommend leaving it on.

    I marked this thread as resolved due to a lack of activity by the original poster. The original poster is always welcome to re-open this topic.

    If you are not the original poster but have a similar issue, please read this post before opening a new request.

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

The topic ‘REST API: Head endpoint causes json error in Block Editor’ is closed to new replies.