[wp-trac] [WordPress Trac] #23229: Pagination Links Broken
WordPress Trac
noreply at wordpress.org
Thu Jan 17 23:11:05 UTC 2013
#23229: Pagination Links Broken
-----------------------------+--------------------------
Reporter: ssmathias | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Permalinks
Version: | Severity: normal
Keywords: has-patch |
-----------------------------+--------------------------
Currently, if the request URL ends with "page/[\d]+/?" it will always
assume that it is the pretty version of the paged parameter, and rewrite
that section of the URL.
This breaks in any condition where a numeric value follows that string at
the end of a URL. An example that can be easily reproduced is as follows:
1) Set theme to TwentyEleven
2) Modify the theme to output the results of get_pagenum_link(2) anywhere.
3) Change permalink structure to "/daily-
page/%year%/%monthnum%/%post_id%/"
4) Go to a year archive for the permalink structure above.
5) The result of the get_pagenum_link will look like this:
"/daily-/page/2/", breaking pagination within this context.
I've attached a patch against current trunk code that addresses this,
providing the following features:
1) Pagination links functional in the scenario above, along with custom
rewrite rules.
2) Updated to allow numeric post names for hierarchical post types
(currently always rewritten with "-2")
3) Updated get_pagenum_link filter to include pagenum parameter as it was
passed in.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23229>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list