lachholden / obsidian-recipe-view

View your Obsidian notes as interactive recipe cards while you cook.
https://obsidian-recipe-view.readthedocs.io/en/latest/
MIT License
102 stars 4 forks source link

Recipe view not working - empty view #32

Open Alonf4 opened 2 weeks ago

Alonf4 commented 2 weeks ago

Hi!

I have the recipe view plugin for quite some time now and never had an issue. I don't know what exactly caused this issue but lately, no matter what note I want to view in "recipe view", nothing is shown - the recipe view turns on but the view is just empty.

I thought it is something to do with appearance settings or one of my other plugins, but get this: I made a duplicate vault and removed all community plugins, themes and CSS snippets, and the issue still persists! I tried checking with a fresh vault as well with the same appearance settings and community plugins and there the recipe view does work.

I just don't get it... What the hell is different in my duplicate vault (that I already cleaned out) other than a fresh new vault? I attach my test vault so you can see the issue - it has only one note called "Recipe Example.md".

This drives me crazy, please help me find the cause of this issue.

Thanks, Alon


Before (Regular View): image

After (Recipe View): image

Test.zip

alexlafroscia commented 4 days ago

I noticed the same behavior in a recipe in my own vault!

I noticed that it was happening in some files, but not others. I duplicated a broken file and started removing content until the bug stopped occurring and determined, at least for me, what the problem was!

I had an empty tags property at the start of the file; when that is present, then the file won’t render. Removing the property, or setting a tag, fixed it!

I did notice that an empty tags property, when present with another property, does not exhibit the error. Something about the specific front matter at the top of the file is causing a parsing error or something.

Alonf4 commented 4 days ago

@alexlafroscia Wow thanks man! Great debugging! I just checked and you're absolutely right. Yet, I would say that this is an unexpected behavior that needs fixing.

At least I know how to work around it from now on.

Thanks again!

alexlafroscia commented 4 days ago

I think this is the same as #27!