Hi Kirby Community,
I think I might have stumbled into a bug, that took me all afternoon to understand what is happening.
So I have a structure under the $site, with teammembers. This structure has the following yml:
fields:
name:
label: Full Name
type: text
shortname:
label: Author Key
type: text
help: Used to link this team member as an article author.
role:
label: Role Name
type: text
picture:
label: Photo
type: files
multiple: false
query: site.find("teammembers").files
uploads:
template: image
parent: site.find("teammembers")
description:
label: Description
type: textarea
linkedin:
label: LinkedIn URL
type: url
roleLevel:
label: Role Level
type: toggles
options:
- value: "consultant"
text: Consultant
- value: "management"
text: Management
- value: "expert"
text: Expert
default: consultant
The teammembers are being uploaded to its own folder, under site. Everything is ok until here, and I can, despite the multilingual settings, all work as expected.
In a block, I am doing a query to fetch these teammembers in several different places around the website, and for example, I have one block that displays only the ones with the rolelevel set to ‘experts’ or ‘management’:
name: Team List Managers / Experts
icon: users
preview: fields
fields:
members:
label: Members
type: multiselect
options:
type: query
query: site.teammembers.toStructure.filterBy('rolelevel', 'in', ['management', 'expert'])
text: "{{ item.name }} ({{ item.rolelevel }})"
value: "{{ item.shortname }}"
The weird behavior: The first person is “Tobias“, and the second one is “Jürgen“, and the list follows. Kirby skips and doesn’t show the ‘Jürgen’ in the list, nor recognizes him in the list at all, in the panel, for the multiselect. When I “force“ him into the content directly, it also doesn’t work, and it throws several errors.
As I have a list of 70 people in the teammembers structure, I simply moved “Jürgen“ down the list, after another person with a name with special character (but rolelevel = ‘consultant‘), and it magically appeared in the list.
I don’t understand nor get what is going on, and I would like to make it work as it should, with the correct order and the multiselect working as it should.
Does anyone also experienced something like this?
Thanks in advance for reading this!