Files Section Error - template or templates

I get an error within the Panel from a files section.
It’s setup only pull files from a defined parent but when I add the template option the error appears:
The section “nyoDownloads” could not be loaded: Array to string conversion

Screenshot 2022-10-11 at 14.02.28

I know it’s probably gonna be a simple fix but I can’t see it and have been banging my head for a few hours now.

site/blueprints/site.yml

title: Site

tabs:
  #First Tab
  content:
    label: Main Pages
    icon: page
    columns:
     - width: 1/3
        sections:
          nyoDownloads:
            type: files
            label: NYO Document Downloads
            image: icon
            empty: No download files yet
            parent: site.page("downloads")
            template: document_upload

I can remove the error by changing template to templates but then no template is added to the uploaded file.

site/blueprints/files/document_upload.yml

title: Document Upload

accept:
  extension: pdf, doc, docx

columns:
  main:
    width: 1/2
      sections:
        content:
          type: fields
          fields:
            description:
              label: Description
              type: textarea
              buttons: false
              size: medium

Kirby 3.7.3 and 3.8.0
PHP 8.0.24

template: Files section | Kirby CMS

Thanks @texnixe, I was under the impression that’s what I’d done.
Reference docs were the first place I looked.

parent: site.page("downloads")
template: document_upload

The document_upload file blueprint exists, I can understand why it’s tripping up.

Hm, the section itself looks fine.

But I wonder if there is something wrong with your indentation.

@texnixe I did think that been over the file again and again looking for typos or extra spaces / tabs.
PhpStorm is telling me ‘title’ and ‘tabs’ are not allowed by the schema.
What should the schema be?

No, that’s all fine. When I add your code in a Starterkit, it works fine (after adding the a download page).

So it must be something else in the site.yml file then?
I’ll have a fun day tomorrow.

What is your Kirby version?

Initial Local Dev - 3.7.3 with PHP 7.4.2
Staging - 3.7.3 then 3.8.0 with PHP 8.0.24

Solved it! :tada:
Turned out it was a PICNIC issue! :man_facepalming:
In my files blueprint the sections option was indented too far.
Below is correct indentation.

title: Document Upload

accept:
  extension: pdf, doc, docx

columns:
  main:
    width: 1/2
    sections:
      content:
        type: fields
        fields:
          description:
            label: Description
            type: textarea
            buttons: false
            size: medium