Open adamkiss opened 4 years ago
ran into the same problem earlier. would appreciate this!
This is super difficult to solve. The issue haunts us since Kirby 1 and there is no good solution:
$page->image()
is called, it doesn't know whether the developer actually wanted to access a field.Possible solutions are:
$page
methods in the reference->content()
everywhere as that will always work, however the syntax is longer and not required for most fieldsA true solution in the core is very difficult for the mentioned reasons.
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).
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.
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.