[wp-trac] [WordPress Trac] #42968: Media: Grid View: new upload, file is in the wrong position in the grid until after upload is complete

WordPress Trac noreply at wordpress.org
Wed Feb 7 23:52:28 UTC 2018


#42968: Media: Grid View: new upload, file is in the wrong position in the grid
until after upload is complete
--------------------------+------------------------------
 Reporter:  lancewillett  |       Owner:  adamsilverstein
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.9.5
Component:  Media         |     Version:  4.9.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  ui, javascript
--------------------------+------------------------------

Comment (by adamsilverstein):

 I spent some time reviewing #21819 where this issue was introduced. The
 purpose of the filtering was to "Filter out contextually created
 attachments (e.g. headers, logos, etc.)". My previous proposed patch broke
 that.

 In [attachment:42968.3.diff] I take a different approach, preventing these
 items from ever being added to the collection in `Attachments.validator`
 which is called by `Attachments.validate`. This prevents the resort caused
 by the previous approach and the misplaced imaged we were seeing.

 @Junaidkbr @lancewillett can you give this new patch another test?

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


More information about the wp-trac mailing list