From 396296c307bb6d5778a72ad7a55c648c505232e2 Mon Sep 17 00:00:00 2001 From: Andreas Fernandez <a.fernandez@scripting-base.de> Date: Tue, 22 Aug 2023 16:05:35 +0200 Subject: [PATCH] [BUGFIX] EXT:indexed_search: Use correct API to calculate icon path This patch makes use of `PathUtility::getAbsoluteWebPath()` in EXT:indexed_search's SearchController which is suitable for calculating asset paths in both, Composer and non-Composer scenarios. Resolves: #101727 Releases: main, 12.4, 11.5 Change-Id: I88f487b1fdf88b404fc51a3d5d6131dba5483cdc Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80674 Reviewed-by: Benjamin Franzke <ben@bnf.dev> Tested-by: Benjamin Franzke <ben@bnf.dev> Tested-by: core-ci <typo3@b13.com> --- .../indexed_search/Classes/Controller/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php index 93bb34f39d5a..3a11d4e031e5 100644 --- a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php +++ b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php @@ -716,7 +716,7 @@ class SearchController extends ActionController $fullPath = GeneralUtility::getFileAbsFileName($icon); if ($fullPath) { $imageInfo = GeneralUtility::makeInstance(ImageInfo::class, $fullPath); - $iconPath = PathUtility::stripPathSitePrefix($fullPath); + $iconPath = PathUtility::getAbsoluteWebPath($fullPath); $this->iconFileNameCache[$imageType] = $imageInfo->getWidth() ? '<img src="' . $iconPath . '" width="' . $imageInfo->getWidth() -- GitLab