[wp-trac] [WordPress Trac] #64025: wp_die() status code posts component updates (parent ticket: #64009)

WordPress Trac noreply at wordpress.org
Mon Sep 22 16:46:04 UTC 2025


#64025: wp_die() status code posts component updates (parent ticket: #64009)
-------------------------------+-----------------------------
 Reporter:  callumbw95         |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 If you have come here directly, please refer back to the parent ticket
 here: [https://core.trac.wordpress.org/ticket/64009 #64009]

 This ticket is regarding the `wp_die()` function calls within the Media
 component and will cover the following locations. Please note links were
 correct at the time of testing and writing this up, but line numbers may
 have changed slightly:

 || **Filepath** || **Line Number** || **Context** || **Status Code** ||
 **New Code** || **Code Meaning** ||
 || src/wp-admin/post-new.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/post-new.php#L24 24] || GET: Invalid post
 type passed || 500 || 400 || Bad Request ||
 || src/wp-admin/term.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/term.php#L31 31] || Missing: item for edit
 || 500 || 404 || Not Found ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/includes/post.php#L286 286] ||
 User Permissions: does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/includes/post.php#L288 288] ||
 User Permissions: does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/includes/post.php#L519 519] ||
 User Permissions: does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/includes/post.php#L521 521] ||
 User Permissions: does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/includes/post.php#L2084 2084]
 || Missing: post || 500 || 404 || Not Found ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/includes/post.php#L2088 2088]
 || User Permissions: does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit-tags.php#L13 13] || Error: Invalid
 taxonomy || 500 || 400 || Bad Request ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit-tags.php#L19 19] || Error: Invalid
 taxonomy || 500 || 400 || Bad Request ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit-tags.php#L23 23] || User Permissions:
 does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit-tags.php#L160 160] || User
 Permissions: does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit-tags.php#L180 180] || Missing: term
 || 500 || 404 || Not Found ||
 || src/wp-admin/comment.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L46 46] || Error: cannot edit
 as post is in trash || 500 || 409 || Conflict ||
 || src/wp-admin/comment.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L384 384] || REQUEST: invalid
 params || 500 || 400 || Bad Request ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit.php#L18 18] || REQUEST: invalid
 params || 500 || 400 || Bad Request ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit.php#L22 22] || User Permissions: does
 not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit.php#L41 41] || REQUEST: invalid
 params || 500 || 400 || Bad Request ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit.php#L123 123] || REQUEST: invalid
 params || 500 || 400 || Bad Request ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit.php#L156 156] || User Permissions:
 does not have access || 500 || 403 || Forbidden ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/edit.php#L176 176] || User Permissions:
 does not have access || 500 || 403 || Forbidden ||

 There are however the following function calls I have not touched as I
 felt they were already valid with their current status code:

 || **Filepath** || **Line Number** || **Status Code** ||
 || src/wp-admin/comment.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L364 364] || 500 ||
 || src/wp-admin/edit-comments.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/comment.php#L12 12] || 403 ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L23 23] || 500 ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L27 27] || 403 ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L84 84] || 403 ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L115 115] || 403 ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L135 135] || 403 ||
 || src/wp-admin/edit-tags.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L171 171] || 403 ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L45 45] || 403 ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L132 132] || 500 ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L160 160] || 500 ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L181 181] || 500 ||
 || src/wp-admin/edit.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L185 185] || 500 ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/comment.php#L326 326] || 500 ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/comment.php#L987 987] || 500 ||
 || src/wp-admin/includes/post.php || [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-admin/comment.php#L2108 2108] || 500
 ||
 || src/wp-admin/post-new.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L59 59] || 403 ||
 || src/wp-admin/post.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L20 20] || 400 ||
 || src/wp-admin/post.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L47 47] || 400 ||
 || src/wp-admin/term.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L41 41] || 403 ||
 || src/wp-includes/comment.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L749 749] || 409 ||
 || src/wp-includes/comment.php || [https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/comment.php#L916 916] || 429 ||

 Please note that my suggestions were made before @johnbillion's comment on
 the parent ticket made
 [https://core.trac.wordpress.org/ticket/64009#comment:2 here].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64025>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list