[BUGFIX] Proper form definition validation if backend language changes
If a form element property is not defined through a form editor inspector, the "predefinedDefaults" value from the form editor setup will be used for some data integrity checks (such properties are immutable). Now, such checks against the "predefinedDefaults" values are *only* used in scenarios where form elements are newely created. All the following integrety checks on this value will be based on hmac validation. In addition, this patchset fixes a faulty validation in the following (edgy) scenario: * backend language is EN * open the form edtior and add a ContentElement form element * switch to another browser tab and change the backend language to DE * clear the cache * go back to the form editor and click the save button This is done by getting all translations (for all backend languages) for the untranslated! "predefinedDefaults" value and compare the (already translated) value (from the form definition) against the possible translations from "predefinedDefaults". There is an extended scenario which is out of scope for fixing: * the same scenario as above + delete the previous chosen backend language within the maintenance tool Resolves: #87520 Releases: master, 9.5 Change-Id: I6f486956c24121c0065b67b4f2179301e2a344c4 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60638 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Tobi Kretschmann <tobi@tobishome.de> Tested-by:
Sascha Rademacher <sascha.rademacher+typo3@gmail.com> Tested-by:
Julian Geils <j_geils@web.de> Tested-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Tobi Kretschmann <tobi@tobishome.de> Reviewed-by:
Sascha Rademacher <sascha.rademacher+typo3@gmail.com> Reviewed-by:
Julian Geils <j_geils@web.de> Reviewed-by:
Susanne Moog <look@susi.dev>
Showing
- typo3/sysext/form/Classes/Domain/Configuration/ConfigurationService.php 27 additions, 4 deletions...orm/Classes/Domain/Configuration/ConfigurationService.php
- typo3/sysext/form/Classes/Domain/Configuration/FormDefinition/Validators/CreatableFormElementPropertiesValidator.php 46 additions, 12 deletions...on/Validators/CreatableFormElementPropertiesValidator.php
- typo3/sysext/form/Classes/Domain/Configuration/FormDefinition/Validators/CreatablePropertyCollectionElementPropertiesValidator.php 40 additions, 14 deletions...CreatablePropertyCollectionElementPropertiesValidator.php
- typo3/sysext/form/Classes/Service/TranslationService.php 42 additions, 0 deletionstypo3/sysext/form/Classes/Service/TranslationService.php
- typo3/sysext/form/Tests/Unit/Domain/Configuration/ConfigurationServiceTest.php 6 additions, 0 deletions...ts/Unit/Domain/Configuration/ConfigurationServiceTest.php
- typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinition/Validators/CreatableFormElementPropertiesValidatorTest.php 1 addition, 1 deletion...alidators/CreatableFormElementPropertiesValidatorTest.php
- typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinition/Validators/CreatablePropertyCollectionElementPropertiesValidatorTest.php 1 addition, 1 deletion...tablePropertyCollectionElementPropertiesValidatorTest.php
- typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionValidationServiceTest.php 30 additions, 1 deletion...ain/Configuration/FormDefinitionValidationServiceTest.php
Please register or sign in to comment