[MGNLDAM-274] Sometime the Thumbnail preview image displayed in the UploadField display the wrong Image. Created: 03/Jul/13  Updated: 04/Jul/13  Resolved: 03/Jul/13

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.0.1

Type: Bug Priority: Critical
Reporter: Eric Hechinger Assignee: Eric Hechinger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Some time the image displayed in the Upload field show the wrong image.

see:
https://vaadin.com/forum#!/thread/870107



 Comments   
Comment by Eric Hechinger [ 03/Jul/13 ]

Could no more reproduce this issue. Should be solved.

Comment by Mikaël Geljić [ 03/Jul/13 ]

I've got a reproducible use case:

In the UploadField, URL of requested image is always something not very specific, like:
/magnolia-bundled-webapp/.magnolia/admincentral/APP/connector/0/103/source

1. Open contacts
2. Edit contact A
3. Restart application
4. Open contacts
5. Edit contact B
=> contact A image is shown.

This is because in each session, Vaadin produced the same connector hierarchy, with the same connector IDs, hence:

  • image URL is the same as before
  • browser will cache it
  • flushing browser cache in between should no longer show the problem
  • the problem appears on the client-side

We should indeed try to squeeze the actual file name somewhere for that component, same kind of URLs as Thumbnail view uses, e.g.
/magnolia-bundled-webapp/.imaging/thumbnail/contacts/000bfdc8-1b0d-42b8-b8ef-ad9390059afd/galileo.2012-08-31-19-29-03.png
except that upload field doesn't seem to use imaging module/image provider.

Side note: my issue with duplicate images in ThumbnailView is a different one, for some reason, wrong image is resolved on the server-side. Will create a separate ticket.

Comment by Mikaël Geljić [ 03/Jul/13 ]

Indeed, resolved with timestamp.

Just leaving an additional note: I was wondering whether we can use file.getName() (+ it already has a timestamp) instead of custom makeFilename(). Only issue then is that File object is not recreated when re-uploading on top, so in that case file name would no longer be in sync.

Generated at Mon Feb 12 04:58:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.