[buddypress-trac] [BuddyPress Trac] #5967: Paginate links are stuck on a page number if javascript is disabled
buddypress-trac
noreply at wordpress.org
Mon Oct 27 20:37:11 UTC 2014
#5967: Paginate links are stuck on a page number if javascript is disabled
----------------------------+-----------------------------------
Reporter: imath | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.2
Component: All Components | Version:
Severity: normal | Keywords: has-patch 2nd-opinion
----------------------------+-----------------------------------
Working on #5960, i've noticed that in case '''javascript is disabled''',
pagination links are stuck on the last paginate link clicked.
Let's take an example on members directory :
- 60 members > 3 pages
- the directory is just displayed : pagination links are :
- current 1
- {{{?upage=2}}}
- {{{?upage=3}}}
- You click on page 2, pagination links are :
- {{{?upage=2}}}
- current 2
- {{{?upage=2}}}
Every component using {{{paginate_links()}}} is concerned. The problem is
due to the fact that in this function, this part :
{{{
$url_parts = explode( '?', $pagenum_link );
if ( isset( $url_parts[1] ) ) {
wp_parse_str( $url_parts[1], $query_args );
}
}}}
is getting the query arguments of the url, in the second part of my
exemple, as we have clicked on page 2, it's getting the
{{{$_GET['upage']}}} which is overriding the page argument.
I suggest to use the {{{'add_args'}}} argument of this function to pass
the extra arguments if needed (instead of using the {{{'base'}}} one) else
to pass an empty array to avoid this issue.
See attached patch
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5967>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list