WordPress wp-json API returns 404 Error while editing page

Description:

WordPress wp-json API returns 404 Error while editing page

Here’s the server response:

{"code":"rest_no_route","message":"Es wurde keine Route gefunden, die mit der URL und der Request-Methode identisch ist.","data":{"status":404}}

Step-by-step reproduction instructions:

  1. Open the Post Editor/Site Editor while Browser JS console is visible
  • Screenshot*

Environment info

  • WordPress version: 6.01
  • Gutenberg Plugin version: -
  • Cwicly Plugin version: 1.1.9.3
  • Cwicly Theme version: 1.0.3

Hey @michelyweb,

Sorry to hear you’re receiving this error. Is it affecting your backend in some way?
Can you try deactivating the Cwicly plugin and tell me if the error disappears?

Could not see any problem in backend just the errors in console. But as soon cwicly plugin is disabled, the error was gone.

I’ve moved the site from Cloudflare to BunnyCDN yesterday. Can not see the error anymore.
Not sure if it’s a coincidence but the error is gone.

Hey @michelyweb,

I can reproduce this on my side so it is something to be looked at, but will not affect backend editing.
Thank you for the details.

Hi,

I have the same issue with 1.2.9.4.4:

image

Disappears when deactivating Cwicly and reappears when reactivating.

It it can be of any help:

Same here, DNS with Cloudflare:

Server settings:

I cannot save my files, when I am on Cloudflare CDN. Could this be fixed please?

Is Rocket loader on in Cloudflare Settings?

No, it is set to off

Hello @Jacob,

I’m sorry to hear you’re having trouble with this.

When you say that you cannot save your files, are these posts in the Post Editor or simply templates in the Site Editor?

Can you confirm that you save without any trouble when you deactivate Cwicly?

Thanks in advance.

Hello Louis,

I am in touch with your support now, so let us keep it there.

Thanks
Jacob

Hello @louis,
i think i have a similar issue today (even after the last Cwicly plugin updates today 22/05/2023).
I cannot save my template while editing it. and i have noticed in the chrome console that it is a rest api issue.
I’m on a NGINX server by the way.
Here is the error i get (sometimes it saves my changes but it’s rare):
https://mywebsite***.com/wp-json/cwicly/v1/post_html_render?_locale=user 500

and here are some other errors i have when i’m editing :point_down:


api-fetch.min.js?ver=bc0029ca2c943aec5311:2 POST https://mywebsite***.com/wp-json/cwicly/v1/heartbeat?_locale=user 403

GET https://mywebsite***.com/wp-admin/admin-ajax.php?action=rest-nonce 400

and in parallele, when i’m editing a page (post.php), i have this 404 heartbeat api error :
api-fetch.min.js?ver=bc0029ca2c943aec5311:2 POST https://mywebsite***.com/wp-json/cwicly/v1/heartbeat?_locale=user 404

What can i do ? can i send you a DM to give you access to my admin ?

Here is my wordpress configuration

Architecture serveur Linux 5.15.0-72-generic x86_64
Serveur web nginx/1.22.1
Version de PHP 8.0.28 (Supporte les valeurs 64 bits)
PHP SAPI fpm-fcgi

Wordpress Version 6.2.2
Structure des permaliens /%postname%/
theme: Cwicly Theme (cwicly)

another related issue is the error message i get when i try to clear my cwicly block html cache in the Cwicly settings, here is the screenshot :

and the corresponding console error :
POST https://mywebsite***.com/wp-json/cwicly/v1/post_html_render?_locale=user 500

I’m really stuck here

I have to pick up on this since I experienced the issue as well, both on my local machine as well as on the instawp environment Cwicly provides for testing purposes. Latest version of Wordpress and Cwicly are used.

When I try to edit a template (part), changes are not reflected due to API errors. See screenshot attached:

Edit: Cwicly plugin version 1.2.9.9.5 seems fine in this regard. I did some tests on my end and did not come across the issue there.

Hi,

We have fixed this issue in 1.3.0.2.

Please let us know if you are still experiencing issues once updated.

Best regards,
Johnny

1 Like