- Issue created by @johnv
- Status changed to Fixed
2 months ago 2:49pm 10 September 2024 Automatically closed - issue fixed for 2 weeks with no activity.
The following errors occur when:
- Language groups are defined in the field settings
- Autocomplete of 'Autocomplete (tag style) widget is selected
- you try the enter a language in the field widget.
TypeError: mb_strtolower(): Argument #1 ($string) must be of type string, array given
The error is in LanguageAutocompleteController::autocomplete(), because the code assumes that the supplied list only contains languages, not groups.
An unexpected language is entered.
This happens when a language is selected that is not in the allowed list of values. The problem is that the autocomplete function does not parse the list correctly when language groups are enabled in the field settings.
- Maintain one or more language groups
- Set the widget type to Autocomplete or AutocompletTagsStyle
- Edit a node with LanguageField and enter a language (either correct or incorrect).
- Check if the provide list entry is a string or an array.
- Flatten the list of valid options.
Fixed
1.9
Code
Automatically closed - issue fixed for 2 weeks with no activity.