Issue Bug Closed

#106481Form Framework throws error when defining more then one allowedExtensionPaths

Renzo Bauen 04/02/25, 01:17 updated 12/02/25, 14:22

Description

I do häve a problem with allowedExensionPaths:
There are tow extensions defining Forms.
In Extension1 declared in Configuration/Form/MyFormSetup.yaml

persistenceManager:
  allowedExtensionPaths:
    100: EXT:extension1/Resources/Private/Forms/

In Extension2 similar:


persistenceManager:
  allowedExtensionPaths:
    110: EXT:extension2/Resources/Private/Forms/

But then i get the following error in the Backend:

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception

PHP Runtime Deprecation Notice: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /var/www/html/.build/vendor/typo3/cms-form/Classes/Mvc/Persistence/FormPersistenceManager.php line 782

Everithing works fine if i am commenting out one of this two declarations, or if i put

persistenceManager:
  allowedExtensionPaths:
    100: EXT:extension2/Resources/Private/Forms/

In this case, only the Forms of Extension2 are loadet

Some investigation showed that the form sorting function throws the error.

If i set the return value of the callback funciton to 0 (numeric zero) then everithing works fine, exept the sorging of the forms…

This function is defined in cms-form/Classes/Mvc/Persistence/FormPersistenceManager.php line 779ff

Reviews 3