Sorry, we don't support your browser.  Install a modern browser

Blueprint validation

Invalid blueprints sometimes show errors in the panel, but in my experience:

  1. Entire branches of a blueprint YAML tree can be completely ignored when they don’t match an expected structure.
  2. Invalid keys for section and field config are simply ignored.

Failing silently like this has cost me roughly ten hours of lost trial-and-error, re-reading the reference many times, and searching and posting on forum.getkirby.com — for just one project.

Those errors or mistakes are still swallowed silently when the site config has 'debug' => true.

I wish Kirby would show me errors like:

Invalid property 'template' for Field of type 'files'
  at: site/blueprints/pages/exhibit.yml, line 32

Learn more: https://getkirby.com/docs/reference/panel/fields/files

It could take up the whole page (using Whoops) or replace the faulty element in the panel or even be an annotation below the element (like, if the field can still be rendered, render it but show an error box right after). Every option is fine with me.

Just tell me that stuff is wrong, so that I don’t spend hours wondering why it’s not working and trying every possible permutation of YAML configs under the sun.

3 years ago
1
T

@Florens Verschelde – I think these issues could go away if Bastian can get Blueprint Editor off the ground, but meanwhile you might find Kirby3 Schema helpful. It’s a YAML validator for use with Kirby and VS Code. It’s not magic, and it can flag some YAML that Kirby actually allows, but it’ll catch common structure errors.

3 years ago