WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 8 months 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:

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 4 years ago.
13502-ajaxdelete.2.patch (6.9 KB) - added by ocean90 4 years ago.
13502.patch (7.9 KB) - added by ocean90 3 years ago.
My first patch on a Mac :)
13502.2.patch (7.9 KB) - added by ocean90 3 years ago.
13502.3.patch (7.9 KB) - added by ocean90 3 years ago.
Refreshed

Download all attachments as: .zip

Change History (19)

comment:1 dd324 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.

comment:2 ocean904 years ago

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

comment:3 ocean904 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.

ocean904 years ago

comment:4 ryan4 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.

comment:5 ocean904 years ago

  • Version changed from 3.0 to 2.9

ocean904 years ago

comment:6 ocean904 years ago

  • Keywords media added

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

comment:7 nacin3 years ago

  • Milestone changed from Awaiting Triage to 3.1

comment:8 ocean903 years ago

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

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

ocean903 years ago

My first patch on a Mac :)

comment:9 ocean903 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.

comment:10 westi3 years ago

  • Cc westi added

ocean903 years ago

ocean903 years ago

Refreshed

comment:11 nacin3 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.

comment:12 ocean902 years ago

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

comment:13 SergeyBiryukov2 years ago

Related/duplicate: #19052, #19363

comment:14 ocean908 months 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.