Bug #98719
openFluid ImageViewHelper : image not found if any special char in the path
0%
Description
If there is any special char in the path of a file, the ImageService::getImageFromSourceString
won't find it.
Exemple : A BE user creates an image named 'image.png' in a directory named "Évènements" ("events" in french) in the File module of the backend. He then add it to the Resources section of a page. Because the page template includes a <f:image .../>
viewhelper, the page crash, and he gets the following error : Folder "/user_upload/615810/Ev%C3%A9nements/image.png/" does not exist.
To reproduce :
1. Insert a <f:image .../>
viewhelper in a page, and use the FalViewHelper and the ForViewHelper to iterate over the page resources and display them
2. Create a directory named "Évènements" in the file module of the BE
3. Add any image in this folder
4. Add this image to the page resources
5. Open the page
Updated by Simon Praetorius 11 months ago
- Status changed from New to Needs Feedback
Could you check if your installation uses $GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']
? This seems to me like a installation-wide issue, not just Fluid.
Updated by Riccardo De Contardi 5 months ago
I performed the following test:
- TYPO3 13.0.0-dev (latest main)
$GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']
= true
1) TYPO3 Backend > TypoScript Module > on the TypoScript template I wrote (just the relevant parts):
page = PAGE page.10 = FLUIDTEMPLATE page.10{ file = fileadmin/Templates/Index.html dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor dataProcessing.10 { references { table = pages fieldName = media } as = headerImage } }
2) On the file fileadmin/Templates/Index.html I wrote
<f:if condition="{headerImage.0}"> <f:image image="{headerImage.0}" /> </f:if>
3) Then I created a folder
/fileadmin/Images/Évènements
4) TYPO3 backend > FileList Module > I browsed the folders until "Évènements" (the name is diplayed correctly in the backend) and there I uploaded a file test.jpg inside
5) TYPO3 backend > Page Module > Home > edit page properties > Tab "Resources" > I selected the test.jpg file
6) Save the page & visit the frontend
Results:¶
the image is visible and the source code of the page reads:
<img src="https://typo3.main.it.ddev.site:8443/fileadmin/Images/E%CC%81ve%CC%80nements/test.jpg" width="559" height="739" alt="" />
Is a different test necessary?