Skip to content

Commit a720ccb

Browse files
committed
[BUGFIX] Use image attribute in f:image ViewHelper
Use `f:image image="{object.property}"` to pass the FAL FileReference directly to the ViewHelper. This avoids URL-encoding issues when filenames contain special characters like umlauts (ä, ö, ü). The old `src="{...originalResource.publicUrl}"` produced paths like /fileadmin/t%C3%A4st.jpeg which the web server cannot resolve. Fixes: #563
1 parent 301caab commit a720ccb

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

Resources/Private/CodeTemplates/Extbase/Partials/Property.htmlt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<f:if condition="{property.zeroToManyRelation}">
44
<f:then>
55
<k:openingTag>f:for each="<k:curlyBrackets>{domainObject.name -> k:format.lowercaseFirst()}.{property.name}</k:curlyBrackets>" as="image" </k:openingTag>
6-
<k:openingTag>f:image src="<k:curlyBrackets>image.originalResource.publicUrl</k:curlyBrackets>" width="200"/</k:openingTag>
6+
<k:openingTag>f:image image="<k:curlyBrackets>image</k:curlyBrackets>" width="200"/</k:openingTag>
77
<k:openingTag>/f:for</k:openingTag>
88
</f:then>
99
<f:else>
10-
<k:openingTag>f:image src="<k:curlyBrackets>{domainObject.name -> k:format.lowercaseFirst()}.{property.name}.originalResource.publicUrl</k:curlyBrackets>" width="200"/</k:openingTag>
10+
<k:openingTag>f:image image="<k:curlyBrackets>{domainObject.name -> k:format.lowercaseFirst()}.{property.name}</k:curlyBrackets>" width="200"/</k:openingTag>
1111
</f:else>
1212
</f:if></f:case>
1313
<f:case value="File">

Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Partials/AstroImage/Properties.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<tr>
1616
<td><f:translate key="tx_ebastrophotography_domain_model_astroimage.image" /></td>
1717
<td>
18-
<f:image src="{astroImage.image.originalResource.publicUrl}" width="200"/>
18+
<f:image image="{astroImage.image}" width="200"/>
1919
</td>
2020
</tr>
2121
<tr>

Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Partials/CelestialObject/Properties.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<tr>
4040
<td><f:translate key="tx_ebastrophotography_domain_model_celestialobject.preview_image" /></td>
4141
<td>
42-
<f:image src="{celestialObject.previewImage.originalResource.publicUrl}" width="200"/>
42+
<f:image image="{celestialObject.previewImage}" width="200"/>
4343
</td>
4444
</tr>
4545
<tr>

Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Partials/ObservingSite/Properties.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<tr>
4040
<td><f:translate key="tx_ebastrophotography_domain_model_observingsite.image" /></td>
4141
<td>
42-
<f:image src="{observingSite.image.originalResource.publicUrl}" width="200"/>
42+
<f:image image="{observingSite.image}" width="200"/>
4343
</td>
4444
</tr>
4545
</table>

Tests/Fixtures/TestExtensions/eb_astrophotography/Resources/Private/Partials/Telescope/Properties.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<tr>
4040
<td><f:translate key="tx_ebastrophotography_domain_model_telescope.image" /></td>
4141
<td>
42-
<f:image src="{telescope.image.originalResource.publicUrl}" width="200"/>
42+
<f:image image="{telescope.image}" width="200"/>
4343
</td>
4444
</tr>
4545
</table>

0 commit comments

Comments
 (0)