[wp-trac] [WordPress Trac] #11863: Trashed items interfere with page/post slug generation

WordPress Trac noreply at wordpress.org
Mon Feb 8 17:23:33 UTC 2016

#11863: Trashed items interfere with page/post slug generation
 Reporter:  Denis-de-Bernardy                    |       Owner:  ericlewis
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.5
Component:  Posts, Post Types                    |     Version:  2.9
 Severity:  normal                               |  Resolution:
 Keywords:  make-flow has-patch has-unit-tests   |     Focuses:
  needs-testing                                  |

Comment (by ericlewis):

 Replying to [comment:105 boonebgorges]:
 > `_modify_post_name_on_transition_post_status()` runs during
 `transition_post_status`, which generally only happens during an update;
 so in this case, the actions will be fired twice.

 Yeah, this recursion did feel awkward when I was writing it. A direct db
 update + manual cache invalidation like you suggest would make sense to
 keep it more isolated.

 > `_modify_post_name_on_transition_post_status()` runs during
 `get_sample_permalink()`, when you wouldn't generally expect your post
 content to be modified.

 In this case, perhaps we could do this higher in the chain of the sample
 permalink AJAX handler,
 /wp-admin/includes/ajax-actions.php#L1585 around here]?

Ticket URL: <https://core.trac.wordpress.org/ticket/11863#comment:106>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list