[wp-trac] [WordPress Trac] #61796: Blank Page When $_GET['postId'] Does Not Exist in /wp-admin/site-editor.php
WordPress Trac
noreply at wordpress.org
Tue Mar 11 07:57:53 UTC 2025
#61796: Blank Page When $_GET['postId'] Does Not Exist in /wp-admin/site-editor.php
-------------------------------------------------+-------------------------
Reporter: benniledl | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: Editor | Version: 6.6
Severity: normal | Resolution:
Keywords: has-patch changes-requested | Focuses:
gutenberg-merge |
-------------------------------------------------+-------------------------
Comment (by Mamaduka):
It seems that we're discussing two potential UIs that can be displayed for
a user here, but I'm not exactly sure which one this ticket is trying to
solve.
Missing item UI paths:
1. The site editor has a `postType` query argument, which isn't a
registered post and displays a `wp_die` message. Example URL: `wp-admin
/site-editor.php?postType=missing`
2. The site editor has query arguments for an entity (`postType` and
`postId`), but the entity is missing from the DB. The following message is
displayed in the editor canvas: "You attempted to edit an item that
doesn't exist. Perhaps it was deleted?"
Possible solutions:
1. We could move the condition into `_wp_get_site_editor_redirection_url`
and do a more graceful redirect instead of `wp_die`.
2. This is a legitimate error/warning. The editor can't render content if
it doesn't exist. Maybe we can add an action to the warning to take the
user to the Dashboard or something similar.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61796#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list