getkirby / ideas

This is the backlog of ideas and feature requests from the last two years. Use our new feedback platform to post your new ideas or vote on existing ideas.
https://feedback.getkirby.com
20 stars 0 forks source link

Blueprints: validate keys/names of tabs/columns/fields #581

Open adamkiss opened 4 years ago

adamkiss commented 4 years ago

One of the biggest and most frustrating moments is when I use disallowed/unsupported name for my fields. It doesn't happen often, but it does happen occasionally and it's superfrustrating to deal with.

Struggling with the query language … Is it possible to query for a files field? Something like: query: page.image.toFile() or query: page.image.first.toFile() Renaming the field from image to img solved it :no_mouth: —(example from Slack:)

If validation is "too much dev time(TM)", perhaps prominent section of docs related to blueprints could be designated for a list of reserved/problematic words.

My bad. The notice is here: https://getkirby.com/docs/guide/blueprints/fields#naming-fields

Thank you.

robinscholz commented 4 years ago

ran into the same problem earlier. would appreciate this!

lukasbestle commented 4 years ago

This is super difficult to solve. The issue haunts us since Kirby 1 and there is no good solution:

Possible solutions are:

A true solution in the core is very difficult for the mentioned reasons.

distantnative commented 4 years ago

I know the idea of a health check plugin has been floating around for a while... that certainly would be one good check to cover in such a plugin (loop through all field names and check against method list).