WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 6 years ago

#13502 closed defect (bug) (invalid)

Ajax deletion of media broken due to Trashing remains

Reported by: dd32 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Media Keywords:
Focuses: Cc:
PR Number:

Description

To reproduce:

  1. Upload a file
  2. Expand to view file details
  3. Click Delete, Follow through.

Result: Page reloads and deletes the object

Expected Result: At some point here, Ajax deletion is supposed to kick in.

prepareMediaItemInit() in swfupload handlers.dev.js contains some Ajax trash/undo code, which is never hit, It looks like it was never removed when the Media trashing code was striped out.

Attachments (5)

13502-ajaxdelete.patch (6.3 KB) - added by ocean90 9 years ago.
13502-ajaxdelete.2.patch (6.9 KB) - added by ocean90 9 years ago.
13502.patch (7.9 KB) - added by ocean90 9 years ago.
My first patch on a Mac :)
13502.2.patch (7.9 KB) - added by ocean90 9 years ago.
13502.3.patch (7.9 KB) - added by ocean90 9 years ago.
Refreshed

Download all attachments as: .zip

Change History (19)

#1 @dd32
9 years ago

  • Severity changed from normal to minor

Media trashing was removed in 2.9, or at least, the UI for it was. The backend code has been left in place for when it was to be fully integrated, hopefully with 3.0. That hasnt happened however.

Given that this was broken in 2.9 i would assume now, This probably isnt that high of a priority for 3.0, If someone can provide a patch, go for it.

#2 @ocean90
9 years ago

  • Owner set to ocean90
  • Status changed from new to accepted

#3 @ocean90
9 years ago

  • Keywords has-patch added; needs-patch removed
  • Severity changed from minor to normal
  • added trashSuccess and trashError
  • revert old deleteSuccess and deleteError
  • fix nonce bug

No it works with MEDIA_TRASH and without.

#4 @ryan
9 years ago

  • Milestone changed from 3.0 to 3.1

Not a regression so moving to 3.1. Need to get review from azaozz since he knows the full history here.

#5 @ocean90
9 years ago

  • Version changed from 3.0 to 2.9

#6 @ocean90
9 years ago

  • Keywords media added

Updated patch and closed #13846 as dup, because it's fixed with this patch.

#7 @nacin
9 years ago

  • Milestone changed from Awaiting Triage to 3.1

#8 @ocean90
9 years ago

  • Keywords needs-refresh added; has-patch media removed

I will create a new patch so azaozz can review it.

@ocean90
9 years ago

My first patch on a Mac :)

#9 @ocean90
9 years ago

  • Keywords has-patch added; needs-refresh removed
  • Owner changed from ocean90 to azaozz
  • Status changed from accepted to assigned

The patch works with define('MEDIA_TRASH', true);, define('EMPTY_TRASH_DAYS', 0); and without too.

#10 @westi
9 years ago

  • Cc westi added

@ocean90
9 years ago

@ocean90
9 years ago

Refreshed

#11 @nacin
9 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 3.1 to Future Release

We don't have ajax deletion of posts, so I don't think the lack of ajax on media is serious here. Patch isn't internationalized. Not a serious or immediate regression, so I'm punting.

#12 @ocean90
8 years ago

  • Component changed from Trash to Media
  • Owner azaozz deleted
  • Status changed from assigned to reviewing

#13 @SergeyBiryukov
8 years ago

Related/duplicate: #19052, #19363

#14 @ocean90
6 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from reviewing to closed

Obsolete through media revamp in 3.5.

Note: See TracTickets for help on using tickets.