Action "replace file" in nested File Storage leads to missing file references
This is not really a bug and more than anything the result of a configuration mistake. BUT the side effects are rather irritating and nothing warns you about the (probable) misconfiguration.
To reproduce the issue, you have two File Storage spaces (not File Mounts):
- fileadmin/ (auto-created) (ID: 1)
- fileadmin/redaktion (ID: 2)
Add files to a content element (or any record for that matter) from the File Storage with ID 2 (this is what a user of type editor would do).
Now use the file replace action while in File Storage with ID 1 (most likely what an admin user would do) WITH the option "keepfiletitle" disabled (you want to replace the file name).
The file that you just replaced is the same for File Storage 1 & 2 but now all file references for File Storage 2 link to the (now missing) previous file name.
The behaviour is expected. TYPO3 does not check whether file storages are nested and only checks file references for the current file storage. With this in mind, nested file storages should not be allowed (this is what File Mounts are for) OR some form of additional check should look for files with the same hash in different storage locations and throw an exception or at least give some kind of warning.
What do you think about this? Nested storages are possible but lead to bugs when not used correctly. Are additional checks useful / necessary?