[SOLVED] Error: None of the given schemas null,dictionary matched array

I followed the tutorial of punkt.de (Neos Workshop) and realized step 1 to 4.
Here the nodetype definition:

'WL.WeinLaden:Wine':
  superTypes:
    'Neos.Neos:Content': true
  ui:
    label: Wein
    icon: icon-glass
    inspector:
      groups:
        wine:
          label: Wein
  properties:
    title:
      type: string
      ui:
        label: 'Name'
        inlineEditable: true
        aloha:
          placeholder: 'Titel des Weins'
    description:
      type: string
      ui:
        label: 'Beschreibung'
        inlineEditable: true
        aloha:
          placeholder: 'Beschreibung des Weins'
    grape:
      type: string
      defaultValue: ''
      ui:
        label: Rebsorte
        help.message: Hier bitte die Rebsorte wählen
        reloadIfChanged: true
        inspector:
          group: wine
          editor: Neos.Neos/Inspector/Editors/SelectBoxEditor
          editorOptions:
            values:
              Merlot:
                label: Merlot
              Syrah:
                label: Syrah
              Chardonnay:
                label: Chardonnay
    image:
      type: Neos\Media\Domain\Model\ImageInterface
      ui:
        label: Bild
        reloadIfChanged: true
        inspector:
          group: wine
          editorOptions:
            crop:
              aspectRatio:
                locked:
                  width: 3
                  height: 2

fusion file:

prototype(WL.WeinLaden:Wine) < prototype(Neos.Neos:Content) {
    partialRootPath = 'resource://Neos.NodeTypes/Private/Templates/NodeTypes/Partials'
}

template file:

{namespace neos=Neos\Neos\ViewHelpers}
<div {attributes -> f:format.raw()}>
    <div class="thumbnail">
        <f:render partial="Image" arguments="{image:node.properties.image, alt:node.properties.title, maximumWidth:1600}" />
        <div class="caption">
            <neos:contentElement.editable property="title" tag="h3" />
            <neos:contentElement.editable property="description" tag="p" />
            <div class="row">
                <div class="col-md-6">Rebsorte:</div>
                <div class="col-md-6"><b>{node.properties.grape}</b></div>
            </div>
         </div> 
     </div>
</div>

Later I checked the Configuration of the NodeTypes and found an error: “NodeTypes.WL.WeinLaden:Wine.properties.grape -> None of the given schemas null,dictionary matched array”.


What does it mean? What is wrong here?
Thanks for any hints.

Good morning,

I think the error occurs because Your property grape has an empty default value. But in your select box configuration is no empty value.

'WL.WeinLaden:Wine':
  superTypes:
    'Neos.Neos:Content': true
  ui:
    label: 'Wein'
    icon: icon-glass
    inspector:
      groups:
        wine:
          label: 'Wein'
  properties:
    title:
      type: string
      ui:
        label: 'Name'
        inlineEditable: true
        aloha:
          placeholder: 'Titel des Weins'
    description:
      type: string
      ui:
        label: 'Beschreibung'
        inlineEditable: true
        aloha:
          placeholder: 'Beschreibung des Weins'
    grape:
      type: string
      defaultValue: ''
      ui:
        label: 'Rebsorte'
        help:
          message: 'Hier bitte die Rebsorte wählen'
        reloadIfChanged: true
        inspector:
          group: wine
          editor: Neos.Neos/Inspector/Editors/SelectBoxEditor
          editorOptions:
            values:
              '':
                label: ''
              Merlot:
                label: 'Merlot'
              Syrah:
                label: 'Syrah'
              Chardonnay:
                label: 'Chardonnay'
    image:
      type: Neos\Media\Domain\Model\ImageInterface
      ui:
        label: 'Bild'
        reloadIfChanged: true
        inspector:
          group: wine
          editorOptions:
            crop:
              aspectRatio:
                locked:
                  width: 3
                  height: 2

That’s the problem :wink:

@bwaidelich, exactly this was the problem: I have to write

help:
  message: 'Hier bitte die Rebsorte wählen'

and the problem is gone. I copied this typo from Git-repository (https://github.com/punktDe/neos-workshop/blob/master/Configuration/NodeTypes.Wine.yaml).

@lmis, obviously it is not important to set a default value in this case. The inspector selects the first item (“Merlot”) of the list.