-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Error when editing custom post type with non-Latin slug in Gutenberg: "You attempted to edit an item that doesn't exist." #67358
Comments
Hey @mafiayemakhfi, I confirm that I was able to reproduce the bug in the environment described below. I used the code snippet provided in the description to create a custom post type (CPT). Environment
2024-11-28.10-11-34.mp4 |
Hey @mafiayemakhfi, Thanks for bringing this up. I was able to reproduce the issue following the above-mentioned steps. Here are the details - Environment
Screencast -Screen.Recording.2024-11-28.at.11.02.12.mov |
The issue occurs because of the encoding error for the PR: #67780 Above PR fixes the issue by correcting the encoding for the header where the link is getting used which might have the Persian slug. |
I discussed this with @TimothyBJacobs, and this is probably a REST API or Rewrites core component issue. Here's what is happening:
Possible solutions:
ScreenshotCurrently, preloaded headers look like this: |
Description
When attempting to edit a custom post type with a Persian slug in the Gutenberg editor, I encounter the error message:
"You attempted to edit an item that doesn't exist. Perhaps it was deleted?"
The post is still accessible via its URL, and no data appears to be lost. This issue seems to be related to the handling of slugs containing non-Latin characters in the Gutenberg editor.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: