[wp-trac] [WordPress Trac] #43658: Media attachment filter drop-down mime types in grid mode is not properly filtered by available mime types
WordPress Trac
noreply at wordpress.org
Thu Apr 25 02:42:45 UTC 2019
#43658: Media attachment filter drop-down mime types in grid mode is not properly
filtered by available mime types
-------------------------------------------------+-------------------------
Reporter: itzmekhokan | Owner:
| adamsilverstein
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.2
Component: Media | Version: 4.9.4
Severity: normal | Resolution:
Keywords: has-patch has-screenshots has-unit- | Focuses:
tests commit |
-------------------------------------------------+-------------------------
Changes (by RogerTheriault):
* status: closed => reopened
* resolution: fixed =>
Comment:
It seems the use of `get_available_post_mime_types` here is potentially an
issue for sites with many posts - in testing we saw the query scan the
whole posts table and for sites with > 1 million rows, that's measured in
seconds - the query here could possibly benefit from some caching.
`SELECT DISTINCT post_mime_type FROM wp_posts WHERE post_type =
'attachment'`
I reopened #44675 because it appeared to be related, but it's likely this
ticket is the nexus of that change, can it be reconsidered or tested for
larger sites before including in 5.2?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43658#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list