#38194 closed defect (bug) (fixed)
Term order and current page is lost when bulk deleting terms
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
Steps to reproduce:
- Go to wp-admin/edit-tags.php
- Order terms by count
- Go to the last page
- Bulk delete two terms
Expected: You stay on the same page with the same ordering (/edit-tags.php?taxonomy=post_tag&orderby=count&order=asc&paged=71&message=6
)
Actual: You get redirected to the index page. (/edit-tags.php?taxonomy=post_tag&message=6&paged=1
)
Attachments (1)
Change History (5)
#2
@
8 years ago
WIthout the patch applied, I now followed the steps to reproduce.
Being on edit-tags.php?taxonomy=post_tag&orderby=count&order=asc&paged=4
(the last page), I bulk delete two terms. After that, I'm still on edit-tags.php?taxonomy=post_tag&paged=4
, but the order is lost.
With the patch applied, I'm on the same page as well, but the order is kept. Even when editing a term and going back afterwards.
Looking at the code, the patch does indeed look good to me. No objections.
Note: See
TracTickets for help on using
tickets.
38194.patch:
edit-tags.php
which is no longer required because ofterm.php
. Related: [34202], [36308]$referer
to$_SERVER['REQUEST_URI']
becausewp_get_referer()
returns false if$_SERVER['REQUEST_URI'] === $_REQUEST['_wp_http_referer']
.paged
always to$pagenum
which is the value of$wp_list_table->get_pagenum();
. This avoids an additional redirect when you delete an item which was previously on the last page.@swissspidy Since you introduced
term.php
, how does 38194.patch look to you?Semi-related: #37573