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

[Bug]Right-clicking will add a path to the image link. #16

Closed wwjCMP closed 1 year ago

wwjCMP commented 1 year ago

Right-clicking will add a path to the image link. [[20230918195826.png]] [[A1/20230918195826.png]] [[A1/A1/20230918195826.png]] [[A1/A1/A1/20230918195826.png]]

TomNCatz commented 1 year ago

I am going to need more information than that, This plugin should not do anything at all with any of those links, since none of them are embeds. The right click functionality I have added should not change anything about the original link either, it only opens it in the side panel. If you can check that you are still having this issue without any other plugins active and get me full reproduction steps I will look into it, but I have a suspicion something else is going on here.

TomNCatz commented 1 year ago

I think I found what could be causing your issue, if the path to the image is wrong it tries to auto correct the path, and you seem to have found a circumstance where the path tries to correct and fails. I will remove my auto correct functionality and just fall back on an error message that tells you the path is bad and offers suggestions. This should prevent accidental link changes, but still give you the information you need to correct the issue.

TomNCatz commented 1 year ago

Hopefully this is fixed for you in 1.1.3, please let me know if it is not and I will reopen this for investigation.

wwjCMP commented 1 year ago

Snipaste_2023-09-24_20-53-20 Snipaste_2023-09-24_20-52-41 It fixed this issue. However, I don't know why some image paths cannot be recognized. As shown above, I don't know what the difference in the path format of these two images is.

TomNCatz commented 1 year ago

That looks like a locale comparison issue. I'm not really equipped for Chinese text, so if you could send me a few folder names that you know are causing issues I can try to reproduce the file structure and see if I can come up with a solution.

wwjCMP commented 1 year ago

I have almost all the pictures stored in the root directory in the folder named "A1-附件." In fact, in the gallery, pictures from any path can be recognized normally, but they cannot be recognized when using the right-click method. Markdown files are also placed in Chinese directories.

TomNCatz commented 1 year ago

Thank you, I will see if I can figure something out.

wwjCMP commented 1 year ago

Snipaste_2023-09-25_08-36-22

TomNCatz commented 1 year ago

Has the 1.1.4 release helped with your issue, or are you still having trouble with this?

wwjCMP commented 1 year ago

Yes, everything is running smoothly.

wwjCMP commented 1 year ago

I've found another issue: newly added images cannot be immediately retrieved. After right-clicking, it prompts that the resource cannot be found. After restarting Obsidian, they can be retrieved.

FeralFlora commented 1 year ago

I've found another issue: newly added images cannot be immediately retrieved. After right-clicking, it prompts that the resource cannot be found. After restarting Obsidian, they can be retrieved.

Maybe you should close this one and open another issue?

TomNCatz commented 1 year ago

I've actually already found a fix for that issue and it'll go out in the next release, hopefully tonight sometime after work.