Make WordPress Core

Opened 14 years ago

Closed 10 years ago

#16162 closed defect (bug) (fixed)

Pagination and sorting reset after bulk media deletion

Reported by: hakre's profile hakre Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.1 Priority: normal
Severity: normal Version: 3.1
Component: Administration Keywords: has-patch
Focuses: administration Cc:

Description (last modified by scribu)

When doing Bulk Deletes on paginated Media Library, after performing the delete, I'm back on page 1 regardless on which page I've been before.

Attachments (3)

16162-paged.patch (469 bytes) - added by hakre 14 years ago.
preserve paged
16162.2.patch (1.2 KB) - added by SergeyBiryukov 14 years ago.
16162.diff (514 bytes) - added by ericlewis 11 years ago.

Download all attachments as: .zip

Change History (25)

#1 @ocean90
14 years ago

  • Component changed from General to Administration

Related: #15416

#2 @ocean90
14 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.1
  • Owner set to scribu
  • Status changed from new to reviewing

Same for categories and tags page. If we have it for posts and comments (#15416), we should add it with the other pages too.

Last edited 14 years ago by ocean90 (previous) (diff)

#3 @hakre
14 years ago

I was able to reproduce against latest trunk.

#4 @hakre
14 years ago

It does not reflect the sort column as well.

Version 0, edited 14 years ago by hakre (next)

@hakre
14 years ago

preserve paged

#5 @hakre
14 years ago

The patch preserves paged for bulk media deletes. sorting is not preserved as it does not gets passed in the request.

The idea I had so far is to add hidden form fields or to change the forms action attribute when things are changed by javascript.

The only hotfix I know of so far is to disable javascript which makes one of the biggest improvements of 3.1 looking pretty reduced.

#6 @scribu
14 years ago

  • Description modified (diff)
  • Summary changed from Bulk Actions and Pagination: Page Lost to Pagination and sorting reset after bulk media deletion

#7 @SergeyBiryukov
14 years ago

  • Keywords has-patch added; needs-patch removed

hakre's patch works for me.

#8 @voyagerfan5761
14 years ago

  • Cc WordPress@… added

#9 @nacin
14 years ago

  • Keywords needs-patch added; has-patch removed

Noting that ocean90 was also able to reproduce this against edit-tags.php. A few of us were looking at this today (MarkJaquith in particular) and pagination was inconsistent across a number of screens.

#10 @SergeyBiryukov
14 years ago

Tried to take a stab at it.

#11 @SergeyBiryukov
14 years ago

Looks like the Plugins screen is affected too. Are there any else?

#12 @garyc40
14 years ago

My patch over here also fixes pagination and sort reset for edit-tags, edit-comments, edit .
garyc40.16166.2.diff

Perhaps we should merge this ticket and #16166?

#13 @scribu
14 years ago

  • Owner scribu deleted

#14 @dd32
14 years ago

  • Milestone 3.1 deleted
  • Resolution set to duplicate
  • Status changed from reviewing to closed

Combining this, as the patch over on 16162 should fix this once it's applied to the rest of the list tables.

Duplicate of #16162

#15 @ocean90
14 years ago

Replying to dd32:

Combining this, as the patch over on 16162 should fix this once it's applied to the rest of the list tables.

Duplicate of #16162


s/#16162/#16166/

Last edited 14 years ago by ocean90 (previous) (diff)

#16 @ryno267
13 years ago

This is still an issue and imo shouldn't be merged with the ajax ticket. Any resolution to this

#17 @scribu
13 years ago

  • Milestone set to Future Release
  • Resolution duplicate deleted
  • Status changed from closed to reopened

Yeah, need to handle this either way.

#18 @nacin
11 years ago

  • Component changed from Administration to Media
  • Focuses administration added

@ericlewis
11 years ago

#19 @ericlewis
11 years ago

  • Keywords has-patch added; needs-patch removed

This has been fixed for the Edit Media list, but is still a problem on the tags and categories page.

This is because the <form>'s method attribute is set to post, rather than get, which ends up throwing off wp_get_referer(), losing the paged parameter in the link. attachment:16162.diff fixes the form method.

Last edited 11 years ago by ericlewis (previous) (diff)

#20 @wonderboymusic
10 years ago

  • Milestone changed from Future Release to 4.1

#21 @wonderboymusic
10 years ago

  • Component changed from Media to Administration

#22 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from reopened to closed

In 29782:

In the form handler logic for edit-tags.php, don't redirect until $_REQUEST['paged'] has been checked. All switch cases (except edit) now use break instead of exit.

Fixes #16162.

Note: See TracTickets for help on using tickets.