Opened 14 years ago
Closed 12 years ago
#15489 closed enhancement (duplicate)
Ajaxify Post/page trashing
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | 3.2-early has-patch needs-testing |
Focuses: | Cc: |
Description (last modified by )
To reproduce:
- You need a blog with enough posts or pages to give you at least two pages in the relevant administrative section.
- Trash a post or page.
Current behaviour:
It causes a reload of the entire page and drops you back on page 1.
Expected behaviour:
Post is trashed via AJAX
Attachments (1)
Change History (13)
#3
@
14 years ago
- Milestone changed from Awaiting Review to 3.1
The bug, I think reported elsewhere, is kicking you back to page 1. We don't have ajax trash for pages or posts, just comments, and that enhancement wasn't included in #14579, so it'll need to wait for a future release.
#4
@
14 years ago
Yep, you're right. It's not Ajax...sorry (my local test instance reloads so fast it throws me a bit).
#5
@
14 years ago
- Component changed from General to Administration
- Description modified (diff)
- Keywords 3.2-early added; ajax posts pages removed
- Milestone changed from 3.1 to Future Release
- Summary changed from Post/page ajax management broken to Ajaxify Post/page trashing
- Type changed from defect (bug) to enhancement
Clarified ticket description.
#6
follow-up:
↓ 7
@
14 years ago
One note though... the current behavior (it causes a reload of the entire page and drops you back on page 1) does not occur in 3.0.1.
The entire page does reload but it stays on the page you were at.
My misdiagnosis of the Ajax angle here was a bit of a red herring and indeed an enhancement. The reload back to page 1 issue is the real bug. Nacin, did you find the other report?
#7
in reply to:
↑ 6
@
14 years ago
Replying to hew:
My misdiagnosis of the Ajax angle here was a bit of a red herring and indeed an enhancement. The reload back to page 1 issue is the real bug. Nacin, did you find the other report?
The reload back to the first page is because these pages are now ajax-ified. I think this might be fixed in #14579 if hashes are introduced to the URLs.
#9
@
14 years ago
Patch attached to ajaxify post/page trash/untrash/delete.
A few things to note:
- In
admin-ajax.php
, there's already a switch case for$_POST['action'] == 'delete-post'
. The media editor is using ajax action 'delete-post', and I haven't reviewed the code to see if any other component uses 'delete-post'. In order to avoid breaking existing stuff, I named the new ajax action "delete-post-list-item".
- The javascript file that I added post trash / untrash / deletion handlers is inline-edit-post.dev.js . I think it's more proper that we rename it something like "edit-posts.dev.js", to be consistent with "edit-comments.dev.js", which does the same thing, but for comments.
Woops. Sorry about the lack of line breaks above.
Related: http://core.trac.wordpress.org/ticket/15488