vanjim
February 20, 2018, 1:58pm
1
Hi there,
I have a problem with a kirby site that is deployed on a dokku server. The site works like a charm, but when I want to edit an entry that has a checkboxes field the checkboxes are not rendered. The JSON url works and locally (MAMP) it works as well.
Code in blueprint:
prices:
type: checkboxes
label: Awards
options: url
url: /api/prices
Result in json:
{
"price-one": "Price - One",
"price-two": "Price - Two",
"price-three": "Price - Three",
"price-four": "Price - Four",
"price-five": "Price - Five",
"price-six": "Price - Six",
"price-seven": "Price - Seven",
"price-eight": "Price - Eight",
"price-nine": "Price - Nine",
"price-ten": "Price - Ten"
}
Anyone got an idea?
Thank you,
Jim
I think you cannot use a “local” endpoint in Kirby 2. If you need that, I think you can achieve this with the controlled list plugin .
texnixe
February 20, 2018, 3:26pm
3
@bvdputte relative URLs are possible since 2.5.0
@vanjim Do you get any errors in your console, php error log or server error log?
vanjim
February 28, 2018, 2:05pm
4
@texnixe no, there are no errors…
texnixe
February 28, 2018, 2:22pm
5
How is your API created? Via a route? If so, where is the route defined?
vanjim
February 28, 2018, 2:51pm
6
The API is a route yes. It is defined in the config.php
@bvdputte s answer did help though, it now works. Added bonus is that the json is not exposed.
texnixe
February 28, 2018, 3:03pm
7
That’s true, could be prevented via the route as well by limiting access to the panel.
Glad that the alternative solution is fine for you. Pity though, that we’ll never find out now why it doesn’t work
1 Like