Issue Bug Closed

#106173BUGFIX b1e36ce3dae (TYPO3 12.4.27) breaks entry point selection at Filemount

Dirk Hoffmann 02/13/25, 17:12 updated 08/12/25, 14:36

Description

After updating from TYPO3 12.4.26 to TYPO3 12.4.27 we got a TypeError

TYPO3\CMS\Core\Imaging\IconFactory::getIconForResource(): Argument #1 ($resource) must be of type TYPO3\CMS\Core\Resource\ResourceInterface, null given, called in /Application/vendor/typo3/cms-core/Classes/ViewHelpers/IconForResourceViewHelper.php on line 72

It looks like the bugfix b1e36ce3dae, which was released with TYPO3 12.4.27, breaks the selection of the entry point for the filemount entry.
See: https://github.com/typo3/typo3/commit/b1e36ce3dae

This removed code in “TYPO3\CMS\Filelist\ElementBrowser\AbstractResourceBrowser->initSelectedFolder()” causes the problem:

if (!$this->selectedFolder) {
    $allStorages = $this->getBackendUser()->getFileStorages();
    $defaultStorage = $resourceFactory->getDefaultStorage();
    if ($defaultStorage && array_key_exists($defaultStorage->getUid(), $allStorages)) {
        $this->selectedFolder = $defaultStorage->getRootLevelFolder();
    } else {
        $this->selectedFolder = reset($allStorages)->getRootLevelFolder();
    }
}

Procedure for reproducing the issue:
- In Backend: Select the root page (ID 0) in list view
- Edit a filemount e.g. the default “fileadmin“
- Click on the ‘Search for folders’ button next to the ‘Entry point’ item.

Reviews 6

Files 1

History 1419

  1. Garvin Hicking commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-02-15T08:55:08+00:00" > 02/15/25, 08:55 </span>

    Applied in changeset commit:d445cbfc43cacbdb62d16e0defd7348cbe4ba1b6.

  2. Gerrit Code Review pushed patch set 2 for 12.4 to change 88226 status Resolved Under Review <span data-processor="relativetime" data-value="2025-02-15T08:56:01+00:00" > 02/15/25, 08:56 </span>

  3. Garvin Hicking commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2025-02-15T09:20:09+00:00" > 02/15/25, 09:20 </span>

    Applied in changeset commit:c9b53f08f35d6be34e8dd4223563cbd25e42ac6e.