Bug #103897
closedReproducable 503 when editor has no access to the default storage
100%
Description
Hej,
when an editor without access to the default storage tries to open the file element browser, it generates a 503.
https://docs.typo3.org/m/typo3/reference-exceptions/main/en-us/Exceptions/1375955684.html
The problem resolves instantly as soon as I add another file mount on the default storage.
I attached a ddev db-export from the test case with a freshly installed composer v12.4.15
Files
Updated by Gerrit Code Review 10 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84384
Updated by Gerrit Code Review 9 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84384
Updated by Gerrit Code Review 8 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85424
Updated by Georg Ringer 8 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f84ed6b42ccc9f3ae49f59b0c9e3ad9737a033f8.
Updated by Wolfgang Klinger 6 months ago
@Georg Ringer
This is still an open bug here vendor/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 Garvin Hicking 6 months ago
@Wolfgang Klinger Could you please create a new issue about it? You can add an relation to this one. Thanks!
Updated by Wolfgang Klinger 6 months ago
- Related to Bug #105152: 503 when editor has no access to the default storage #2 added
Updated by Christian Kuhn about 2 months ago
- Related to Bug #106038: Avoid exception in file element browser added
Updated by Garvin Hicking about 1 month ago
- Related to Bug #106173: BUGFIX b1e36ce3dae (TYPO3 12.4.27) breaks entry point selection at Filemount added