Actions
Bug #105152
open503 when editor has no access to the default storage #2
Status:
New
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2024-09-27
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
trivial
Is Regression:
Sprint Focus:
Description
The bug (tried) to fix here: https://forge.typo3.org/issues/103897
is still an open bug here: typo3/cms-filelist/Classes/LinkHandler/AbstractResourceLinkHandler.php:198
where the same condition is used.
if (!$this->selectedFolder) { $this->selectedFolder = $this->resourceFactory->getDefaultStorage()?->getRootLevelFolder() ?? null; }
How to reproduce:
- Create a text element
- Add some text
- Link the text
- Select "File" in the opening dialog
- Booomm
Solution is the same as in the already published fix:
if (!$this->selectedFolder) { $allStorages = $this->getBackendUser()->getFileStorages(); $defaultStorage = $this->resourceFactory->getDefaultStorage(); if ($defaultStorage && array_key_exists($defaultStorage->getUid(), $allStorages)) { $this->selectedFolder = $defaultStorage->getRootLevelFolder(); } else { $this->selectedFolder = reset($allStorages)->getRootLevelFolder(); } }
Updated by Wolfgang Klinger about 1 month ago
- Related to Bug #103897: Reproducable 503 when editor has no access to the default storage added
Actions