[wp-trac] [WordPress Trac] #40306: Term cache isn't cleared completely when setting and removing object terms

WordPress Trac noreply at wordpress.org
Thu Mar 30 02:30:28 UTC 2017


#40306: Term cache isn't cleared completely when setting and removing object terms
-------------------------------+--------------------
 Reporter:  mboynes            |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  4.7.4
Component:  Taxonomy           |     Version:  4.7
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+--------------------
Changes (by boonebgorges):

 * keywords:   => reporter-feedback


Comment:

 [attachment:40306.2.diff] reworks the tests so that they're a bit more
 precise. I'm guessing that your "default post to edit" trick was to work
 around the "Uncategorized" category. We can eliminate that complication by
 using a different taxonomy. I've also changed your `wp_update_post()` call
 to `wp_set_object_terms()` so that there are fewer variables at play, and
 added a parallel test for `wp_remove_object_terms()`.

 Can you give the tests a look to see if they still capture the bug as
 you've reported it? (The fix itself that you provided seems fine to me.)

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


More information about the wp-trac mailing list