Bug #80942
closedsys_file_processedfile stores image twice
100%
Description
On a current 7.6 after cleaning up processed files through the install tool (and also seeing that sys_file_processedfile is emptied) and re-loading a page that holds exactly one image, this image is generated twice within the processed folder and has then two entries in sys_file_processedfiles.
Both data sets are pretty much identical, the only difference seems to be one configuration as integer “{s:5:“width”;i:148…” (e.g.) and one as string “s:5:“width”;s:3….
After a short question on Slack today Andreas Wolf said this might be caused because of the width being improperly being passed by TYPO3 as string, so I open this ticket for this issue.
Files
Updated by Oliver Wand over 7 years ago
After some days of heavy debugging the general issue seems to have been caused by a specific project configuration and therefore doesn't look like a core bug to me.
As shortly discussed with Andreas today obviously one could discuss if the TYPO3 core would catch possible variations and handle those. However without the specific configuration in question results are expected.
So I guess this ticket could be dismissed.
Updated by Tymoteusz Motylewski over 7 years ago
- Status changed from New to Rejected
closing it as requested
Updated by Christian Seifert about 7 years ago
How can we re-open the ticket? I would take care on this.
Updated by Christian Seifert about 7 years ago
- Assignee set to Tymoteusz Motylewski
Updated by Tymoteusz Motylewski about 7 years ago
- Status changed from Rejected to New
Hi Christian,
Thanks a lot for taking care.
I'm reopening the issue as requested. Please provide detailed information how to reproduce the issue and whether you have idea to fix it.
Please also note, that in case of no feedback the issue will be closed again.
Updated by Riccardo De Contardi about 7 years ago
- Assignee deleted (
Tymoteusz Motylewski)
@Christian Seifert
Hi Christian, please I ask you to not assign people to issues :)
Updated by Christian Seifert about 7 years ago
The issue can be reproduced by the following TypoScript-Setup:
page = PAGE page { 10 = IMAGE 10 { file = fileadmin/samples/test.jpg file.width = 200 } 20 < .10 20 { file.width = 200 file.width.prioriCalc = intval } }
At the end TYPO3 shall generate an image which has a width of 200px. Using the TypoScript from above TYPO3 generates to images having a width of 200px. That's because of the serialized configuration contains the PHP data types of the certain values like "width". If people use prioriCalc and the option intval for example, the final value is casted to int. Casting every setting like width, height, maxWidth, maxHeight to string would fix the issue. Images would not be generated twice again. It should be string because of the settings can contain options like "200c" or "200m".
Updated by Riccardo De Contardi over 6 years ago
I am able to reproduce it with TYPO3 8.7.11
Updated by Georg Ringer over 5 years ago
- Status changed from New to Needs Feedback
this has been fixed but I don't remember the issue. can you recheck. thx
Updated by Riccardo De Contardi over 5 years ago
- File logo.png logo.png added
- File Schermata 2019-03-13 alle 22.41.27.png Schermata 2019-03-13 alle 22.41.27.png added
I tried the following test with 10.0.0-dev (latest master)
1) upload the file /fileadmin/Images/logo.png (attached) (1500x1500px)
2) TS Setup (relevant part):
page = PAGE page { 10 = IMAGE 10 { file = fileadmin/Images/logo.png file.width = 200 } 20 < .10 20 { file.width = 200 file.width.prioriCalc = intval } }
Results:¶
1) In the frontend, two images are generated:
<img src="/fileadmin/_processed_/e/f/csm_logo_455257fa8a.png" width="200" height="200" alt="" border="0"> <img src="/fileadmin/_processed_/e/f/csm_logo_75806276f5.png" width="200" height="200" alt="" border="0">
I also attach here the sys_processedfile table entries (Schermata 2019-03-13 alle 22.41.27.png)
Updated by Gerrit Code Review almost 5 years ago
- Status changed from Needs Feedback 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/62912
Updated by Gerrit Code Review almost 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62909
Updated by Gerrit Code Review almost 5 years ago
Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62909
Updated by Benni Mack almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2c6f6fa5b2b1f0365d1f1deeded2cb5dff532312.