Opened 17 years ago
Closed 17 years ago
#4134 closed defect (bug) (fixed)
next_posts_link outputs a trailing question mark
Reported by: | charle97 | Owned by: | |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | 2.2 |
Component: | Template | Keywords: | |
Focuses: | Cc: |
Description
next_posts_link outputs a trailing question mark on any page 2 when using clean urls.
Attachments (1)
Change History (5)
#2
in reply to:
↑ description
;
follow-up:
↓ 3
@
17 years ago
commenting out the line
$qstr = remove_query_arg('paged', $qstr); for query style
in get_pagenum_link seems to fix it. i don't know how it affects the other permalink styles.
#3
in reply to:
↑ 2
@
17 years ago
further isolated the problem to add_query_arg.
specifically line 797 for query style and line 801 for clean urls:
791 if (strpos($uri, '?') !== false) { 792 $parts = explode('?', $uri, 2); 793 if ( 1 == count($parts) ) { 794 $base = '?'; 795 $query = $parts[0]; 796 } else { 797 $base = $parts[0] . '?'; 798 $query = $parts[1]; 799 } 800 } elseif (!empty($protocol) || strpos($uri, '/') !== false) { 801 $base = $uri . '?'; 802 $query = ''; 803 } else { 804 $base = ''; 805 $query = $uri; 806 }
Note: See
TracTickets for help on using
tickets.
Yep. Reproduced.