Project

General

Profile

Actions

Bug #80942

closed

sys_file_processedfile stores image twice

Added by Oliver Wand over 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2017-04-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

logo.png (47.5 KB) logo.png Riccardo De Contardi, 2019-03-13 22:40
Schermata 2019-03-13 alle 22.41.27.png (29.6 KB) Schermata 2019-03-13 alle 22.41.27.png Riccardo De Contardi, 2019-03-13 22:43
Actions #1

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.

Actions #2

Updated by Tymoteusz Motylewski over 7 years ago

  • Status changed from New to Rejected

closing it as requested

Actions #3

Updated by Christian Seifert about 7 years ago

How can we re-open the ticket? I would take care on this.

Actions #4

Updated by Christian Seifert about 7 years ago

  • Assignee set to Tymoteusz Motylewski
Actions #5

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.

Actions #6

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 :)

Actions #7

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

Actions #8

Updated by Riccardo De Contardi over 6 years ago

I am able to reproduce it with TYPO3 8.7.11

Actions #9

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

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)

Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

Updated by Benni Mack almost 5 years ago

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

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF