obsidian-dendron-tree icon indicating copy to clipboard operation
obsidian-dendron-tree copied to clipboard

"Failed to load plugin dendron-tree" on Obsidian startup

Open lawb4 opened this issue 1 year ago • 4 comments

Hi, I managed to run the plugin successfully for the first time, but when I restarted Obsidian, I got a "failed to load plugin dendron-tree" message and there is no "tree view" in the plugin window anymore.

I checked the console and it says the following:

TypeError: a.title.localeCompare is not a function
    at eval (plugin:dendron-tree:870:42)
    at Array.sort (<anonymous>)
    at Note.sortChildren (plugin:dendron-tree:870:19)
    at eval (plugin:dendron-tree:872:46)
    at Array.forEach (<anonymous>)
    at Note.sortChildren (plugin:dendron-tree:872:21)
    at eval (plugin:dendron-tree:872:46)
    at Array.forEach (<anonymous>)
    at Note.sortChildren (plugin:dendron-tree:872:21)
    at eval (plugin:dendron-tree:872:46)
    at Array.forEach (<anonymous>)
    at Note.sortChildren (plugin:dendron-tree:872:21)
    at NoteTree.sort (plugin:dendron-tree:915:15)
    at DendronVault.init (plugin:dendron-tree:1273:15)
    at DendronWorkspace.changeVault (plugin:dendron-tree:2609:13)
    at DendronTreePlugin.onRootFolderChanged (plugin:dendron-tree:3370:20)
    at eval (plugin:dendron-tree:3327:12)
    at t.<anonymous> (app.js:1:1983837)
    at app.js:1:237258
    at Object.next (app.js:1:237363)
    at a (app.js:1:236081)

Could you please look into the issue? I've attached a screenshot of the visual bug, if that helps

XXkyTreqjX

If more info needed, I would be glad to provide it

lawb4 avatar Jan 29 '24 12:01 lawb4

Out of curiosity, have you been able to find out why this happened ?

jeansordes avatar Jul 15 '24 19:07 jeansordes

Out of curiosity, have you been able to find out why this happened ?

As a matter of fact, I have not. I tried to reinstall the plugin which helped until I closed Obsidian. After I start Obsidian again, the same error persists. Eventually I refrained from using this plugin and went on with using the dendron in VS Code itself

lawb4 avatar Jul 16 '24 13:07 lawb4

I found why this issue is happened. This occur because "title" property of note is not string but not empty. For example, when "title" property is number without quote (""). I will fix this issue.

levirs565 avatar Aug 16 '24 14:08 levirs565

I found why this issue is happened. This occur because "title" property of note is not string but not empty. For example, when "title" property is number without quote (""). I will fix this issue.

Thanks! Much appreciated :)

lawb4 avatar Aug 20 '24 09:08 lawb4