Issue Bug Closed

#88539Form Framework: same filename in different storages not possible

Andreas Kießling 06/11/19, 15:00 updated 12/23/19, 22:49

Description

Within a multisite setup, i have several ContactRequest.form.yaml files, one for each domain.
Each domain has an own folder for storing forms.

When i open the Forms backend module, only forms with a unique filename show up
The list is generated through \TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManager::retrieveYamlFilesFromStorageFolders, but since it iterates over all storage folders, but only uses the filenames to generate the list of forms to show in the module.

https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php#L390

            $files = $folder->getFiles(
                0,
                0,
                Folder::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS,
                true
            );
            $filesFromStorageFolders = $filesFromStorageFolders + $files;

Thus the resulting list only consists of files with unique filenames, whereas the full path or hash should be used to distinguish the form definitions
The code seems to be there from the beginning, thus should be fixed in 8.7, 9.5 and master

Reviews 2