Bug #102346
openVariants on prioritizedCountries on CountrySelect form element show values which should be overwritten
0%
Description
When using the following configuration which defines a CountrySelect element in a form which uses variants to overwrite the prioritizedCountries for a given language:
renderables: - properties: fluidAdditionalAttributes: required: required autocomplete: country prependOptionLabel: prependOptionLabel prioritizedCountries: - AU - CA - NZ - GB - US type: CountrySelect identifier: country label: country validators: - identifier: NotEmpty variants: - identifier: country-pl condition: 'siteLanguage("languageId") === 2' properties: prioritizedCountries: - PL
I would expect for the Polish language (language ID = 2), that Poland is the only prioritized country (= visible at the top of the select box). However, the following countries are prioritized:
- PL
- CA
- NZ
- GB
- US
This is obviously wrong. I would expect only:
- PL
to be prioritized.
I tracked it down to the AbstractFormElement->setProperty()
method, which receives as value ['PL']
and then ArrayUtility::mergeRecursiveWithOverrule()
is called which just overrides the index "0", but does not reset the prioritizedCountries property before.
Using TYPO3 v12.4.7.
No data to display