What happened?
Description
Assets are being saved to the wrong folder when uploading to a field with 'Restrict assets to a single location' and {site.handle} inside the Asset Location. Able to reproduce on 3.7.67 and 4.3.10.
Steps to reproduce
- On a multisite install with Site A and Site B
- Add an Assets field with 'Restrict assets to a single location' checked and the Asset Location
{site.handle}
- On a new Entry in Site A, upload an image -> save Entry
- Asset will be saved to the
siteB folder
- Switch to Site B, upload another asset
- All assets will be moved to
siteA folder
Expected behavior
Assets will be saved to the folder corresponding to the site being edited.
Actual behavior
All Assets are moved after saving an Entry.
Here are Composer files and a database dump from a fresh install with the above setup to hopefully help quickly reproduce: composer-db.zip
Craft CMS version
4.3.10 and 3.7.67
PHP version
8.0
Operating system and version
No response
Database type and version
MariaDB 10.4
Image driver and version
No response
Installed plugins and versions
What happened?
Description
Assets are being saved to the wrong folder when uploading to a field with 'Restrict assets to a single location' and
{site.handle}inside the Asset Location. Able to reproduce on 3.7.67 and 4.3.10.Steps to reproduce
{site.handle}siteBfoldersiteAfolderExpected behavior
Assets will be saved to the folder corresponding to the site being edited.
Actual behavior
All Assets are moved after saving an Entry.
Here are Composer files and a database dump from a fresh install with the above setup to hopefully help quickly reproduce: composer-db.zip
Craft CMS version
4.3.10 and 3.7.67
PHP version
8.0
Operating system and version
No response
Database type and version
MariaDB 10.4
Image driver and version
No response
Installed plugins and versions