Make WordPress Core

Opened 16 years ago

Closed 12 years ago

#16162 closed defect (bug) (fixed)

Pagination and sorting reset after bulk media deletion

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

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 16 years ago.
preserve paged
16162.2.patch (1.2 KB ) - added by SergeyBiryukov 16 years ago.
16162.diff (514 bytes ) - added by ericlewis 12 years ago.

Download all attachments as: .zip

Change History (25)

#1 @ocean90
16 years ago

  • Component GeneralAdministration

Related: #15416

#2 @ocean90
16 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review3.1
  • Owner set to scribu
  • Status newreviewing

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 16 years ago by ocean90 (previous) (diff)

#3 @hakre
16 years ago

I was able to reproduce against latest trunk.

#4 @hakre
16 years ago

It does not reflect the sort column as well.

paged is part of the request, orderby and order are not.

Last edited 16 years ago by hakre (previous) (diff)

@hakre
16 years ago

preserve paged

#5 @hakre
16 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
16 years ago

  • Description modified (diff)
  • Summary Bulk Actions and Pagination: Page LostPagination and sorting reset after bulk media deletion

#7 @SergeyBiryukov
16 years ago

  • Keywords has-patch added; needs-patch removed

hakre's patch works for me.

#8 @voyagerfan5761
16 years ago

  • Cc WordPress@… added

#9 @nacin
16 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
16 years ago

Tried to take a stab at it.

#11 @SergeyBiryukov
16 years ago

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

#12 @garyc40
16 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
16 years ago

  • Owner scribu removed

#14 @dd32
16 years ago

  • Milestone 3.1
  • Resolutionduplicate
  • Status reviewingclosed

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
16 years ago

Version 0, edited 16 years ago by ocean90 (next)

#16 @ryno267
15 years ago

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

#17 @scribu
15 years ago

  • MilestoneFuture Release
  • Resolution duplicate
  • Status closedreopened

Yeah, need to handle this either way.

#18 @nacin
13 years ago

  • Component AdministrationMedia
  • Focuses administration added

@ericlewis
12 years ago

#19 @ericlewis
12 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 12 years ago by ericlewis (previous) (diff)

#20 @wonderboymusic
12 years ago

  • Milestone Future Release4.1

#21 @wonderboymusic
12 years ago

  • Component MediaAdministration

#22 @wonderboymusic
12 years ago

  • Owner set to wonderboymusic
  • Resolutionfixed
  • Status reopenedclosed

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.