[wp-trac] [WordPress Trac] #31057: Multisite ignores the Wordpress install directory
WordPress Trac
noreply at wordpress.org
Mon Jan 19 16:42:07 UTC 2015
#31057: Multisite ignores the Wordpress install directory
----------------------------+-----------------------------
Reporter: FolioVision | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 4.1
Severity: normal | Keywords:
Focuses: multisite |
----------------------------+-----------------------------
Our Wordpress Multisite is located in https://our-site.com/wordpress but
the homepage is just https://our-site.com/
We see the issue that "Lost your Password" link on login screen is not
using our site directory at all.
Here's the relevant part of our wp-config.php
{{{
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'our-site.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
}}}
If we set PATH_CURRENT_SITE to /wordpress/ then the "Lost your Password"
link works, but the wp-admin/network pages won't open. They end up in an
endless loop because of $redirect_network_admin_request in wp-
admin/network/admin.php
Here's our '''quick fix''' to be put into wp-content/mu-plugins (you need
to specify your WP directory as a path there):
https://gist.github.com/foliovision/52e8a2bc5ae68eb73844
----
The problematic function is '''network_admin_url()''' and the fact that it
doesn't count on putting Wordpress into a directory at all. It's using the
global variable $current_blog which is initialized in ms-settings.php. The
variable should not only store the path to the site front-end, but also
the Wordpress directory, so that it can reference individual PHP files
properly.
Similar bug is recorded here, but it's for Wordpress 3.5:
https://core.trac.wordpress.org/ticket/23221
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31057>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list