silverstripe-asset-admin
silverstripe-asset-admin copied to clipboard
Replacing an asset. Asset admin doesn't show the new filename.
SS4.4.4 Replacing an asset. Asset admin doesn't show the new filename. This is confusing for content authors, cause they think nothing has changed (although the content of the file is updated). Searching for the newly update file, doesn't return any results either, so content authors really think that their new file isn't active
My guess is this may be caused by the same issue: https://github.com/silverstripe/silverstripe-asset-admin/issues/1012#issuecomment-535244177
Would you be able to check if composer update fixes it?
composer update doesn't change anything. using SS4.4.4 and silverstripe-assets 1.4.5
I cannot reproduce the issue on SS 4.4.4 (with assets 1.4.5). Need more details.
Would you be able to provide:
- the browser version (and if there are any errors in console)
silverstripe/assetscommit hash (is it68aea23?)- any errors in the server logs?
- do you have a multi-server setup?
- nothing in the error log
- tested on latest chrome, firefox and safari on mac
-
"name": "silverstripe/assets", "version": "1.4.5", "source": { "type": "git", "url": "
https://github.com/silverstripe/silverstripe-assets.git", "reference": "68aea23a32a23207c13df7dddfaf68d17e74274a"
Op zo 29 sep. 2019 om 23:08 schreef Serge Latyntsev < [email protected]>:
I cannot reproduce the issue on SS 4.4.4 (with assets 1.4.5). Need more details.
Would you be able to provide:
- the browser version (and if there are any errors in console)
- silverstripe/assets commit hash (is it 68aea23?)
- any errors in the server logs?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/silverstripe/silverstripe-asset-admin/issues/1010?email_source=notifications&email_token=AAXUROOSNZYEJ6XTXNPADD3QMEKMTA5CNFSM4IZ4X2SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD736WRA#issuecomment-536341316, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXUROJ4NQZ6HHBXMCWI6V3QMEKMTANCNFSM4IZ4X2SA .
I had a look. I think I see the offending behaviour.
- You start with
fileA.jpg. - You're editing
fileA.jpgand use the "replace file" to substitute it withfileB.jpg
Expected behaviour
- Content of file gets updated.
- Filename should be updated to
fileB.jpgand Title should be update to "File B".
Actual behaviour
- Content of file gets updated.
- Filename remains to
fileA.jpgand Title remains to "File A".
I've recorded what I'm seeing https://youtu.be/r1estFLxml4
If that's the actual problem we're talking about, I'm not 100% sure it's an issue. I could imagine scenarios where the expected behaviour when replacing a file is to retain the existing meta data.
Ok, I see. I could not reproduce because it does change the filename when you upload a file with a different extension (e.g. jpg -> jpeg) and apparently It does not change when the file extension matches between the files.
I can confirm that specifically the filename field doesn't get updated if you replace file with a file that has a different extension, but does get updated if you replace file with a file that has the same extension as the original file.
Probably the fix here is to consistently not change the filename until the user has clicked save or publish.