Open linusrogge opened 2 weeks ago
Also a comment on the link field, although this does not quite belong here—it would be very helpful to customise the specific options further. Like with the page
option, to also set a query, filter or exclude certain pages. Just for convenience and better UX for clients.
There isn't a pages
option . It should be page
:
link:
type: link
options:
- page
About query feature, check out: https://feedback.getkirby.com/574
@afbora thanks for your reply, but please read my actual issues again. I know there isn’t a pages option and that is exactly my point: kirby doesn’t tell me anything about that—it just completely hides the field from the blueprint.
Thanks for the link
Sorry @linusrogge I misread your issue. Let me try to fix it.
@distantnative Do you think we should throw exception about invalid option or ignore invalid options and use fallback options?
@afbora i haven't been able to look into it but I am wondering why no error is shown (even if cryptic) but the field just disappears.
I've looked but didn't understand either why swallow the error? I can fix this issue via throwing an error or ignoring the error from backend side.
Description
Creating a
type: link
field with adjustedoptions
does not return an error when options are invalid. I know this is on the dev to get right, but you might not want to look up the docs every time and find out through trial and error—currently, the whole field is completeley hidden when at least one option is wrong.The field is shown in the structure preview but not in the opened drawer.
Expected behavior
The field should render an error, displaying the wrong options provided (in my case used
- pages
instead of- page
).Screenshots
To reproduce
type: link
field and set the options to something likeoptions: - pages
Your setup
Kirby Version
4.4.1
Console output
Your system (please complete the following information)