"Field requires a model" Error in Kirby Builder after updating to 3.3.2

Hey, I just got a weird error after updating Kirby from 3.2.4 to 3.3.2: One builder that worked in 3.2.4 stopped working in the backend after the update. The error in the backend is: “Field requires a model”. I can’t find any threads with a similar error. Can someone point me in any direction to find out what could be wrong? The kirby builder itself still works with other blueprints. Here is the code of the builder that generates the error:

    fields:
      locationbuilder:
    label: Locations
    type: builder
    columns: 1
    fieldsets:
      locations:
        name: Location
        label: Location - {{name}}
        fields:
          name:
            label: Name
            type: text
          beschreibung:
            label: Beschreibung
            type: text
          link:
            label: Externer Link
            type: url
          foto:
            label: Foto
            type: files
            multiple: false
            layout: list
          visible:
            label: Location sichtbar?
            type: toggle

Thanks for the help!

The first thing that I notice is that the indentation is completely messed up, might be an effect of copying here…

Yes, sorry about that, seems like the indentation is messed up due to copy/paste. It’s definitely indented correctly in my code.

Have you deleted the media folder after updating Kirby? Also, have you updated the plugin to the latest version?

Yes, I’m on v2.0.13 of kirby-builder (already before the Kirby update) and deleted the media folder.

Is the builder field the only field in the blueprint or is there other stuff in there?

I have a second builder directly after the one I posted in the blueprint which still works. Here is my full fields blueprint:

fields:
  locationbuilder:
    label: Locations
    type: builder
    columns: 1
    fieldsets:
      locations:
        name: Location
        label: Location - {{name}}
        fields:
          name:
            label: Name
            type: text
          beschreibung:
            label: Beschreibung
            type: text
          link:
            label: Externer Link
            type: url
          foto:
            label: Foto
            type: files
            multiple: false
            layout: list
          visible:
            label: Location sichtbar?
            type: toggle
  textbuilder:
    label: Fließtext
    type: builder
    columns: 1
    fieldsets:
      bodytext:
          name: Text
          label: Text
          fields:
            text:
              label: Text
              type: textarea

The problem seems to be the key of the name field. While I get a different error from yours, it goes away if I change name to myname.

1 Like

Oh wow, thanks! That would have taken me ages to figure out. Works like you said after changing the key of the field. Do you know if this is a general Kirby thing that you can’t name it “name”? Or is this specific to my case?

A standard text field with a key of name works alright (although you always have to be a bit careful with naming fields to not create conflicts with native page methods). Maybe it’s because of the name key being used for naming fieldsets in the builder field, but I’m not sure.