[wp-trac] [WordPress Trac] #33909: The `home` option not equivalent to the WP_HOME constant value in multisite and single instance

WordPress Trac noreply at wordpress.org
Thu Sep 17 07:41:19 UTC 2015


#33909: The `home` option not equivalent to the WP_HOME constant value in multisite
and single instance
--------------------------------+-----------------------------
 Reporter:  jlambe              |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  trunk
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 Hi,

 for this issue, I'm running a multisite instance with custom WordPress and
 wp-content directory paths where I set the constants '''WP_SITEURL''' and
 '''WP_HOME''' values as follow:

 * WP_HOME: http://mydomain.com/
 * WP_SITEURL: http://mydomain.com/cms (where WordPress is installed)

 All the process during the installation is working perfectly and the
 multisite instance is installed as expected...except when you click on the
 admin toolbar button '''Visit site''' for example.

 Here is the issue, the site URL is set as '''http://mydomain.com/cms'''
 where it should be '''http://mydomain.com'''. This issue is becoming a
 user experience issue because both URLs with and without the '''cms''' URI
 are working. But all anchor tags href attribute have the wrong value.

 When looking at the database '''wp_options''' table, we can see that both
 '''home''' and '''siteurl''' options have a value of
 '''http://mydomain.com/cms''' which should only be '''siteurl''' with this
 value.

 I'm filling this issue mainly for multisite because the anchor tags used
 to visit the site have the wrong value but note that even for single
 WordPress installation, the options values are wrong in the
 '''wp_options''' table. Both have the same value where only the
 '''siteurl''' should get '''cms''' URI in this example. But when you're on
 a single instance all anchor tags href attributes have the correct URL in
 order to visit the site where in multisite they are wrong.

 So there are 2 things to look at here probably:
 * First why the '''wp_options''' values are not equal to the set constants
 '''WP_HOME''' and '''WP_SITEURL'''?
 * Second, why in a single instance URLs are correct (even if values in the
 database are wrong) and not on multisite?

 Best regards

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


More information about the wp-trac mailing list