[wp-trac] [WordPress Trac] #22558: Attachment term counts feels/are inaccurate
WordPress Trac
noreply at wordpress.org
Fri Nov 23 16:21:27 UTC 2012
#22558: Attachment term counts feels/are inaccurate
-----------------------------+--------------------------
Reporter: ocean90 | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Media
Version: | Severity: normal
Keywords: 2nd-opinion |
-----------------------------+--------------------------
For posts:
* Assign a term to a post, save as draft. Term count returns 0.
* Publish the post. Term count returns 1.
* Change post status back to draft. Term count returns 0.
For attachments:
* Upload an image, assign a term. Term count returns 0.
* Create a new post and insert the image in a published post. Term count
returns 0.
* Create a new post, use the insert media modal and upload an image. Then
go the the media edit screen and assign a term to the image. Term count
returns 1.
* Change the post status back to draft. Term count returns 1.
* Upload an image, assign a term, attach the attachment to a published
post. Term count returns 0.
The default term update callback is `_update_post_term_count`. The
function includes a special case for attachments, that's the reason why we
have the 1 in step 3.
IMO the term count for attachments shouldn't rely on the parent post
status. We should just force `_update_generic_term_count`.
Also noted here: https://core.trac.wordpress.org/ticket/21391#comment:41
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22558>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list