Opened 13 years ago
Closed 11 years ago
#18944 closed defect (bug) (invalid)
wrong url in sortable column headers when behind a reverse proxy
Reported by: | gamboz | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2.1 |
Component: | Administration | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
Hi, I have a wordpress site behind a reverse proxy. All works fine but for the urls used in the headers of sortable columns.
For instance, the links of "Title", "Author", etc. of the table of posts in wp-admin/edit.php --> Posts report something like "http://backend/backend-dir/..." while they should be "http://frontend/frontend-dir/...".
I don't think this is a proxy configuration problem because, AFAICS, the rest of the site is working: I can make posts, pages, media, install themes and plugins.
I tried to play with $current_url al line 649 of
wp-admin/includes/class-wp-list-table.php
but with no luck.
I suppose that pagination may have the same problem.
Attachments (1)
Change History (11)
#1
@
13 years ago
Other things that fail:
. redirect from "bulk actions": here _wp_http_referrer is "/bakend-dir/..." but should be "/frontend-dir/...". Only the redirect fails, the action is done.
. delete plugins: the form action is "/bakend-dir/..." but should be "/frontend-dir/..."
The screen options (top right-hand-side of the dashboard) also have the _wp_http_referrer wrong, but I did not experience any problem there.
#2
@
13 years ago
- Cc kpayne@… added
- Keywords reporter-feedback added
Check the logic in the wp_fix_server_vars()
function on your site.
I have a reverse proxy setup here (apache mod_proxy), but cannot reproduce this.
#3
@
13 years ago
I'm also using apache mod_proxy.
I think I can get rid of the problem if
. ProxyPreserveHost On
. backend-dir == frotend-dir (and change "WordPress address" and "Site address" accordingly)
Could you confirm this? I.e. do you get my same problem with
. ProxyPreserveHost Off
. backend-dir != frotend-dir
If this is so, I don't know if this can still be considered a bug or, maybe a kind of "wanted feature"...
#4
@
13 years ago
- Version changed from 3.2.1 to 3.3.1
I have the same issue. I have my apache server behind an nginx proxy.
* The rest of the site uses the correct URL via site_url(), so there's no reason this function should deviate. *
Here's a fix as of 3.3.1 that I've tested on the plugins page:
*** class-wp-list-table.php 2012-03-22 07:53:09.898792699 -0400 --- class-wp-list-table.php.bak 2012-03-22 07:46:39.742794005 -0400 *************** class WP_List_Table { *** 492 **** ! $current_url = site_url() . $_SERVER['REQUEST_URI']; --- 492 ---- ! $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; *************** class WP_List_Table { *** 651 **** ! $current_url = site_url() . $_SERVER['REQUEST_URI']; --- 651 ---- ! $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
#5
@
13 years ago
- Version changed from 3.3.1 to 3.2.1
The version field is used to track when the bug was first reported or reproduced.
#7
@
12 years ago
- Cc t@… added
Note: We had a problem with this as well with our multisite-installation that runs behind a apache rewrite rule. We ended up overwriting the $_SERVER['HTTP_HOST']
to work around it. See http://wordpress.org/support/topic/err_too_many_redirects-nur-unter-wp-adminnetwork for details.
problematic links