Skip to content

[4.x]: Adding new site to a multi site setup gets links and assets messed up. #16936

@pnpaes

Description

@pnpaes

What happened?

Description

I have a multi site installation with 6-7 web sites.
I have a rule in my folders that assets that each website can only select assets from their own folders, and that is setup using the site handle. It works fine and the assets upload and selection are properly set to each folder based on the website the user is editing.
When I need to enabled a new site things get all messed up. Since in theory the new site can't access the images from the original site some of them seem to be moved (not cloned) into a folder with the new website handle.
That means that the assets are moved and the original website misses a lot of its images/assets.
Another isse is with links. Some links get broken when duplicating the website and they still get related to the entries int he original website instead of the cloned website (like some links in navigation).
So there is a lot of manual work to fix this every time I need to enable a new website.

Steps to reproduce

  1. Go to settings -> sites
  2. Add a new site
  3. Go to setting -> sections
  4. Enable section in the new website

Expected behavior

I would expect that all links that were created by selecting an entry in the original website, would get changed to the entry in the duplicated site. Either assets would be cloned into the new folder and connections updated (dream scenario) or they would still only in the original folder and wouldn't break the original website. Although th

Actual behavior

As described previously, assets get moved and then losing reference in the original website.
Links are not updated and are linked to the original website.

Craft CMS version

4.14.11

PHP version

8.3.4

Operating system and version

Linux 5.15.0-125-generic

Database type and version

MySQL 8.0.41

Image driver and version

GD 8.3.4

Installed plugins and versions

Plugins
CKEditor 3.11.1
Colour Swatches 4.5.3
Control Panel Nav 4.0.12
Cookie Manager 1.0.11
Cookies 4.0.1
DigitalOcean Spaces Filesystem 2.0.0
Feed Me 5.11.0
Field Manager 3.0.9
Image Resizer 3.0.13
Neo 4.4.1
Redactor 3.1.0
SEOMate 2.3.1
Super Table 3.0.15

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions