silverstripe-asset-admin icon indicating copy to clipboard operation
silverstripe-asset-admin copied to clipboard

Replacing an asset. Asset admin doesn't show the new filename.

Open guyvanbael opened this issue 6 years ago • 7 comments

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

guyvanbael avatar Sep 24 '19 08:09 guyvanbael

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?

dnsl48 avatar Sep 25 '19 23:09 dnsl48

composer update doesn't change anything. using SS4.4.4 and silverstripe-assets 1.4.5

guyvanbael avatar Sep 27 '19 11:09 guyvanbael

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?
  • do you have a multi-server setup?

dnsl48 avatar Sep 29 '19 21:09 dnsl48

  • 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 .

guyvanbael avatar Oct 03 '19 06:10 guyvanbael

I had a look. I think I see the offending behaviour.

  • You start with fileA.jpg.
  • You're editing fileA.jpg and use the "replace file" to substitute it with fileB.jpg

Expected behaviour

  • Content of file gets updated.
  • Filename should be updated to fileB.jpg and Title should be update to "File B".

Actual behaviour

  • Content of file gets updated.
  • Filename remains to fileA.jpg and 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.

maxime-rainville avatar Oct 28 '19 23:10 maxime-rainville

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.

dnsl48 avatar Oct 29 '19 00:10 dnsl48

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.

GuySartorelli avatar Apr 13 '22 22:04 GuySartorelli