Sorry if this question has been asked before, I couldn’t find a similar thread.
I am migrating a website from Kirby 2 to 3 and on the current website there is a blog with articles and a bunch of projects. Each blog article has the option of being associated with a project. To do this, I had set up a query in the blueprint, like this:
Project:
label: Project
type: select
options: query
query:
page: projecten
fetch: children
value: '{{uid}}'
text: '{{title}}'
The blog articles are child pages of the home page, while the projects are child pages of a page called projecten.
The new blueprint is this (leaving out a few things for brevity), article.yml
:
title: Article
num: '{{ page.date.toDate("YmdHi") }}'
icon: 📰
columns:
main:
width: 2/3
fields:
text:
type: textarea
size: large
sidebar:
width: 1/3
sections:
meta:
type: fields
fields:
project:
label: Project
type: select
options: query
query:
fetch: site.projecten.children.published
value: '{{page.uri}}'
text: '{{page.title}}'
Right now, in the panel, I get an error, saying “Invalid query result data”. How do I write the query so that it works in Kirby 3?