[wp-trac] [WordPress Trac] #46587: class-wp-list-table.php ignores WP_SITEURL

WordPress Trac noreply at wordpress.org
Thu Mar 21 13:35:24 UTC 2019


#46587: class-wp-list-table.php ignores WP_SITEURL
--------------------------+-----------------------------
 Reporter:  mdirickxwtd   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 WP list table ignores values set in wp_siteurl and returns wrong links.
 This is disastrous in case of reverse proxies.

 This tracked the problem to line 798 and 1082 in wp-admin/includes/class-
 wp-list-table.php which to me seemed to ignore the wp_siteurl settings:

 {{{#!php
 <?php
 $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] .
 $_SERVER['REQUEST_URI'] );
 }}}




 Changing it to
 {{{#!php
 <?php
 $current_url = set_url_scheme(  wp_guess_url(). $_SERVER['REQUEST_URI'] );
 }}}

 seemed to resolve the issue (on my end). Not sure if this a decent
 approach though, I'm not familiar to wp code. There might be more logic
 going on afterwards. I just needed something quick and dirty that works.



 **Background info**

 I'm running into this issue as I have a reverse proxy in front of my site.
 The reverse proxy is accessible at https://wiki.example.com, the actual
 site is at http://int.ern.al.IP/wiki. With the current approach, a lot of
 links are structured as http://int.ern.al.IP/wiki/wp-... which breaks the
 site.

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


More information about the wp-trac mailing list