Bug #44645

Preview images don't get a new filename after overwriting with updated file

Added by Marcel Burkhalter over 2 years ago. Updated 6 months ago.

Status:Resolved Start date:2013-01-18
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:File Abstraction Layer (FAL) Spent time: -
Target version:7.1 (Cleanup)
TYPO3 Version:6.2 Is Regression:No
PHP Version: Sprint Focus:On Location Sprint
Complexity:medium

Description

Steps to reproduce:
- Upload a file in the filelist
- Check filename of preview image (e.g.: preview_102455_4635_924f2e40ad.jpg)
- Overwrite with a file with the same filename but different file content
- Check preview filename again --> it stays the same
--> We've seen caching issues with IE9 because of this

As a workaround we added the following config in the .htaccess file:

<FilesMatch "^preview_.*\.(jpe?g|png|gif)$">
  FileETag none
  <ifModule mod_headers.c>
    Header unset ETag
    Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" 
    Header set Pragma "no-cache" 
    Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" 
  </ifModule>
</FilesMatch>

This worked for the filelist: we now see the correct preview image directly after overwriting without manual browser reload or browser cache clearing.
BUT: In the list or page module we still see the old preview image until the IE9 tab has been reloaded (without the .htaccess rule we had to clear the browser cache to see the updated preview image). Of course this all works flawlessly with FF :)


Related issues

related to Core - Bug #44073: Checksum needs to be updated after file processing Resolved 2012-12-17
related to Core - Task #44550: Preview image and database entry not deleted when deletin... Closed 2013-01-15
related to Core - Bug #56539: Update/Change file-hash when file is replaced with a new ... Closed 2014-03-04
related to Core - Bug #44105: Image size does not get updated Closed 2012-12-19

Associated revisions

Revision 5b9e6b81
Added by Ruud Silvrants 6 months ago

[BUFGIX] Add modification time to processedfile checksum

Added modification time to processed file checksum so the filename of
the processed files changes when the original is replaced.

Resolves: #44645
Releases: master, 6.2
Change-Id: I12bf445ee2a75a9a69b3d8e9603ae5035028a195
Reviewed-on: http://review.typo3.org/36530
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>
Reviewed-by: Philipp Thiele <>
Tested-by: Philipp Thiele <>
Tested-by: Andrea Herzog-Kienast <>
Reviewed-by: Roman Schürmann <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>

Revision 251e5205
Added by Ruud Silvrants 6 months ago

[BUFGIX] Add modification time to processedfile checksum

Added modification time to processed file checksum so the filename of
the processed files changes when the original is replaced.

Resolves: #44645
Releases: master, 6.2
Change-Id: I12bf445ee2a75a9a69b3d8e9603ae5035028a195
Reviewed-on: http://review.typo3.org/36898
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

History

#1 Updated by Andreas Wolf over 2 years ago

  • Status changed from New to Accepted

I suggest to include the timestamp or SHA1 hash in the name generation for the processed file. This should fix this and other issues around updating processed files. I'll have to check again though what is currently used for filename generation - maybe there's also a bug in there.

#2 Updated by Andreas Wolf over 2 years ago

  • Project changed from File Abstraction Layer to Core

#3 Updated by Andreas Wolf over 2 years ago

  • Category set to File Abstraction Layer (FAL)
  • Assigned To set to Andreas Wolf
  • Target version set to 6.0.2
  • TYPO3 Version set to 6.0

#4 Updated by Andreas Wolf over 2 years ago

This results from the filename not being adjusted in the patch for #44073. We'll have to tackle this.

#5 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19170

#6 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19170

#7 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19170

#8 Updated by Steffen Ritter over 1 year ago

  • Status changed from Under Review to Needs Feedback
  • Assigned To deleted (Andreas Wolf)
  • Is Regression set to No

the original patch set was abendonded

#9 Updated by Alexander Opitz over 1 year ago

  • Target version deleted (6.0.2)

Does the issue still exists? IMHO this was fixed in another issue.

#10 Updated by Sebastian Fischer about 1 year ago

I can confirm that this problem still exists in current master

#11 Updated by Alexander Opitz 11 months ago

  • Status changed from Needs Feedback to New

#12 Updated by Ingo Schmitt 7 months ago

  • TYPO3 Version changed from 6.0 to 6.2
  • Sprint Focus set to On Location Sprint

#13 Updated by Andrea Herzog-Kienast 6 months ago

  • Target version set to 7.1 (Cleanup)

#14 Updated by Andrea Herzog-Kienast 6 months ago

"BUT: In the list or page module we still see the old preview image until the IE9 tab has been reloaded (without the .htaccess rule we had to clear the browser cache to see the updated preview image). Of course this all works flawlessly with FF :)"

This is not the case in 7.1 - behavoir is as expected.

#15 Updated by Ingo Schmitt 6 months ago

  • Complexity set to medium

Solution could be to calculate the hash for the preview also by the filehash.

#16 Updated by Ingo Schmitt 6 months ago

  • Status changed from New to In Progress

#17 Updated by Gerrit Code Review 6 months ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36530

#18 Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36530

#19 Updated by Gerrit Code Review 6 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36530

#20 Updated by Ruud Silvrants 6 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#21 Updated by Gerrit Code Review 6 months ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36898

#22 Updated by Ruud Silvrants 6 months ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF