This page has no blueprint setup yet (files)

I have a file-blueprint like

blueprints/files/image.yml

that contains some field definitions. Also I defined

fields:
  myimage:
    type: files
    template: image
    ....

After uploading an image, the corresponding txt-file in the content-folder contains:

template: image

So far, so good and everything worked in the past. Now I get the message

This page has no blueprint setup yet

when I open the image/file. So the template file is not used or found. Unfortunately I don’t know when exactly this problem occured the first time. Can anybody help me? Thanks!

Hm, does the template show up in the file view?

Because for files field definitions, there is no “first level” template property

type: files
uploads: image

Or

type: files
uploads: 
  parent: page
  template: image

That was one error, but not the solution… The wrong option

type: files
template: foo

was the reason for the content of the txt-file

Template: foo

Also this template-setting is shown in the file view…

03

Strange, but nevertheless, after changing the field definition it to

uploads: image

the template is still not found.

Well, one after the other…

Could you please post your image blueprint, maybe there is an error in there.

title: Bild
accept:
  mime: image/jpeg
columns:
  left:
    width: 3/4
    sections:
      content:
        type: fields
        fields:
          imagetitle:
            label: Untertitel
            type: text
            maxlength: 64
          description:
            extends: fields/markdown
            label: Beschreibung
            size: small
  right:
    width: 1/4
    sections:
      meta:
        type: fields
        fields:
          licensor:
            label: Fotograf / Lizenzgeber
            type: text
            width: 1/2
          license:
            label: Lizenz
            type: select
            required: true
            default: free
            width: 1/2
            options:
              free: frei
              web: eingeschränkt (nur Web)
              extended: erweitert (Web u. Druck)

… same problem with the example-blueprint from the guide https://getkirby.com/docs/guide/content/files

Hm, there seems nothing wrong with the blueprint as such and it works if I throw it into a Starterkit. Is the blueprint file readable?

And just to make sure (because I’ve seen it before): You are using

uploads: image

And the file name is also image.yml, right? You have to use the filename not the title of the file…

Yes , it’s readable. I just found, that it works when using the upload-option of a files-field, but that it doesn’t work, when uploading with the files-section. So maybe there is something wrong with the definitions:

The files-field (working)

meta_image:
  label: Bild für Social Media
  type: files
  help: empfohlen mind. 1200 x 630 Pixel
  multiple: false
  empty: kein Bild ausgewählt
  uploads:
    template: image

The section (not working)

sections:
  images:
    headline: Bilder
    type: files
    info: "{{ file.dimensions }}"
    empty: keine Bilder vorhanden
    layout: cards
    size: tiny
    uploads:
      template: image

a section has a template property, but no uploads property, so for the section it must be

sections:
  images:
    headline: Bilder
    type: files
    info: "{{ file.dimensions }}"
    empty: keine Bilder vorhanden
    layout: cards
    size: tiny
    template: image

It is a bit confusing, I know…

Yes, it’s confusing, because that’s how it was at the beginning.

But: now it’s working. I reset all files to the last commit and have exactly the same code in all files like at the beginning. I’m sorry for you spending your time, I’ve no idea about that. Blame it to the cache…

No worries.