LostPaul / obsidian-folder-notes

Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.
https://lostpaul.github.io/obsidian-folder-notes/
GNU Affero General Public License v3.0
317 stars 15 forks source link

This is a dangerous plugin with a serious bug. #141

Open jmcd040 opened 1 month ago

jmcd040 commented 1 month ago

First, beware of this simple fact: What this plugin will do normally is take a folder named "XYZ" and create a note inside the folder named "XYZ.md" If you already have an XYZ.md note in that folder it will then consider that note to be the folder note! I have numerous folders containing a note of the same name as the folder so this works against me and perhaps against your vault too.

In the options under "General" you are supposed to be able to set the Folder note name. The default is "{{folder_name}}. I changed that to "{{folder_name}}-folder-note" and clicked on "Rename existing folder notes." HUGE mistake.

The plugin looked for every folder containing a note with the same name as the folder and changed both with a nasty twist. It renamed the folder AND the enclosing file to "XYZ-folder-note-folder-note-folder-note-folder-note-folder-note-folder-note-......" such that OneDrive (where I keep my vault) threw up its hands and said it couldn't sync the folder and file because the name was insanely long.

I tried setting the Folder note name back to {{folder_name}} and selecting "Rename..." but it did nothing.

Then when I tried manually renaming the note, the plugin just put it back to this long name. I realize now there's a setting to keep the folder and file names in sync.

Eventually, I was able to find and fix all the renamed folders and files.

The documentation for the "Folder note core" and "Folder notes" plugins don't mention that there is a wiki for the plugins. You have to stumble on it by going to Github and looking at the "Readme" notes. Even then there isn't anything that would have prevented the behavior I stumbled upon. There are lots of option settings but not really simple, clear notes on what they do.

LostPaul commented 1 month ago

What this plugin will do normally is take a folder named "XYZ" and create a note inside the folder named "XYZ.md"

First of all the plugin only creates a new note if you use the feature "create folder note for every folder" in the settings or you do it manually but it doesn't automatically create new folder notes by itself.

The plugin looked for every folder containing a note with the same name as the folder and changed both with a nasty twist. It renamed the folder AND the enclosing file to "XYZ-folder-note-folder-note-folder-note-folder-note-folder-note-folder-note-......" such that OneDrive (where I keep my vault) threw up its hands and said it couldn't sync the folder and file because the name was insanely long.

That's weird, I tried it myself but it worked just fine. It could be because of another plugin that interferes with the plugin or maybe it's OneDrive because I only had the folder notes plugin installed. But no matter what the cause is I'll add a modal that pops up when you press the button and tells you exactly what it does and that you should back up your vault beforehand, so that you can't accidentally click on it and something like this happens to you.

https://github.com/user-attachments/assets/c9b228e3-f746-41b4-9506-9005f2b9ea18

But it would be great if you still could reproduce the behavior in an sandbox vault and list the steps to reproduce it or a video.

The documentation for the "Folder note core" and "Folder notes" plugins don't mention that there is a wiki for the plugins. You have to stumble on it by going to Github and looking at the "Readme" notes. Even then there isn't anything that would have prevented the behavior I stumbled upon. There are lots of option settings but not really simple, clear notes on what they do.

You might have mixed up the plugins aidenlx with my plugins because when you download the plugin from Obsidian you can see the readme and see that there is a docs except on mobile because there are the buttons too large and you have to scroll to see the text. But I agree that the docs have to be improved and it needs to be better discoverable for the users, do you have any suggestions for that?

SlvdkRZChsSbIL6Z18w9