sundevista / local-quotes

📜 Collect your quotes from all over the vault and embed them in different locations with refresh delays
https://sundevista.github.io/local-quotes/
MIT License
40 stars 1 forks source link

Error loading quotes for already embedded blocks and command open quote maker does not prompt a pop up windows #19

Closed tecnoborder closed 1 year ago

tecnoborder commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

sundevista commented 1 year ago

@tecnoborder Hello. Did you read documentation? Did you follow it step by step? Can you describe your problem more clarified?

tecnoborder commented 1 year ago

thanks for the reply. Yes, I read the documentation and the plugin was working correctly until a few days ago. I have to say that in the past weeks when I opened obsidian sometimes I got the message that there was an issue.

I tried to install the plugin on a new vault and it works correctly, while in my vault it does not. I also reinstalled the plugin but the issue persists.

tecnoborder commented 1 year ago

Yes, I read the documentation. The plugin worked well until a few days ago. Now I receive the message failed to load local quotes plugin when I open obsidian

tecnoborder commented 1 year ago

I have to say that I tried and created a new empty vault and in that one, it works with no problems.

sundevista commented 1 year ago

You said that "Open Quote Maker" command doesn't work properly too. I should notice that it must be called only in Editor mode because of Obsidian rules. But it throws informal error messages when something went wrong. Did you see any?

About your problem, I have suspicions on your quote listings. Can you send me result of the "Open Statistics" command and your code block's content. If there is any personal information you can blur it by any way.

tecnoborder commented 1 year ago

Thanks for the prompt reply. I tried to disable all the plugins and themes but the local quotes plugin but it does not work. Yes, I tried to add a quote in editing mode but no window appears. I also clicked on the open statistics but nothing happens

sundevista commented 1 year ago

Ok, it gets more interesting. Can you try to open any prompt with opened console (you can open it with Ctrl+Shift+I on Windows)

tecnoborder commented 1 year ago
Screen Shot 2022-07-22 at 15 23 47

I get this message when I tried to add (in editing mode) a one time quote using the command

tecnoborder commented 1 year ago
Screen Shot 2022-07-22 at 15 26 11
sundevista commented 1 year ago
Screen Shot 2022-07-22 at 15 26 11

This one related to another plugin (you can see its part name in "plugin:obsidian-file...me-heading-sync")

sundevista commented 1 year ago
Screen Shot 2022-07-22 at 15 23 47

I get this message when I tried to add (in editing mode) a one time quote using the command

Did you add #quote tag to notes with your quote listing?

tecnoborder commented 1 year ago

Yes! Now the quote blocks work but I did not get the pop up messages to add new quotes

tecnoborder commented 1 year ago

and I get the notification that the plugin failed to load

sundevista commented 1 year ago

Yes! Now the quote blocks work but I did not get the pop up messages to add new quotes

You mean there was no #quotes tag previously?

tecnoborder commented 1 year ago

the frontmatter was something like this:


tags: quote

In the settings of the app I had edited quotes to quote. Now I updated the frontmatter of the file to ensure consistency so:


tags: quotes

sundevista commented 1 year ago

Now you can write your quote listing following the documentation rules. It must work.

tecnoborder commented 1 year ago

I always get the error message when opening obsidian and it loads the plugin. Still, the pop-up window when prompting one of the commands (e.g. add a new quote), does not appear. So, as of now: the plugin works only for the quotes I have already added in my quotebook

sundevista commented 1 year ago

Can you show me console output when you are trying to use "Open Quote Maker"?

tecnoborder commented 1 year ago
Screen Shot 2022-07-22 at 20 10 20
tecnoborder commented 1 year ago

You see a double message as I tried in two different notes and got the same error

sundevista commented 1 year ago

I tried to reproduce it again, but I just can't reach the same error. Can you share your quote listing .md file? Or you can make empty vault, reach the error and share me this vault. This kind of error is very individual and unique, so I need as much information as possible, and sharing the empty vault with the error is the right way.

tecnoborder commented 1 year ago

I found the culprit!

Screen Shot 2022-07-22 at 21 48 51

!

tecnoborder commented 1 year ago

I had two quotebooks one with an icon and the other one without it. If I delete one of the two everything works like a charm. I get the pop-up messages and also the plugin loads correctly.

tecnoborder commented 1 year ago

For the plugin, I am now wondering if it generates an error as it does not recognize the icon and so there are to files with the same name

tecnoborder commented 1 year ago

Thank you so much for the support! I will remove the duplicate. Still, this issue might be interesting for you

sundevista commented 1 year ago

I'm glad that all is fine now. But I wish to leave this issue opened because I want to play around it. I think that now reproducing will be more successful. So I'll try to fix it anyway.

tecnoborder commented 1 year ago

I spoke too early, I copied my vault left only that two notes + the home page and tried removing one of the two and it was working. Now that I deleted both files in my main vault the problem persists. I will try to create a shareable version of my vault and come back to you

tecnoborder commented 1 year ago

I repeated the test: copied my vault and deleted all files (but the hidden ones) and the plugin worked. I added the home and the two quotebooks and it still works. Before it didn't.

So I copied all my files into that new vault that I had emptied before. I had around 9K notes. In the beginning, the pop-up windows appeared but when the indexing started it stopped working.

As the problem cannot be due to a specific file, before I tried deleting all the files gradually until I was left with only the quotebooks, I guessed the problem might be related to the indexing process of obsidian.

So in the copy of the vault with all the plugins, I added the two quotebooks files (and it was still working), and I created 15K markdown files (to simulate my real vault). The plugin still loads correctly.

At this point, I do not have a clue what could be the cause. I assume one of my files but when I deleted all of them and had only the quotebooks, the issue was still there and then when I deleted one of the two quotebooks It worked. When I did this in my vault (removing one of the quotebooks) the issue still persisted. Then, I repeated the experiment, and even with two quotebooks in a copied vault but and 15k markdown files it works.

There is a dynamic behaviour related to my vault that I am not able to undestand

sundevista commented 1 year ago

In two hours, I will publish a hotfix that may fix your problem (1.8.2). When it's published, update the plugin and restart Obsidian.

UPD: I published it.

tecnoborder commented 1 year ago

I updated and it solved all the issues!!

tecnoborder commented 1 year ago

Thank you so much!

sundevista commented 1 year ago

@tecnoborder For your interest - the reason of all these issues was invalid YAML (frontmatter) in one of your notes. Now when it's happen during scan process, the plugin just send warning to console. These warnings can be disabled in the settings.