Issue Bug Closed

#88082FrontendUserImageUpdateWizard fails, when there are multiple storages

Torben Hansen 04/04/19, 18:46 updated 07/09/23, 11:57

Description

The FrontendUserImageUpdateWizard copies images from /uploads/pics/ to fileadmin/_migrated/, but fails to lookup the copied images in FAL when there are multiple storages.

    public function init()
    {
        $storages = GeneralUtility::makeInstance(StorageRepository::class)->findAll();
        $this->storage = $storages[0];
        $this->registry = GeneralUtility::makeInstance(Registry::class);
        $this->recordOffset = $this->registry->get($this->registryNamespace, 'recordOffset');
    }

When there are multiple storages, $storages[0] will not always be the fileadmin storage, since initializeLocalCache in StorageRepository uses ->orderBy('name') when all available storages are initialized.

The FrontendUserImageUpdateWizard should either work with the default storage for both the copy and the lookup operation or ,if $GLOBALS[‘TYPO3_CONF_VARS’][‘BE’][‘fileadminDir’] is used for the copy process, lookup for a storage named like the fileadminDir configured.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.