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

Bug: Any occurrence of BC-tag-note breaks Breadcrumbs Indexing. #361

Closed
chrisgrieser opened this issue Mar 22, 2022 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@chrisgrieser
Copy link
Contributor

Describe the bug
Note sure when exactly this started to occur, but I noticed that any use of BC-tag-note will break down Breadcrumbs Indexing. As a result, all up and down are messed up or missing.

Removing BC-tag-note: '#tag' only leads to the next note with such yaml to throw an error... 😦 with the respective tag. Removing all BC-tag-note in my vault seems to fix the issue.

Log

{tag: '#wissenschaftssoziologie'}tag: "#wissenschaftssoziologie"[[Prototype]]: Object
VM228:35275 TypeError: Cannot destructure property 'tags' of 'app.metadataCache.getFileCache(...)' as it is undefined.
    at getAllTags (eval at <anonymous> (app.js:1:1433712), <anonymous>:15842:13)
    at hasThisTag (eval at <anonymous> (app.js:1:1433712), <anonymous>:15864:29)
    at eval (eval at <anonymous> (app.js:1:1433712), <anonymous>:15871:65)
    at Array.filter (<anonymous>)
    at eval (eval at <anonymous> (app.js:1:1433712), <anonymous>:15871:14)
    at Array.forEach (<anonymous>)
    at addTagNotesToGraph (eval at <anonymous> (app.js:1:1433712), <anonymous>:15857:18)
    at buildMainG (eval at <anonymous> (app.js:1:1433712), <anonymous>:35248:9)
    at refreshIndex (eval at <anonymous> (app.js:1:1433712), <anonymous>:35411:26)
    at Object.callback (eval at <anonymous> (app.js:1:1433712), <anonymous>:64487:41)

Additional context

macOS 12.2.1
Obsidian 0.13.33
@chrisgrieser
Copy link
Contributor Author

Actually, due to a bug with the metadata extractor, I figured out that the problem seems to be caused by a file that I use as custom dictionary for the various complements plugin for autocompletion of citekeys. The file looks like this (only a few thousand lines longer) and does not have any yaml header.

Blättel-Mink 2021>>>[@Blattel-Mink2021]|Das Innovationsverständnis von Joseph A. Schumpete|2021,Blättel-Mink,blättel-mink
Pyka 2021>>>[@Pyka2021]|Evolutorische Innovationsökonomik|2021,Pyka,pyka
Schulz-Schaeffer 2021>>>[@Schulz-Schaeffer2021]|Innovation im Verhältnis zu Neuheit und Wandel|2021,Schulz-Schaeffer,schulz-schaeffer
Schrape 2021>>>[@Schrape2021a]|Verteilte Innovationsprozesse|2021,Schrape,schrape
Rabadjieva 2016>>>[@Rabadjieva2016]|Die "schöpferische Zerstörung" der Sharing Economy|2016,Rabadjieva,rabadjieva
Shah 2000>>>[@Shah2000]|Sources and Patterns of Innovation in a Consumer P|2000,Shah,shah
Schneiberg 2013>>>[@Schneiberg2013]|Movements as Political Conditions for Diffusion: A|2013,Schneiberg,schneiberg

@chrisgrieser
Copy link
Contributor Author

potentially this solves the problem? kometenstaub/metadata-extractor#17 (comment)

@SkepticMystic
Copy link
Owner

@chrisgrieser, I read over the thread in metadata-extractor. It seems to be an Obsidian issue then?

@chrisgrieser
Copy link
Contributor Author

Not sure, maybe @kometenstaub can answer this better?

@kometenstaub
Copy link
Contributor

I needed to check for both undefined and null. It's not typed like that in the API, but the null type in it means that it can return something else than what is expected.
So

if (someObject)

instead of

if (someObject !== null)

should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants