Closed tomdavies closed 2 years ago
This is sortof by design because volumes are only loosely coupled to their filesystems – we are expecting it will be common to actually set the Asset Filesystem setting to an environment variable, so the filesystem may vary from environment to environment (e.g. a Local FS on dev, and an S3 FS on production).
So as of the next release, Craft will start updating volumes’ Filesystem settings when an FS handle changes, but only for volumes where the FS handle was hardcoded, as opposed to referenced via an environment variable.
👍 makes sense
Craft 4.0.0-RC1 is out now with this change.
What happened?
Description
As of Beta 4, changing the handle of a local or remote (S3 tested) Filesystem breaks asset fields that use volumes that use that filesystem.
This is because the
volumes
table referencesfs
by handle, and this is not updated when a fs is saved/changed.Steps to reproduce
FWIW this is with an upgraded C3 site using project config, not tested with a clean C4 install.
Expected behavior
I can change the handle of a File System without issue:
Actual behavior
Craft CMS version
4.0.0-beta.4
PHP version
8.0.16
Operating system and version
nitro
Database type and version
mysql 8
Image driver and version
No response
Installed plugins and versions
"craftcms/aws-s3": "^2.0.0-beta.2", "craftcms/redactor": "3.0.0-beta.1", "nystudio107/craft-seomatic": "^4.0.0-beta.6", "verbb/super-table": "^3.0.0-beta.3",