Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#39780 closed defect (bug) (fixed)

JS error when bulk deleting attachments with MEDIA_TRASH enabled

Reported by: SergeyBiryukov Owned by: wonderboymusic
Priority: normal Milestone: 4.8
Component: Media Version: 4.0
Severity: normal Keywords:
Cc: Focuses: javascript

Description

  1. Add define('MEDIA_TRASH', true); to wp-config.php.
  2. Go to Media Library and enable the grid view.
  3. Upload three media files.
  4. Move the newly uploaded files to Trash.
  5. Go to Trash and click "Bulk Select".
  6. Select all the three files and click "Delete Selected".
  7. Only two files are deleted, and there's a JS error in the console:
    Uncaught TypeError: Cannot read property 'get' of undefined
    http://develop.wordpress.dev/src/wp-includes/js/media-views.js?ver=4.8-alpha-39357-src line 3966
    

Change History (4)

#1 @wonderboymusic
10 years ago

  • Focuses javascript added
  • Milestone Awaiting Review → 4.8
  • Owner set to wonderboymusic
  • Status new → assigned
  • Version → 4.0

#2 @wonderboymusic
10 years ago

  • Resolution → fixed
  • Status assigned → closed

In 40051:

Media: in wp.media.view.DeleteSelectedPermanentlyButton, move destructive async operations outside of the selection loop.

Fixes #39780.

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


8 years ago

#4 @kirasong
8 years ago

#39532 was marked as a duplicate.

Note: See TracTickets for help on using tickets.