Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#39532 closed defect (bug) (duplicate)

Media library's delete permanently does not work correctly from Trash in bulk mode

Reported by: webbistro Owned by:
Priority: normal Milestone:
Component: Media Version: 4.7
Severity: normal Keywords:
Cc: Focuses:

Description

Trying to delete permanently a few media files at once from the Trash (when MEDIA_TRASH is defined) I got an error on the halfway: "Uncaught TypeError: Cannot read property 'get' of undefined" in media-views.js?ver=4.7.1-RC1-39750:3966. I tested the issue with 4.7 and 4.7.1-RC1

It can be fixed by replacing

model.destroy();

with

model.destroy({wait: true});

in line 3971.

Attachments (2)

media-views.js.patch (385 bytes ) - added by webbistro 10 years ago.
Fixes the issue with bulk permanent deletion of media items from the Trash
39532.patch (2.3 KB ) - added by mitraval192 10 years ago.
Fixes the issue on customize-views.js, media-views.js, details.js and browser.js

Download all attachments as: .zip

Change History (5)

@webbistro
10 years ago

Fixes the issue with bulk permanent deletion of media items from the Trash

@mitraval192
10 years ago

Fixes the issue on customize-views.js, media-views.js, details.js and browser.js

#1 @mitraval192
10 years ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #core-media by mike. View the logs.


8 years ago

#3 @kirasong
8 years ago

  • Keywords has-patch removed
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Thanks so much for the report and patch!

I'm not currently able to reproduce this -- am wondering if it was fixed for you in https://core.trac.wordpress.org/changeset/40051.

I'm going to go ahead and mark this as a duplicate of #39780, but if it's still broken for you, please comment back and this can be reopened.

Note: See TracTickets for help on using tickets.