WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15416 closed defect (bug) (fixed)

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

Reported by: 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 4 years ago.
garyc40-15416-revised.patch (3.5 KB) - added by garyc40 4 years ago.
removed prop changes from patch

Download all attachments as: .zip

Change History (14)

@garyc404 years ago

comment:2 @garyc404 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).

comment:3 @scribu4 years ago

  • Keywords has-patch added; has_patch removed

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

@garyc404 years ago

removed prop changes from patch

comment:4 follow-up: @garyc404 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.

comment:5 in reply to: ↑ 4 @scribu4 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/

comment:6 @scribu4 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

comment:7 @scribu4 years ago

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

comment:8 @scribu4 years ago

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

comment:9 @hakre4 years ago

Related: #16162

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

comment:10 @hakre4 years ago

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

comment:11 @ocean904 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.

comment:12 @hakre4 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.