diff --git a/typo3/sysext/filelist/Classes/Controller/FileListController.php b/typo3/sysext/filelist/Classes/Controller/FileListController.php index 3671b289c71c836102041d7ad3e3893b38b3ef57..44d32e7ff6a2942f44e05dd99ecdd8354b196a95 100644 --- a/typo3/sysext/filelist/Classes/Controller/FileListController.php +++ b/typo3/sysext/filelist/Classes/Controller/FileListController.php @@ -114,6 +114,7 @@ class FileListController implements LoggerAwareInterface $parsedBody['overwriteExistingFiles'] ?? $queryParams['overwriteExistingFiles'] ?? null ); + $storage = null; try { if ($this->id !== '') { $backendUser->evaluateUserSpecificFileFilterSettings(); @@ -152,11 +153,22 @@ class FileListController implements LoggerAwareInterface } } catch (InsufficientFolderAccessPermissionsException $permissionException) { $this->folderObject = null; - $this->addFlashMessage( - sprintf($lang->sL('LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:missingFolderPermissionsMessage'), $this->id), - $lang->sL('LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:missingFolderPermissionsTitle'), - FlashMessage::ERROR - ); + if ($storage !== null && $storage->getDriverType() === 'Local' && !$storage->isOnline()) { + // If the base folder for a local storage does not exists, the storage is marked as offline and the + // access permission exception is thrown. In this case we however want to display another error message. + // @see https://forge.typo3.org/issues/85323 + $this->addFlashMessage( + sprintf($lang->sL('LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:localStorageOfflineMessage'), $storage->getName()), + $lang->sL('LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:localStorageOfflineTitle'), + FlashMessage::ERROR + ); + } else { + $this->addFlashMessage( + sprintf($lang->sL('LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:missingFolderPermissionsMessage'), $this->id), + $lang->sL('LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:missingFolderPermissionsTitle'), + FlashMessage::ERROR + ); + } } catch (Exception $fileException) { $this->folderObject = null; // Take the first object of the first storage diff --git a/typo3/sysext/filelist/Resources/Private/Language/locallang_mod_file_list.xlf b/typo3/sysext/filelist/Resources/Private/Language/locallang_mod_file_list.xlf index 2765ab2b8ec90b7b9a4bbf79fa537a0712aedccb..96555afa9452159d37761249386c2ea7db999e60 100644 --- a/typo3/sysext/filelist/Resources/Private/Language/locallang_mod_file_list.xlf +++ b/typo3/sysext/filelist/Resources/Private/Language/locallang_mod_file_list.xlf @@ -75,6 +75,12 @@ <trans-unit id="missingFolderPermissionsMessage" resname="missingFolderPermissionsMessage"> <source>You have no access to the folder "%s".</source> </trans-unit> + <trans-unit id="localStorageOfflineTitle" resname="localStorageOfflineTitle"> + <source>Base folder for local storage missing</source> + </trans-unit> + <trans-unit id="localStorageOfflineMessage" resname="localStorageOfflineMessage"> + <source>Base folder for local storage does not exists. Verify that the base folder for "%s" exists.</source> + </trans-unit> <trans-unit id="folderNotFoundTitle" resname="folderNotFoundTitle"> <source>Folder not found.</source> </trans-unit>