getgrav / getgrav/grav-plugin-admin
Admin->config->system throws exception when using "content_fallback: { en: [] }"
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
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'
```
Contributor guide
Assessment
This issue has not been assessed yet.