Opened 9 years ago
Closed 9 years ago
#33200 closed defect (bug) (duplicate)
Changing BLOG_ID_CURRENT_SITE breaks media
Reported by: | gilbitron | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2.3 |
Component: | Media | Keywords: | |
Focuses: | multisite | Cc: |
Description
Say you upload media to the default site and a subsite while BLOG_ID_CURRENT_SITE
is 1
. The media locations are as follows:
- Default site:
uploads
- Subsite:
uploads/sites/2
When you change BLOG_ID_CURRENT_SITE
to 2
the location of the media files changes so that it is now:
- Default site:
uploads/sites/1
- Subsite:
uploads
However no files are moved which results in broken media.
Change History (4)
#2
@
9 years ago
I'm not sure when someone would want to change their default site but I suppose it might happen. Regardless if you're going to allow the setting to be changed then it shouldn't break things.
#3
@
9 years ago
While the naming convention is horrible, this is a semi-impossible situation for us to help you recover from in code. You will have to move the files yourself. Changing BLOG_ID_CURRENT_SITE
is by hand a brute force tactic.
#4
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Thanks for the ticket, @gilbitron. I'm going to close this as a duplicate of #28365 as it deals with the location of media as well.
I'm not sure there's much we can do about it, but we can give it some thought.
Related/Duplicate: #28365
What's the use case for changing
BLOG_ID_CURRENT_SITE
at a later date?