KQL - Kirby 4.x - permission

I use KIRBY CMS as a backend for a mobile app!

I use KQL for data transmission. It works excellently in the 3.x.x versions. Since I don’t have to manage sensitive data like users, authentication is turned off.

Today I wanted to upgrade to version 4.0.

Now, I am receiving the following error on all my requests:

{“status”:“error”,“message”:“Access to the class “Kirby\Content\Field” is not supported”,“code”:403,“key”:“error.permission”,“details”:}

To me, it looks like the content is being blocked.

An example request looks like this:

https://mdobler.uber.space/api/query?{“query”:“site.children.listed”,“select”:{“action_mail”:true,“action_open_gallery”:true,“action_page”:true,“action_type”:true,“action_url”:true,“article_blocks”:“page.article_blocks.toStructure”,“button_bg_color”:true,“button_font_color”:true,“button_has_colors”:true,“element_height”:true,“element_width”:true,“end_date”:true,“expand_on”:true,“has_icon”:true,“has_plan”:true,“icon_animation”:true,“icon_files”:true,“icon_placement”:true,“label_h_align”:true,“label_text”:true,“label_v_align”:true,“page”:“page.uuid”,“post_galleries”:“page.post_galleries.toStructure”,“post_mails”:“page.post_mails.toStructure”,“post_pages”:“page.post_pages.toStructure”,“post_pictures”:true,“post_text”:true,“post_urls”:“page.post_urls.toStructure”,“start_date”:true,“title”:true}}

Does anyone perhaps know a simple solution to what I might have done wrong in the installation of version 4 of Kirby?

Or do I need to look deeper?

Thank you very much in advance.

Have you updated KQL to the latest version?

1 Like

Yes I’ve downloaded the latest version.

I found out there is a much simpler way to see the error in 4.x

Here is the link for Kirby 4.x:

https://mdobler.uber.space/api/query

Here is the link to the identical site with Kirby 3.x:

https://pearls.uber.space/api/query

Kirby 3.x delivers a correct result, but Kirby 4.x gives an error.

‘kql’ => [
‘auth’ => false,
‘classes’ => [
‘allowed’ => [
‘Kirby\Content\Field’
]
]
],

I put this in the config and now it works. This wasn’t necessary in 3.x