Admin->config->system throws exception when using "content_fallback: { en: [] }"
With the following system.yaml:
languages:
...
content_fallback: { en: [] }
Accessing page http://dev-dev/admin/config/system in Admin throws the following error:
An exception has been thrown during the rendering of a template ("Array to string conversion"). …/user/plugins/admin/themes/grav/templates/forms/field.html.twig88
The following configs works fine:
languages:
...
content_fallback: { en: '' } # or { en: ['en', 'fr' ]}
The comments in /system/config/system.yaml suggests to use an array:
content_fallback: {} # Custom language fallbacks. eg: {fr: ['fr', 'en']}
Note: When saving the setting in Admin, it saves it as a string
content_fallback:
en: 'en,fr'
I can confirm that empty array [] throws. I think this shouldn't really be ever an array though and just a comma separated string list.
Maybe it is the documentation being not accurate.
It was a bug in the list field. It was taking the whole value en: 'en,fr' instead of the value of the list item: 'en,fr'`.