[wp-trac] [WordPress Trac] #29709: get_pagenum_link and double domain

WordPress Trac noreply at wordpress.org
Fri Sep 19 10:17:52 UTC 2014


#29709: get_pagenum_link and double domain
--------------------------+-----------------------------
 Reporter:  palmiak       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Permalinks    |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 get_pagenum_link generates links with double domain, for example:
 http://domainname.com/http://domainname.com/page/2

 The problem doesn't exist on every server and it only appers when you are
 using query_posts (probably new WP_query also).

 A the start of get_pagenum_link() there is $request = remove_query_arg(
 'paged' ); which gets data from $_SERVER. When I'm not using query posts
 [REQUEST_URI] => /test/page/3/ , but after using it I get [REQUEST_URI] =>
 http://domainname.com/test/page/3/ .

 I think there should be a check if REQUEST_URI doesn't contain domainname.

 This bug was also found https://wordpress.org/support/topic/error-in-link-
 url-domain-name-appears-twice

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29709>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list