Project

General

Profile

Actions

Bug #105152

open

503 when editor has no access to the default storage #2

Added by Wolfgang Klinger about 2 months ago. Updated 17 days ago.

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();
            }
        }


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #103897: Reproducable 503 when editor has no access to the default storageClosed2024-05-24

Actions
Actions #1

Updated by Wolfgang Klinger about 2 months ago

  • Related to Bug #103897: Reproducable 503 when editor has no access to the default storage added
Actions #2

Updated by Dennis Grün 17 days ago

Can confirm, editors without access to default storage opening link browser in file mode just throws exception 1375955684.

Actions

Also available in: Atom PDF