[wp-trac] [WordPress Trac] #36201: Admin Pagination URLs Use Wrong Hostname
WordPress Trac
noreply at wordpress.org
Thu May 10 09:03:34 UTC 2018
#36201: Admin Pagination URLs Use Wrong Hostname
-------------------------------------------------+-------------------------
Reporter: grimmdude | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing dev- | Focuses:
feedback close |
-------------------------------------------------+-------------------------
Comment (by viliusl):
As stated above, this is rare problem, but still happens if WP is used
with proxy.
And fix is easy: take host from DB, not form $_SERVER (WP already doing
it, sadly, not everywhere).
https://github.com/WordPress/WordPress/blob/aaf99e691391cfceb004d848450dbbf3344b1bee
/wp-admin/includes/class-wp-list-table.php#L793
{{{#!php
<?php
$siteurl = get_option('siteurl');
$current_url = parse_url($siteurl, PHP_URL_SCHEME) . '://' .
parse_url($siteurl, PHP_URL_HOST) . $_SERVER['REQUEST_URI'];
}}}
p.s. similar situation with sorting:
https://github.com/WordPress/WordPress/blob/aaf99e691391cfceb004d848450dbbf3344b1bee
/wp-admin/includes/class-wp-list-table.php#L1077
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36201#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list