Site.yaml with image

#1

Hello !

In the gateway theme, i have got in the site.yaml :
header:
title: ‘The beautiful title’
background: thebackground.jpg

in order to make it easily “customisable” , i have added in the user/blueprints/config a site.yaml with :
@extends:
@parent

form:
fields:
anothersection:
type: section
title: Mapajo
underline: true

        fields:
            header.title:
                type: text
                label: A label
                size: large
                  
            header.background:
                type: file
                label: My background                    
                destination: 'user/themes/mapajo/img'
                multiple: false
                accept:
                - image/*   

The form is working :

when i saved i got a strange message :
Twig_Error_Runtime
The merge filter only works with arrays or “Traversable”, got “string” as first argument.

if i open the site.yaml, i get :
header:
title: ‘Natura4ever - Votre distributeur’
background:
0: hero-bg.jpg
user/themes/mapajo/img/31sq6-Fond_Herbe.jpg:
name: 31sq6-Fond_Herbe.jpg
type: image/jpeg
size: 109786
path: user/themes/mapajo/img/31sq6-Fond_Herbe.jpg

if someone have the solution …

Thanks

#2

Did you get a solution to this, I’m getting this too.