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

When I open the tag routes view, nothing shows. #10

Open
Saauan opened this issue Aug 28, 2024 · 7 comments
Open

When I open the tag routes view, nothing shows. #10

Saauan opened this issue Aug 28, 2024 · 7 comments

Comments

@Saauan
Copy link

Saauan commented Aug 28, 2024

Hello, I just installed the plugin to fool around with it. But when I open the tag routes view, only a blank page is shown. I tried to follow the installation instructions and videos carefully, but I don't understand what I'm doing wrong ?
I'm using Obsidian on Linux btw.

@kctekn
Copy link
Owner

kctekn commented Aug 28, 2024

Have you clicked the ribbon button on the left to start the view? If you have done so, maybe you can press ctrl-shift-I(or maybe other key under linux? ) to show the debug panel , is there any error messages show there?

@yakuzadave
Copy link

I ran into this too on Windows (I can also test on my macOS instance of Obsidian if it helps). In the console output, I see this:

app.js:1 Failed to open view TypeError: _c.tags.forEach is not a function
    at eval (plugin:tags-routes:33699:86)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33689:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33939:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)


@kctekn
Copy link
Owner

kctekn commented Aug 29, 2024

This seems to be an issue for tags in note frontmatter: I wrote a temporary version: added some debug information and it would can resolve the issue. Please try this version and provide the debug information if have any in the debug panel.

main.zip @yakuzadave @Saauan

  • Unzip to main.js and put it into your vault_directory/.obsidian/plugins/tags-routes, override the original one

@yakuzadave
Copy link

Awesome, thank you for looking into this. I'll try this out and let you know if I'm able to resolve the issue this way.

@yakuzadave
Copy link

Got a chance to test this morning and used your file (dropped in the existing plugin) and reloaded Obsidian and it looks like that did the trick. Snagged the debug logs too, so we could add it here:


file:  textgenerator/templates/default/simplify.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33735 Error occurred:  TypeError: cache.frontmatter.tags.forEach is not a function
    at eval (plugin:tags-routes:33728:34)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33717:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33989:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
plugin:tags-routes:33736 file:  textgenerator/templates/default/summarize.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33735 Error occurred:  TypeError: cache.frontmatter.tags.forEach is not a function
    at eval (plugin:tags-routes:33728:34)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33717:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33989:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
plugin:tags-routes:33736 file:  textgenerator/templates/default/rewrite.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33735 Error occurred:  TypeError: cache.frontmatter.tags.forEach is not a function
    at eval (plugin:tags-routes:33728:34)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33717:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33989:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
plugin:tags-routes:33736 file:  textgenerator/templates/default/getTags.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33485 Tags routes: set current slot:  1
plugin:tags-routes:33493 it is the same, go to load effects
plugin:tags-routes:33495 load from slot:  1
plugin:obsidian-textgenerator-plugin:2098 attempting to get files 30
plugin:excalibrain:1 ExcaliBrain indexed 966 URLs from 9 unique hosts in 38 of 644 markdown files in 2.9 seconds

Based on some of the file paths, it may be having issues with my textgenerator templates for ollama and other GenAI stuff Grabbed the frontmatter from one of them just in case that helps.

promptId: rewrite
name: ✏️ Rewrite, Paraphrase
description: select a content and it will be rewriten.
author: Noureddine
tags: writing
version: 0.0.1

@kctekn
Copy link
Owner

kctekn commented Aug 29, 2024

Thank you for the detailed information! it is helpful. From it, we can figure out that it's an issue with parsing the tags—whether they are written in multiple lines or a single line. This fix will be added in the next release.

@yakuzadave
Copy link

That's great to hear. Got a chance to test it a bit more on my Vault that had a ton of notes and the visualizations look great (especially love the grouping of broken links or Excalidraw links). Keep up the great work. :)

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

No branches or pull requests

3 participants