WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#16208 closed defect (bug) (fixed)

Redirect list table requests with paged greater than total pages.

Reported by: markjaquith Owned by: markjaquith
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:

Description

Some list table pages have redirects for when paged is greater than the total number of pages. Some list table pages don't have the redirect. We should centralize this behavior.

See #16187

Attachments (3)

garyc40.16208.diff (4.8 KB) - added by garyc40 3 years ago.
first attempt, needs sanity check
garyc40.16208.2.diff (4.9 KB) - added by garyc40 3 years ago.
check for headers_sent() as well, so that it won't break plugins and themes in case they prepare_items() after headers are sent
16208.patch (4.4 KB) - added by johnjamesjacoby 3 years ago.
Refresh for updates to plugin-install.php and theme-install.php

Download all attachments as: .zip

Change History (13)

garyc403 years ago

first attempt, needs sanity check

comment:1 garyc403 years ago

  • Keywords has-patch needs-testing 3.2-early added

garyc403 years ago

check for headers_sent() as well, so that it won't break plugins and themes in case they prepare_items() after headers are sent

comment:2 markjaquith3 years ago

  • Owner set to markjaquith
  • Status changed from new to accepted

comment:3 garyc403 years ago

Related #16356

comment:5 SergeyBiryukov3 years ago

With ticket:16357:garyc40.16356.2.diff, hasn't this actually become a duplicate of #16357?

comment:6 garyc403 years ago

I thought so at first, but then it seems like ticket:16357:garyc40.16356.2.diff is too much for 3.1 when we're at RC 3.

Mark Jaquith agreed that we could try that patch out early in 3.2. So I guess it's safe to leave this ticket open until then.

I'll refresh the patch we have here after 3.1 is out.

comment:7 scribu3 years ago

  • Keywords 3.2-early removed
  • Milestone changed from Future Release to 3.2

johnjamesjacoby3 years ago

Refresh for updates to plugin-install.php and theme-install.php

comment:8 johnjamesjacoby3 years ago

Tested garyc40.16208.2.diff and refreshed to 16208.patch. Some changes to plugin-install.php and theme-install.php caused it to not apply cleanly.

Tested pagination out of bounds on all the changed pages, and it behaves as intended.

comment:9 jane3 years ago

  • Type changed from enhancement to defect (bug)

comment:10 markjaquith3 years ago

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

In [17900]:

Centralize pagination bound exceeding redirects for list tables. props garyc40. props johnjamesjacoby. fixes #16208

Note: See TracTickets for help on using tickets.