From fed3d0653d00ea6e51a03aeffe379b1fd049b008 Mon Sep 17 00:00:00 2001 From: Mathis Koblin Date: Thu, 10 Sep 2026 11:46:35 +0200 Subject: [PATCH] Fix info window content rendering on TYPO3 14 The site setting maps2.infoWindowContent.templatePath defaulted to Templates/InfoWindowContent.html, which no longer exists since the templates were renamed to *.fluid.html. Info windows failed to render unless a site overrode the path. The partial rendered editorial content with f:transform.html. Its link resolution reads $GLOBALS['TYPO3_REQUEST'], which is not set while GetInfoWindowContentMiddleware renders the view. f:format.html takes the request from the rendering context instead. --- .../Sets/Maps2/settings.definitions.yaml | 2 +- Documentation/ChangeLog/Index.rst | 9 +++++ .../Configuration/Extension/Index.rst | 2 +- .../Partials/InfoWindowContent.fluid.html | 2 +- .../Configuration/SiteSetSettingsTest.php | 33 +++++++++++++++++++ 5 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 Tests/Unit/Configuration/SiteSetSettingsTest.php diff --git a/Configuration/Sets/Maps2/settings.definitions.yaml b/Configuration/Sets/Maps2/settings.definitions.yaml index aacc130a9..fd3f10ed4 100644 --- a/Configuration/Sets/Maps2/settings.definitions.yaml +++ b/Configuration/Sets/Maps2/settings.definitions.yaml @@ -35,7 +35,7 @@ settings: category: 'Maps2.templates.infoWindowContent' description: 'If you click on a marker (POI) a little info window will appear. With this setting you can change the template to your own needs.' type: string - default: 'EXT:maps2/Resources/Private/Templates/InfoWindowContent.html' + default: 'EXT:maps2/Resources/Private/Templates/InfoWindowContent.fluid.html' maps2.infoWindowContent.imageHeight: label: 'Image Height' category: 'Maps2.templates.infoWindowContent' diff --git a/Documentation/ChangeLog/Index.rst b/Documentation/ChangeLog/Index.rst index 5ada5262d..24843b81b 100644 --- a/Documentation/ChangeLog/Index.rst +++ b/Documentation/ChangeLog/Index.rst @@ -7,6 +7,15 @@ ChangeLog ========= +Version 13.1.1 +============== + +* BUGFIX: Point the default info window template setting to the existing + `InfoWindowContent.fluid.html` template +* BUGFIX: Render info window content with `f:format.html`. `f:transform.html` + requires `$GLOBALS['TYPO3_REQUEST']`, which the info window middleware does + not set + Version 13.1.0 ============== diff --git a/Documentation/Configuration/Extension/Index.rst b/Documentation/Configuration/Extension/Index.rst index aeb3fed70..02ecfc4f5 100644 --- a/Documentation/Configuration/Extension/Index.rst +++ b/Documentation/Configuration/Extension/Index.rst @@ -132,7 +132,7 @@ activation of Google Maps for current browser session. infoWindowContentTemplatePath ----------------------------- -Default: `EXT:maps2/Resources/Private/Templates/InfoWindowContent.html` +Default: `EXT:maps2/Resources/Private/Templates/InfoWindowContent.fluid.html` You can define your own default template for the info window content when clicking on a marker. Further you can override this template path again with diff --git a/Resources/Private/Partials/InfoWindowContent.fluid.html b/Resources/Private/Partials/InfoWindowContent.fluid.html index 468b6c24a..ef64c615a 100644 --- a/Resources/Private/Partials/InfoWindowContent.fluid.html +++ b/Resources/Private/Partials/InfoWindowContent.fluid.html @@ -32,6 +32,6 @@
-
{poiCollection.info_window_content -> f:transform.html()}
+
{poiCollection.info_window_content -> f:format.html()}
diff --git a/Tests/Unit/Configuration/SiteSetSettingsTest.php b/Tests/Unit/Configuration/SiteSetSettingsTest.php new file mode 100644 index 000000000..e0ffa52b0 --- /dev/null +++ b/Tests/Unit/Configuration/SiteSetSettingsTest.php @@ -0,0 +1,33 @@ +