Closed rk-mxp closed 2 years ago
The imports Bug is a Typo3 Bug, see https://forge.typo3.org/issues/94729
What is the status of this issue? It creates conflicts with other extensions that add form elements.
Feel free to submit a pull request to speed things up.
Current behavior
The View Model isn't loaded with other form element extensions
Expected behavior/output
The ViewModel is always loaded
Steps to reproduce
Install another extension with a custom form element that loads its ViewModel without index, e.g., https://extensions.typo3.org/extension/form_country_select or https://extensions.typo3.org/extension/form_element_linked_checkbox
Environment
Possible Solution
Change
to
Important: Use a unique timestamp to prevent conflicts with other extensions.
Also don't do this inside a Yaml file that is imported by
imports
. It seems Symfony has a Bug because the Indexes get removed again. It has to be done in the main Yaml file imported by TypoScript.Additional context
By adding the ViewModel without an index it gets added at index 0. Problem is, this is true for every other extension that adds ViewModels like this. This results in only a single ViewModel to be loaded, either the first or last extension (this I didn't check).