After going through the upgrading process as described in the docs, there seems to be an issue with assets.
Everything else seems to be fine, /dev/build has no errors, but in the Files area all files listed show ‘File cannot be found’.
I’ve copied all files from ‘assets’ to ‘public/assets’ and left the paths in the database as they were.
“In order to retain existing file paths in line with framework version 3 you should set the \SilverStripe\Filesystem\Flysystem\FlysystemAssetStore.legacy_paths config to true.”
From what I can see, “SilverStripe\Filesystem\Flysystem\FlysystemAssetStore.legacy_paths” simply doesn’t exist (neither the class, nor the property).
Closest thing I could find is “SilverStripe\Assets\Flysystem\FlysystemAssetStore.legacy_filenames”, but setting this to true doesn’t fix the problem for me.
you need to run MigrateFileTask to update the files in DB. Be aware that if you use Subsites module the subsites filter also kicks in and you need to migrate the files per subsite.
seems like MigrateFileTask is not working for SilverStripe 4.1 yet.
There is a check for each file which doesn’t take the new ‘public’ folder into account:
// Make sure this legacy file actually exists
$path = $base . '/' . $legacyFilename;
should be
// Make sure this legacy file actually exists
$path = $base . '/public/' . $legacyFilename;
after this change, the task succeeds for all files.
doesn’t really help though: all files in the filesystem are now 0 bytes!