#106368Exception in filelist module with "List" view
Description
First, make sure that you:
- are in Debug Mode (Settings > Configuration Presets > Debug = “Debug”, Reason: Warnings should be thrown as exceptions)
- have a storage with filemount inside your site_package (e.g. to the Resources folder)
- you are a non-admin with that filemount granted
Procedure
Go, as a non-admin, to the FileList, select “List” view (with “Tiles” the exception doesn’t occur) and then select a folder with images in it, here it was “site_package/Resources/Public/Icons” with the “Extension.svg” in it .
In all my Typo3 v13 Webs, the exception from the screenshot occur.
I xdebug’d this and in what I understand, deep in \TYPO3\CMS\Core\Resource\Driver\LocalDriver::getAbsolutePath the variable $this->absoluteBasePath has the wrong base path aka the wrong file storage. I have no idea why…
protected function getAbsolutePath(string $fileIdentifier): string
{
$relativeFilePath = ltrim($this->canonicalizeAndCheckFileIdentifier($fileIdentifier), '/');
return $this->absoluteBasePath . $relativeFilePath;
}Reviews 2
Related issues 2
Files 2
History 1214
-
Julian Mair changed Related to #101968 <span data-processor="relativetime" data-value="2025-03-13T13:20:21+00:00" > 03/13/25, 13:20 </span>
-
Garvin Hicking commented and changed category status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-03-13T13:37:12+00:00" > 03/13/25, 13:37 </span> -
Julian Mair commented <span data-processor="relativetime" data-value="2025-03-13T13:40:52+00:00" > 03/13/25, 13:40 </span>
yes, it’s a composer installation… an upgrade from v12 to be precise
-
Georg Ringer commented <span data-processor="relativetime" data-value="2025-03-14T08:11:44+00:00" > 03/14/25, 08:11 </span>
hey!
I really wonder why there is a need to have a storage which points to a extension? can you give some usescases for that? I really tend to close this because this is not the way to go IMHO
-
Julian Mair commented <span data-processor="relativetime" data-value="2025-03-14T08:57:56+00:00" > 03/14/25, 08:57 </span>
hey georg, it’s mostly because we have a bunch of files, like logos, icons, background banners, etc. which we want to store via GIT (fileadmin/ is not under VCS). In most cases, its a read-only filemount so that the users can select those files in the backend, but are not allowed to change them.
Side note: we are doing this since Typo3 v9, and it always worked until v13 (i think with #101968 )
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-03-14T09:19:43+00:00" > 03/14/25, 09:19 </span>
I would suggest to place a symlink in a normal fileadmin/ UGC directory pointing to your extension. Then you can manage the files as if they were part of your UGC – and then probably extension directory mapping will not interfer?
-
Julian Mair commented <span data-processor="relativetime" data-value="2025-03-14T09:55:13+00:00" > 03/14/25, 09:55 </span>
I already do that, the URI of the thumbnail mentioned above is “/site_package_resources/Public/Icons/Extension.svg“
(“site_package_resources” is a symlink to “/site_package/Resources/” located in the DOCROOT)But IMHO the bug lies in the second condition:
/vendor/typo3/cms-filelist/Classes/FileList.php:698 – 705
if (($thumbnailUrl = ($processedFile->getPublicUrl() ?? '')) === '') { // Prevent rendering of a "img" tag with an empty "src" attribute return ''; } if (PathUtility::isAbsolutePath($thumbnailUrl)) { $thumbnailUrl .= '?' . filemtime($processedFile->getForLocalProcessing(false)); }The var
$thumbnailUrlis correctly generated butfilemtime($processedFile->getForLocalProcessing(false))will trigger the exception above with the completely incorrect path “/var/www/html/httpdocs/fileadmin/Public/Icons/Extension.svg” which doesn’t exist. -
Franz Holzinger changed Related to #104440 <span data-processor="relativetime" data-value="2025-04-05T18:22:55+00:00" > 04/05/25, 18:22 </span>
-
Franz Holzinger commented <span data-processor="relativetime" data-value="2025-04-05T18:44:32+00:00" > 04/05/25, 18:44 </span>
Check the values you get if you insert debug lines.
protected function getAbsolutePath(string $fileIdentifier): string
{
debug ($fileIdentifier, ‘getAbsolutePath $fileIdentifier’);
$relativeFilePath = ltrim($this->canonicalizeAndCheckFileIdentifier($fileIdentifier), ‘/’);
debug ($relativeFilePath, ‘getAbsolutePath $relativeFilePath’);
debug ($this->absoluteBasePath, ‘$this->absoluteBasePath’);
return $this->absoluteBasePath . $relativeFilePath;
} -
Julian Mair commented and changed attached clipboard-202504090856-qsmth.png <span data-processor="relativetime" data-value="2025-04-09T06:59:31+00:00" > 04/09/25, 06:59 </span>
Sure, I get these debugs:
-
Gerrit Code Review pushed patch set 1 for main to change 89052 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2025-04-11T09:44:54+00:00" > 04/11/25, 09:44 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 89072 <span data-processor="relativetime" data-value="2025-04-11T20:25:20+00:00" > 04/11/25, 20:25 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-04-11T20:40:08+00:00" > 04/11/25, 20:40 </span>Applied in changeset commit:ab17a7df7daaf76190c59341a1a9d7c93ac58312.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:22:35+00:00" > 12/02/25, 14:22 </span>
This is a TYPO3 classic mode installation, not composer, I assume?