Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import fails once content of the article is included #193

Closed
herr-schaft opened this issue Feb 10, 2024 · 13 comments · Fixed by #202
Closed

Import fails once content of the article is included #193

herr-schaft opened this issue Feb 10, 2024 · 13 comments · Fixed by #202
Assignees
Labels

Comments

@herr-schaft
Copy link

Importing articles from Omnivore to Obsidian fails, once I try to include the content of the article.
Tried a couple of article templates. All seem to work fine – importing labels, highlights, notes etc. – until I try and add the content of the artice. Neither {{{ content }}} nor {{{content}}} without spacing works.

The plugin will start 'fetching articles' but then seems to give up. No articles are fetched nor is an error displayed. The Obsidian log shows the standard:

2024-02-10 23:09 - Uploading file .obsidian/plugins/obsidian-omnivore/data.json
2024-02-10 23:09 - Upload complete .obsidian/plugins/obsidian-omnivore/data.json
2024-02-10 23:09 - Fully synced

This would be my complete article template – which works fine once stripped of the content:

#omnivore {{#labels}} #{{name}} {{/labels}}

{{#highlights.length}}
## Highlights

{{#highlights}}
> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #{{name}} {{/labels}} ^{{{highlightID}}}
{{#note}}

{{{note}}}
{{/note}}

{{/highlights}}
{{/highlights.length}}

{{{ content }}}

[Read on Omnivore]({{{omnivoreUrl}}})
[Read Original]({{{originalUrl}}})

The issue seems related to #185 and #179, which do not explicitly mention the article content, though.

@MaryseBucking
Copy link

MaryseBucking commented Feb 11, 2024

@herr-schaft: thanks, this is exactly the problem why it isn't syncing properly for me. When deleting the content from my template, it syncs everything. Not what I want however.
Also I get an error in my frontmatter, I used an advanced template for this. omnivore_error: There was an error parsing the front matter template. See console for details.

Looking at the non-synced articles, the break seems to have happened on February 1st or 2nd.

@bayang
Copy link

bayang commented Feb 15, 2024

@MaryseBucking are you using a custom query to sync ?
I was having the same problem as you : no more articles being imported in obsidian and the logs showing no errors at all. Just nothing was imported.

This behaviour started a few weeks ago , and the last answer in this issue fixed it for me : omnivore-app/omnivore#3499

-> tl;dr; -> Hi, if you have a custom query you should add in:all to get archived items so something like in:all label:Obsidian

@herr-schaft
Copy link
Author

@bayang, the query in:archive works fine for me (until I try to add the content of an article). Meaning: in:all isn't the only query working.

@bayang
Copy link

bayang commented Feb 15, 2024

@herr-schaft There are different issues I think. But on my side, a custom query without the in part is not working anymore.

@sywhb
Copy link
Collaborator

sywhb commented Feb 20, 2024

hey @bayang @herr-schaft , i just released a new version v1.9.4 to address the custom query issue.

could you please try it out?

@sywhb sywhb self-assigned this Feb 20, 2024
@bayang
Copy link

bayang commented Feb 20, 2024

@sywhb here are the logs and my observations after upgrading :

09:15:54.355 plugin:obsidian-omnivore:14254 obsidian-omnivore: advanced filter is replaced with all filter
09:15:54.355 plugin:obsidian-omnivore:14257 obsidian-omnivore: custom query is set to in:all (in:all label:omnivore)

I had set my query to in:all label:omnivore and it seems your update sets it to in:all (in:all label:omnivore)

If I understand correctly to work the query has to include the in: query ?

Maybe just put it in bold in the docs and be done with it so that people know it.

I tried to import with just label:omnivore and it didn't work, I set it back to in:all label:omnivore and it worked
.

@herr-schaft
Copy link
Author

@sywhb sadly no change for me. Synching items continues to work fine until I add the {{{ content }}} of an article to the article template. This is regardless of the custom query being in:all (in:archive) or just in:archive.

@sywhb
Copy link
Collaborator

sywhb commented Feb 21, 2024

@sywhb here are the logs and my observations after upgrading :

09:15:54.355 plugin:obsidian-omnivore:14254 obsidian-omnivore: advanced filter is replaced with all filter
09:15:54.355 plugin:obsidian-omnivore:14257 obsidian-omnivore: custom query is set to in:all (in:all label:omnivore)

I had set my query to in:all label:omnivore and it seems your update sets it to in:all (in:all label:omnivore)

If I understand correctly to work the query has to include the in: query ?

Maybe just put it in bold in the docs and be done with it so that people know it.

I tried to import with just label:omnivore and it didn't work, I set it back to in:all label:omnivore and it worked .

thanks for the feedback!

if in filter were not set in the custom query, it would use in:inbox by default

@sywhb
Copy link
Collaborator

sywhb commented Feb 21, 2024

@sywhb sadly no change for me. Synching items continues to work fine until I add the {{{ content }}} of an article to the article template. This is regardless of the custom query being in:all (in:archive) or just in:archive.

that's kind of weird because it would show an error message in the console logs if it failed to sync the content.

i suspect it is still syncing.
would you mind opening you .obsidian/plugins/obsidian-omnivore/data.json when it starts to sync data from omnivore?
there is a key "syncing" in the json file and if it finished syncing, the value would be false.

@PatNei
Copy link

PatNei commented Feb 23, 2024

I get the same error, the console reveals the following error:
image

@MaryseBucking
Copy link

MaryseBucking commented Feb 24, 2024

I updated to the latest version, and it kept saying it was syncing, but nothing happened. I noticed that my 'last sync' was emptied in the settings, so I manually set it to the first of this month. Then tried again. After a while it gave an error and when I tried to sync again by manually starting the sync, it immediately said: failed to fetch articles. I've added the log.
obsidian.md-1708763381316.log

Also, I've copied the data.json from the plugins with the settings. Of course I've deleted my API key, but maybe it'll help if you see the settings.
data-nokey.json

@herr-schaft
Copy link
Author

herr-schaft commented Feb 25, 2024

@sywhb sadly no change for me. Synching items continues to work fine until I add the {{{ content }}} of an article to the article template. This is regardless of the custom query being in:all (in:archive) or just in:archive.

that's kind of weird because it would show an error message in the console logs if it failed to sync the content.

i suspect it is still syncing. would you mind opening you .obsidian/plugins/obsidian-omnivore/data.json when it starts to sync data from omnivore? there is a key "syncing" in the json file and if it finished syncing, the value would be false.

@sywhb, sorry for the late reply. Your are probably right in that it is still syncing. It's just that it doesn't ever seem to stop or produce any result. The syncing key shows 'true'. And no matter how long I wait, the plugin shows a 'already syncing' message when I try to (manually) sync again. From what I read, #202 seems to be on to something.

For good measure, this is my .obsidian/plugins/obsidian-omnivore/data.json
dateHighlightedFormat | "yyyy-MM-dd HH:mm:ss" dateSavedFormat | "yyyy-MM-dd HH:mm:ss" apiKey | "mine :)" filter | "ARCHIVED" syncAt | "" customQuery | "in:archive" template | "#omnivore {{#labels}} #{{name}} {{/labels}}\n\n{{#highlights.length}}\n## Highlights\n\n{{#highlights}}\n> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #{{name}} {{/labels}} ^{{{highlightID}}}\n{{#note}}\n\n{{{note}}}\n{{/note}}\n\n{{/highlights}}\n{{/highlights.length}}\n\n\n{{{ content }}}\n\n[Read on Omnivore]({{{omnivoreUrl}}})\n[Read Original]({{{originalUrl}}})" highlightOrder | "LOCATION" syncing | true folder | "Omnivore/" folderDateFormat | "yyyy-MM-dd" endpoint | "https://api-prod.omnivore.app/api/graphql" filename | "{{{title}}}" filenameDateFormat | "yyyy-MM-dd" attachmentFolder | "Omnivore/attachments" version | "1.9.4" isSingleFile | false frequency | 0 intervalId | 0 frontMatterVariables | [] frontMatterTemplate | "" syncOnStart | false

@sywhb sywhb closed this as completed in #202 Mar 8, 2024
Copy link

🎉 This issue has been resolved in version 1.9.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants