TomNCatz / obsidian-gallery

Main Gallery to tag / filter / add notes to images. Display blocks to embed images inside notes. Display block to an image information
MIT License
41 stars 3 forks source link

meta file block disappearing, tags not functioning correctly #21

Open cyberat0r opened 1 year ago

cyberat0r commented 1 year ago

i just recently figured out how to use the plugin but i had an issue with the meta files

every time i reopen the vault, the display block stops working. the code block is still there, but it just doesn't do anything

i'm not sure if this would count as a question or a bug, but i wanted to point this out since the issue has made me re tag the same batch of images three times now.

TomNCatz commented 1 year ago

So that definitely would be a bug, although there is likely more going on there. The tags don't actually live in the display block, they live in the info file that gets stored in the gallery info folder you have selected in the settings. Even if the display block has disappeared, the tags should remain.

I will need a bit more information to be able to reproduce. could you start with checking to see if the meta files are being generated in the gallery folder, and if there are any duplicates? Duplicates would have the same name but with a number added after.

cyberat0r commented 1 year ago

after fiddling with it a bit more yesterday, i found out that the meta file wouldn't create the "targetImage" property for some reason. it's easy to fix by putting it in manually, but i haven't been able to find what causes it this to happen.

TomNCatz commented 1 year ago

Would you be willing to share an example of what you've had to put in the targetImage field? It is possible there is some kind of formatting in your file name or path that I am not handling properly.

Another potential way to get more info, next time you generate a meta file(which will happen the first time you open in info panel for a new image) can you press ctrl+shift+i and share any errors you see in there?

If I can figure out why this is happening to you I'd very much like to fix it.

cyberat0r commented 1 year ago

all i have to do is manually put in the image path in the properties. image

i've assumed it was another plugin clashing with it, but to fix it i've had to turn off all of the other plugins individually.

here's some of the errors that came up image image

i also wanted to note that the images stopped automatically opening in the info panel since i started using syncthing to sync my vault between my phone and my computer. that may be something on my end however.

cyberat0r commented 1 year ago

the automatic info panel was indeed on my part, i found the toggle for it and it was off

cyberat0r commented 1 year ago

so this may be a new issue, but after a while of having my vault files on my phone, all of the info blocks disappeared.

no images have shown up in the gallery either

TomNCatz commented 8 months ago

it's taken me a while to get back to this, but for starters you shouldn't be putting in the targetImage in manually. The plugin generates the meta files manually when you click on an image and if you've let it do that it should update their path in most cases automatically. I can not really be certain how stable anything in a metafile will be inf you are manually changing the target.

Looking at the errors you posted I'm only seeing one that looks like it's related to my plugin code and it seems to be erroring out on something related to showing a hotkey. I'm not sure why that would be getting triggered, but I'll look into it.

And the last note, I can't really help you with syncthing. I use the plugin all the time across devices, but I use obsidian sync. I can say that if you have the same vault open on multiple devices at the same time and make changes syncing services can absolutely mangle it. Not really a thing I can fix without basically writing a sync wrapper for every possible sync method people use.