WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#22654 closed defect (bug) (fixed)

Filtered view for "Uploaded to this post" isn't updated on a new upload

Reported by: ocean90 Owned by: ryan
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch
Focuses: Cc:

Description

  • Open Media Lib
  • Change filter to "Uploaded to this post"
  • Switch to Upload
  • Upload an image
  • You see the media lib again, but the image is not displayed

Attachments (3)

22654.diff (5.4 KB) - added by koopersmith 2 years ago.
22654.2.diff (6.4 KB) - added by koopersmith 2 years ago.
22654.3.diff (8.2 KB) - added by koopersmith 2 years ago.

Download all attachments as: .zip

Change History (8)

@koopersmith2 years ago

comment:1 @koopersmith2 years ago

  • Keywords has-patch added; needs-patch removed

The patch:

  • Adds an Attachments collection filter for uploadedTo (post_parent).
  • Corrects an erroneous map from the non-existent parent prop to post_parent.
  • Defines default menuOrder and uploadedTo props for uploading attachments.
  • Unifies filterable props into a single method (improving validation performance for calls to set with multiple properties).

@koopersmith2 years ago

comment:2 @koopersmith2 years ago

Latest corrects the remaining bits of the erroneous parent/post_parent map in the gallery methods.

comment:3 @ocean902 years ago

Looks good from here.

@koopersmith2 years ago

comment:4 @koopersmith2 years ago

Latest adds:

  • A special case to accept attachments with the default menu order when no attachments exist.
  • The ability to enable ties when running the comparator (which turns off the cid-based tiebreaker).

comparator( a, b, { ties: true });

comment:5 @ryan2 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In 22951:

Update the "Uploaded to this post" filter view when uploading new files.

  • Add an Attachments collection filter for uploadedTo (post_parent).
  • Correct an erroneous map from the non-existent parent prop to post_parent.
  • Define default menuOrder and uploadedTo props for uploading attachments.
  • Unify filterable props into a single method (improving validation performance for calls to set with multiple properties).

Props koopersmith
fixes #22654

Note: See TracTickets for help on using tickets.