You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fetch all potential categories, attachments, and tags #10873
I think what getAttachmentsCollection() is meant to do is prime the attachment data used in the Media Library. I also believe that, if the attachment data is missing, the Media Library will refetch it.
Activity
[-]Fetch all potential attachments and tags[/-][+]Fetch all potential categories, attachments, and tags[/+]dd32 commentedon Nov 6, 2018
#11524 is me testing out the changes needed here.
I've verified that Item 2 in
FlatTermSelectorwas indeed an issue, and patched that.I've been looking into Item 1, but I've been struggling to actually trigger the problematic code.
danielbachhuber commentedon Nov 9, 2018
@dd32 This has some fun origins:
getAttachmentsCollection()was changed to useper_page=100fromper_page=-1in dee3dcf#diff-781b45da3dbed5d2670d2c98e473fb83R67wp_ajax_query_attachmentsexpectsposts_per_page=-1, notper_page=-1, so the code never worked in the first place: https://github.com/WordPress/wordpress-develop/blob/17304432063cf2a0635cd93a554a7a08c24a7224/src/wp-admin/includes/ajax-actions.php#L2648perPage=-1was originally added in d13a862#diff-b6cad109f99d0fc5133d2f1408686371R70 (from Gallery: Update media frame state management #2488)I think what
getAttachmentsCollection()is meant to do is prime the attachment data used in the Media Library. I also believe that, if the attachment data is missing, the Media Library will refetch it.@joemcgill Does this match your understanding?
danielbachhuber commentedon Nov 12, 2018
The two remaining issues were addressed in #11654 and #11655