Fatal Error - Missing Frontmatter Tag?

If a Frontmatter tag is missing (“time” in this instance) , I am getting this FATAL error:

Fatal error
: Uncaught Twig\Error\RuntimeError: Neither the property "time" nor one of the methods "time()", "gettime()"/"istime()"/"hastime()" or "__call()" exist and have public access in class "stdClass" in "__string_template__db4dffedda492bfce5c94163b0c6934e" at line 4. in ...

So, I had previously added:

time: "14:30"

to one .md post, it was missing from the others, and I got this error when specifying:

{{item.time}}

in the text component for the posts where the “time’ tag was missing. It was Ok in the one it was present in.

Should it not just indicate the front-matter is missing for the text? For example:

Frontmatter time tag is missing!

or similar?

Thanks for the report, and yes we have this down to fix/handle more gracefully :+1:

For now, ensure all your Markdown files in a collection have the same Frontmatter.

Ah, that probably explains why I thought @refsvik had to make more alterations to his markdown than just to do the change from .html to .php to get his markdown to work. I just dropped his markdown into a folder with my pre-existing markdown which obviously had inconsistent Frontmatter between his and my markdown files. :thinking:

It definitely should, and I’ll make sure we fix that!

As Dan said, for now you should ensure your front matter is consistent.