When attempting to add a new page via the panel dashboard, I get the following error message:
Error
Too many keys: label: Options:
I’m on Kirby 2.2.3- this problem didn’t appear with previous versions, but I’m not convinced it’s a result of upgrading to 2.2.3. Any help you can provide would be much appreciated!
I’m not trying to add a specific page, just any new page- when I click on the Add button above the page listing in the Dashboard, it immediately spits out that error message before giving me the option to select a template. I’ve included a couple of blueprints below for your review:
Default blueprint:
<?php if(!defined('KIRBY')) exit ?>
title: Page
pages: true
files: true
fields:
title:
label: Title
type: text
text:
label: Text
type: textarea
Custom blueprint for another page:
<?php if(!defined('KIRBY')) exit ?>
title: Instructor
pages: false
files:
sortable: true
type: image
icon: user
fields:
title:
label: Name of Instructor
default: >
Enter Instructor Name
entry: >
{{instructor}}
instructor:
label: Instructor Details
type: structure
entry: >
<h2>Instructor Details</h2>
Name: {{instructor}}
<br>
<h3>Contact Info</h3>
E-mail: {{email}}<br>
Phone: {{phone_number}}<br>
Course Currently Teaching or Taught: <a href='/calendar/events/{{classes_taught}}'>{{classes_taught}}</a>
<br>
fields:
instructor:
label: Instructor Name (first and last)
type: text
icon: user
required: true
email:
label: E-mail Address
type: email
autocomplete: false
required: true
phone_number:
label: Phone Number
type: tel
autocomplete: false
required: true
classes_taught:
label: Classes Currently Teaching or Taught
type: multiselect
options: query
query:
page: events
fetch: pages
template: event
text: '{{title}}'
value: '{{uid}}'
Running a search through all of my blueprints with the search term “options” revealed that I have two blueprints where the label “Options” appears as part of a query structure, like so:
@texnixe, checked to ensure both the Kirby/Toolkit and Panel are on the same version- they are. Everything’s on 2.2.3. I do use a lot of custom fields, are there specific naming conventions I should be aware of when creating my custom fields?
@lukasbestle, your suggestion about the label:“Options” seems to be the solution! Yes, it was definitely a blueprint issue. I had a Gallery blueprint that was no longer being used as I pushed the gallery feature into a subpage element, and the Gallery blueprint had a Label:“Options” reference that caused this whole issue. See below:
<?php if(!defined('KIRBY')) exit ?>
title: Gallery
pages: false
icon: camera-retro
files:
type:
- image
icon: picture-o
sortable: true
fields:
title:
label: Title
type: text
galleryImages:
label: Gallery Images
type: checkboxes
options: images
galleryOptions:
label: Options:
type: radio
default: cover
options:
cover: Use first image as cover image.
thumbs: Show gallery as thumbnails.
I deleted this blueprint, as I’m no longer using this approach for my picture galleries, but man, your solution worked like a charm. I’ll make sure going forward that no labels are set to Options: but instead appear as “Options:”.
Might be helpful if you could post a brief explanation as the solution for other readers / users of Kirby encountering this issue.