[wp-trac] [WordPress Trac] #15360: posts_nav_link misbehaves in wpmu->3.0 multisites

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 17 20:26:36 UTC 2010


#15360: posts_nav_link misbehaves in wpmu->3.0 multisites
--------------------------+-----------------------------
 Reporter:  madtownlems   |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------------

Comment (by MadtownLems):

 Some updates!
 For starters, this bug only matters on the first page of results, where it
 repeats the site name in the URL.  If you url hack one of the instances
 out to get to page 2, the links there, for forward and back, work as
 expected.
 I did a bunch more debugging, and believe the problem is here, within
 get_pagenum_link

 right after setting home_root, there are two preg_replace calls on
 $request.


 Here's what happens when it's done right, a la subsequent pages after the
 first, such as:
 http://dev.myschool.edu/jason/page/2/?s=test&x=0&y=0

 in get_pagenum_link, before anything with request, request is apparently
 []
 home_root has been defined as [/jason/]
 after the first preg_replace on #request it is [page/2/?s=test&x=0&y=0]
 after the 2 preg_replaces on request, it is now [page/2/?s=test&x=0&y=0]

 When it is done WRONG, a la the first page, here is what is done (url is:
 dev.myschool.edu/jason?s=test&x=0&y=0)

 in get_pagenum_link, before anything with request, request is apparently
 []
 home_root has been defined as [/jason/]
 after the first preg_replace on #request it is [/jason?s=test&x=0&y=0]
 after the 2 preg_replaces on request, it is now [jason?s=test&x=0&y=0]

 hopefully that gives enough info and tees it up for someone who actually
 knows what's going on to fix :)
 let me know if you need more info

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15360#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list