Opened 3 years ago

Closed 2 years ago

Last modified 2 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:
Priority: high Milestone: 3.1
Component: Administration Version: 3.1
Severity: normal Keywords: needs-testing has-patch
Cc: garyc40@…

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

Download all attachments as: .zip

Change History (14)

garyc402 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).

  • Keywords has-patch, added; has_patch, removed

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

garyc402 years ago

removed prop changes from patch

comment:4 follow-up: ↓ 5   garyc402 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   scribu2 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/

  • 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

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

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

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 2 years ago by hakre (previous) (diff)
  • Keywords has-patch, removed
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version set to 3.1
  • 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.

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.