Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible REST issue when WordPress URL and Site URL are different #201

Open
sheabunge opened this issue Dec 6, 2024 · 0 comments
Open
Labels

Comments

@sheabunge
Copy link
Member

sheabunge commented Dec 6, 2024

Current behavior

Due to the plugin automatic update today, the version changed from 3.5.0 to 3.6.1, but immediately after that, when I saved the snippet, the message “Could not create snippet. Request failed with status code 404” appeared. I can no longer save.

The JSON response message is code “rest_no_route”.

When using 3.5.0, it is normally 200 OK.

Edit: In looking at the console, it looks like the 404 is happening when trying to access https://*my website*.com/wp-json/code-snippets/v1/snippets

WordPress URL : https://xxxxxx.com/zzzzzzzz

Site URL : https://xxxxxx.com/

WordPress URL and Site URL are different.

Expected behavior

Saving should work as expected.

Steps to reproduce

I checked the following in my environment, and it is version 3.6.2.
The situation did not change.

  1. After exporting and backing up the snippet, delete the snippet, import it again, and save it on the editing screen.
    → 404 error will occur.
  2. Uninstall and reinstall the plugin, import the snippet and save it on the editing screen
    → 404 error will occur.

If you change the version back to 3.5.0, you can save without any problems.

WordPress version

unknown

Code Snippets version

3.6.1

Code Snippets license

Core (free)

Anything else?

Transposed from here: Could not create snippet. Request failed with status code 404

Also see: Could not create snippet. Request failed with status code 500

@sheabunge sheabunge added the bug label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant