Opened 22 months ago
Last modified 6 months ago
#18242 new defect (bug)
Changing domain for a network blog make faulty changes in database
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Multisite | Version: | 3.0 |
| Severity: | major | Keywords: | has-patch dev-feedback |
| Cc: | marko@…, coenjacobs@… |
Description
When changing the domain for a network blog, if the network is set up on a subdomain and using sub-folder options for blogs, the save to the database is faulty, saving wrong urls.
The network main site uses eg http://my.blog.com and the blogs has http://my.blog.com/blog1
When changing the domain for blog1 in "Network admin -> All Sites -> Edit blog1" and choose to also update "home and siteurl" the new url for home and site become http://blog.com/blog1/my
Happens in both Firefox 5 and Safari 5.1
Attachments (2)
Change History (14)
comment:1
SergeyBiryukov — 22 months ago
comment:2
darkwhispering — 22 months ago
All plugins is deactivated and the installation is fresh, but it is local, forgot to mention that is the above description.
I and a co-worker of mine have this bug/problem with fresh localhost WP install on Mac OS X Snow Leopard and Lion using the built-in apache and mysql.
comment:3
SergeyBiryukov — 22 months ago
I've created the exact same structure on a local installation of 3.3-trunk, but whatever I enter into Domain and Path fields for blog1 and whether I check “Update siteurl and home as well” or not, it just saves what I entered.
I may be missing some step. What are the domain and path you set there?
comment:4
darkwhispering — 22 months ago
- Installing WP in a subdomain like http://my.blog.com
- Turn it into a Network with the subfolder option so the future blogs will have http://my.blog.com/blog1
- For the "blog1" in network admin I change domain to http://my.blog.org and leave the path as it is (blog1)
- Check the "update siteurl and home as well" checkbox
- Update
- Taking a look in the database, and the siteurl and home url now looks "http://blog.org/blog1/my
I have not yet done a new install myself, will do that soon, and then try this again to see what happens.
comment:5
SergeyBiryukov — 22 months ago
- Keywords needs-patch added
Ah, I didn't look in the database, because Edit Site screen still displayed valid data. Now I see it.
comment:6
darkwhispering — 22 months ago
Ah, yes. The site displays right, but the data in the database get saved wrong.
SergeyBiryukov — 22 months ago
SergeyBiryukov — 22 months ago
comment:7
SergeyBiryukov — 22 months ago
- Keywords has-patch added; needs-patch removed
Introduced in [12978] as a fix #12119:
$blog_address = get_blogaddress_by_domain($_POST['blog']['domain'], $_POST['blog']['path']);
This is the only place in core where get_blogaddress_by_domain() is used.
Related WPMU changeset:
r266. If I had to guess, it has something to do with WPMU working in a subfolder.
Not sure if it's a good idea to change get_blogaddress_by_domain() due to backward compatibility reasons, so I've attached patches with two different attempts to fix the issue.
comment:8
markoheijnen — 18 months ago
- Cc marko@… added
- Keywords dev-feedback added
- Severity changed from normal to major
- Version changed from 3.2.1 to 3.3
In my opinion opinion this should be fix soon. This will break WordPress functionality since the url can't be access.
comment:9
CoenJacobs — 18 months ago
- Cc coenjacobs@… added
- Milestone changed from Awaiting Review to 3.4
- Version changed from 3.3 to 3.0
Version number indicates when the bug was initially introduced.
comment:11
nacin — 13 months ago
- Milestone changed from 3.4 to Future Release
comment:12
SergeyBiryukov — 6 months ago
Related: #20544

Cannot reproduce. Have you tried with all plugins deactivated?