[wp-trac] [WordPress Trac] #53336: Deleting CPT post by code (ie in a plugin) redirects to the main post type.

WordPress Trac noreply at wordpress.org
Tue Jun 29 06:42:19 UTC 2021


#53336: Deleting CPT post by code (ie in a plugin) redirects to the main post type.
---------------------------+-----------------------------
 Reporter:  princeofabyss  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  General        |     Version:  5.7.2
 Severity:  normal         |  Resolution:  wontfix
 Keywords:                 |     Focuses:  administration
---------------------------+-----------------------------
Changes (by mikeschroder):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Hi @princeofabyss !

 Thanks for submitting the ticket.

 This was talked about in
 [https://wordpress.slack.com/archives/C02RQBWTW/p1624945065446300 a triage
 session] today.

 I'll give a synopsis based on the feedback there.

 The issue is that once a post is deleted, WordPress can't reliably
 determine what the CPT of the post was.

 For this reason, the consensus was to close the ticket as `wontfix`.

 As far as a way forward: One suggestion was to reconsider the architecture
 of what you're building to see if there's a way to do it without deleting
 the post in that location, like returning an error before the post is
 saved.

 Thanks again, and sorry for the disappointing news -- I hope this
 recommendation is helpful.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53336#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list