Opened 9 years ago
Closed 9 years ago
#33620 closed defect (bug) (fixed)
When creating a new subdirectory site, scheme is always set to http
Reported by: | johnbillion | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch has-unit-tests commit |
Focuses: | multisite | Cc: |
Description
As reported by @thomaswm: 14172#comment:16
When adding a new site to a multisite that uses https
only and uses subdirectories, the scheme for the new site is set to http
instead of https
.
The same issue affects subdomain installations too, but as per #27499 this is a wontfix due to potential issues with SSL/TLS configuration. It should be fixed for subdirectory installations though. A patch similar to the one on #27499 could be used, with a condition that it only operates on subdirectory installations.
Attachments (3)
Change History (11)
#2
in reply to:
↑ 1
@
9 years ago
Replying to johnbillion:
This is blocked by #33041
I wonder why install_blog()
calls get_blogaddress_by_id()
to retrieve the URL from the database when it could have just as easily been passed to install_blog()
as a function parameter. The path and domain are stored as variables in wpmu_create_blog()
but they aren't passed on to install_blog()
.
Line 1161 in wp-includes/ms-functions.php
would have to be changed to
install_blog($blog_id, $title, $url);
and then the call to get_blogaddress_by_id()
would be obsolete.
@
9 years ago
Until #14867 is resolved, this sets the schema to https if the site being created is part of a sub directory install and the site home is also https. based on https://core.trac.wordpress.org/attachment/ticket/27499/27499.diff
#3
follow-up:
↓ 4
@
9 years ago
While 33620.diff does automatically pick the schema, is that the best experience for the user when creating a site? Should we add an option to /wp-admin/network/site-new.php that allows them to chose if the new site should be http or https?
#4
in reply to:
↑ 3
@
9 years ago
Replying to tryon:
While 33620.diff does automatically pick the schema, is that the best experience for the user when creating a site? Should we add an option to /wp-admin/network/site-new.php that allows them to chose if the new site should be http or https?
It would definitely be nice if the scheme could be chosen in site-new.php
. There's already a ticket for the modification of this admin page: #31240
#5
@
9 years ago
- Milestone changed from Awaiting Review to 4.4
- Owner set to johnbillion
- Status changed from new to reviewing
#6
@
9 years ago
- Keywords has-patch has-unit-tests added; needs-patch removed
33620.2.diff expands on @tryon's patch to correctly handle sites which use mixed HTTP/HTTPS schemes, and adds tests for the various incarnations.
This is blocked by #33041