omnivore-app / obsidian-omnivore

Obsidian plugin to fetch articles and highlights from Omnivore
MIT License
842 stars 82 forks source link

The value entered into the Front Matter textarea doesn't get saved. #133

Open guycalledxan opened 1 year ago

guycalledxan commented 1 year ago

The value entered into the Front Matter textarea doesn't get "saved". If a value is entered, It will be blank the next time I return to the settings.

Steps to repro:

  1. Open the properties for the Omnivore Plugin
  2. Add some text to the textarea for that property (could be the example from the documentation.
  3. Do or don't click to another property to attempt to register input (I've tried both, it doesn't seem to affect the repro).
  4. Either click to another plugin's settings, or close the settings window.
  5. Reopen the setting window and if needs be browse the Omnvore plugin settings.
  6. Note that the Front Matter textarea has returned to the default "Enter the metadata" prompt.

Repro 100%

Obsidian version 1.4.13 Desktop (Windows 10). Omnivore Plugin version 1.6.1.

I've tried the repro with the console open and I don't see any errors. I've also tried watching the textarea element and fiddling with it / breaking for value change and didn't see anything there either. Let me know if there's any more info I can get you.

I installed the plugin about a week ago. It's been able to sync highlights from Omnivore and is working pretty well, other than for this issue. Cheers for making it :)

jacksonh commented 1 year ago

Hey @guycalledxan it could be that you are entering non variable values in the Front Matter section, here's a video of me doing the same: https://www.loom.com/share/752ea2a5dd3843df8d814427a6a68886

jacksonh commented 1 year ago

If you want to fully customize your front matter you could use the Front Matter template in the advanced settings.

guycalledxan commented 1 year ago

Cheers for getting back to me. I think this is probably the issue. I've definitely tried the "invalid text" example. Thanks for confirming that invalid values don't get stored.

I think what confused me (as a new user) is that I also tried an example from the documentation. Under the Front Matter property, second paragraph, it says "Available metadata can be found at Reference". When I go to that link I see:

A sample front matter template:

id: {{{id}}}
title: >
{{{title}}}
{{#author}}
author: >
{{{author}}}
{{/author}}
{{#labels.length}}
tags:
{{#labels}} - {{{name}}}
{{/labels}}
{{/labels.length}}
date_saved: {{{dateSaved}}}
{{#datePublished}}
date_published: {{{datePublished}}}
{{/datePublished}}

When I entered that text, I got the same result. I had assumed that text would be valid, as it's the example given in the documentation. So from that, I inferred that even (what I presumed to be) valid input wasn't being saved.

You can probably close this issue but, if I can suggest:

guycalledxan commented 1 year ago

Ah, I've just seen that the Advanced Settings Front Matter links to the same place in the documentation. So I guess the example is meant to be for that, rather than the basic version of the Front Matter setting?