Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#15416 closed defect (bug) (fixed)

Bulk edit on paginated edit.php takes you back to the first page

Reported by: nacin's profile nacin Owned by:
Milestone: 3.1 Priority: high
Severity: normal Version: 3.1
Component: Administration Keywords: needs-testing has-patch
Focuses: Cc:

Description

Side note: Shouldn't we have hashes for pagination? Otherwise we present ourselves a UX issue for links being copy-pasted.

Attachments (2)

garyc40-15416.patch (3.7 KB) - added by garyc40 14 years ago.
garyc40-15416-revised.patch (3.5 KB) - added by garyc40 14 years ago.
removed prop changes from patch

Download all attachments as: .zip

Change History (14)

#2 @garyc40
14 years ago

  • Cc garyc40@… added
  • Keywords has_patch needs-testing added

Patch attached.

The reason why it gets redirected to the original page is because in edit.php (as well as edit-comments.php), wp_get_referer() is processed to feed the redirected URL back to wp_redirect().

This means, when you go directly to edit.php?paged=3 for example, then use the javascript pagination feature to navigate to page 4, and do some bulk action there, you'll be redirected to page 3 nevertheless.

Both edit.php and edit-comments.php have this bug. The attached patch fixes it for both. Also, when you delete post / comments on the last page, normally you'll be redirected to a page that says "No posts found". This patch fixes it as well (by redirecting to the correct last page).

#3 @scribu
14 years ago

  • Keywords has-patch added; has_patch removed

Please keep property changes (svn:ignore in this case) out of patches.

@garyc40
14 years ago

removed prop changes from patch

#4 follow-up: @garyc40
14 years ago

Patch updated.

Btw, is there any way I can leave out the property changes when using "svn diff" ? Is there any command line options for that? Googled around a bit but couldn't find any answers.

#5 in reply to: ↑ 4 @scribu
14 years ago

Replying to garyc40:

Patch updated.

Thanks.

Btw, is there any way I can leave out the property changes when using "svn diff" ? Is there any command line options for that? Googled around a bit but couldn't find any answers.

Don't know. Instead, here's an alias for svn stat that doesn't list unknown files:

mod(){
	svn stat --ignore-externals | grep '^[^?X]'
}

Taken from here: http://andrewnacin.com/2010/05/13/my-wordpress-bash-functions/

#6 @scribu
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16855]) Redirect to correct page after bulk action for posts and comments. Props garyc40. Fixes #15416

#7 @scribu
14 years ago

This works because of the input in the new pagination style. Lucky break :)

#8 @scribu
14 years ago

(In [16856]) Remove unnecessary comments. See #15416

#9 @hakre
14 years ago

I just high-level tested the UI regarding this fix against current trunk. It does not work for sorted pagination. Bulk actions still make you loose the sorting in sorted pagination. Sorting again after bulk actions will bring you back to page 1.

Same is in #16162 (related as well), the more general bug about sorting is in #16166.

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

#10 @hakre
14 years ago

  • Keywords has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version set to 3.1

#11 @ocean90
14 years ago

  • Keywords has-patch added
  • Resolution set to fixed
  • Status changed from reopened to closed

hakre, please don't reopen all the tickets, create new ones, in this case it's #16166.
The problem mentioned by nacin is fixed here.

#12 @hakre
14 years ago

Yeah right, the title says "first page", not "wrong page". Right. Fixed in the sense of this title. Mind me, re-opening was in the process to find related tickets.

Does this "needs-testing" has any more meaning on this one?

Note: See TracTickets for help on using tickets.