[wp-trac] [WordPress Trac] #31057: Multisite ignores the WordPress install directory (was: Multisite ignores the Wordpress install directory)

WordPress Trac noreply at wordpress.org
Tue Feb 10 22:42:12 UTC 2015


#31057: Multisite ignores the WordPress install directory
----------------------------+------------------------------
 Reporter:  FolioVision     |       Owner:
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Bootstrap/Load  |     Version:  4.1
 Severity:  major           |  Resolution:
 Keywords:  needs-patch     |     Focuses:  multisite
----------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> 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: #23221

New description:

 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: #23221

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31057#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list