Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#39780 closed defect (bug) (fixed)

JS error when bulk deleting attachments with MEDIA_TRASH enabled

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

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
7 years ago

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

#2 @wonderboymusic
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to 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.


5 years ago

#4 @kirasong
5 years ago

#39532 was marked as a duplicate.

Note: See TracTickets for help on using tickets.