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

Folder notes no longer open when clicking on the folder (Obsidian Desktop v1.5.4) #134

Open
FitzFrobozz opened this issue Feb 6, 2024 · 30 comments

Comments

@FitzFrobozz
Copy link

FitzFrobozz commented Feb 6, 2024

After applying the Obsidian 1.5.4 update this morning (Insider release), folder note notes no longer open when I click on the folder.

Workaround(s): (None found so far.)

Errors from Console:

app.js:1 Failed to open view TypeError: Cannot read properties of undefined (reading 'navFileContainerEl')
    at t.eval (plugin:alx-folder-note:4821:45)
    at t.wrapper [as load] (plugin:alx-folder-note:4107:20)
    at t.<anonymous> (app.js:1:1418947)
    at app.js:1:237518
    at Object.next (app.js:1:237623)
    at app.js:1:236539
    at new Promise (<anonymous>)
    at v (app.js:1:236284)
    at t.open (app.js:1:1418819)
    at t.<anonymous> (app.js:1:1841668)
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'fileBeingRenamed')
    at eval (plugin:alx-folder-note:4274:23)
    at t.eval (plugin:alx-folder-note:4883:20)
    at t.wrapper [as onSelfClick] (plugin:alx-folder-note:4107:20)
    at HTMLDivElement.<anonymous> (app.js:1:1466273)
@lx0n2acl
Copy link

lx0n2acl commented Feb 7, 2024

looks like some of the properties were renamed. here is a quick fix / work around until the official one comes through:

go to file: .obsidian/plugins/alx-folder-note/main.js

find this line
item.fileExplorer.fileBeingRenamed === item.file
change to
item.fileExplorer?.fileBeingRenamed === item.file

find this block

    if (item && item.collapsed) {
      item.setCollapsed(false);
      this.plugin.app.nextFrame(() => {
        this.fileExplorer.dom.infinityScroll.computeSync();
        this.fileExplorer.dom.infinityScroll.scrollIntoView(item);
      });
    }
    this.fileExplorer.dom.navFileContainerEl.toggleClass(focusModeCls, !!item);

change to

    if (item && item.collapsed) {
      item.setCollapsed(false);
      this.plugin.app.nextFrame(() => {
        this.fileExplorer.tree.infinityScroll.computeSync();
        this.fileExplorer.tree.infinityScroll.scrollIntoView(item);
      });
    }
    this.fileExplorer.navFileContainerEl.toggleClass(focusModeCls, !!item);

there are probably more fixes but this works for me to get the folder to be clickable again
ymmv

@FitzFrobozz
Copy link
Author

looks like some of the properties were renamed. here is a quick fix / work around until the official one comes through:
...
there are probably more fixes but this works for me to get the folder to be clickable again ymmv

Thank you so much, lx0n2acl! Works perfectly. I also want to express my profound appreciation for your willingness to tackle this right away and despite the fact that the issue was introduced by an Insider build.

@Steve-Klingele
Copy link

this fixed it for me as well.

@FitzFrobozz
Copy link
Author

Are you guys seeing this issue again today? I'm not clear on what might have changed, but it's back for me. (I just double-checked and main.js still shows the changes made yesterday.)

@Steve-Klingele
Copy link

Still working for me

@schobernoise
Copy link

Same here!

plugin:alx-folder-note:4274 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'fileBeingRenamed')
    at eval (plugin:alx-folder-note:4274:23)
    at t.eval (plugin:alx-folder-note:4883:20)
    at t.wrapper [as onSelfClick] (plugin:alx-folder-note:4107:20)
    at HTMLDivElement.<anonymous> (app.js:1:1466273)

@jacovanderlaan
Copy link

Works great for me as well. Thanks for the solution!

@Afx31
Copy link

Afx31 commented Feb 24, 2024

Workaround works for me, as said above thankyou for the swift temp resolution so we can continue on using it!

@SpocWeb
Copy link

SpocWeb commented Feb 24, 2024

Hi, I have a regular Obsidian Desktop v1.5.8 and have the same Phenomenon.
This Workaround works for the v1.5.8 and seems to be necessary.
Can someone please file a PR for this Plugin?

@lodaket
Copy link

lodaket commented Feb 24, 2024

Awesome. Thank you so much for this fix. Same as SpocWeb, v1.5.8 and working for me.

@thatside
Copy link

This issue seems to be related to #130 and probably will be fixed by #133.

@brokeboiflex
Copy link

@lx0n2acl Could you make a pull request with your fix?

@lx0n2acl
Copy link

@brokeboiflex I can but it looks like there are already 2 PRs with these fixes in them as well as some additional work. It's up to the ower of the repo to merge those when ready. @aidenlx any updates?

@BatPanda
Copy link

BatPanda commented Mar 5, 2024

@lx0n2acl thank you for the quick fix!
My 1.5.8 version was also not working.
Lets hope @aidenlx sees this soon. 😄

@CobaltMongoose
Copy link

thanks for the work around. Yeah, I don't think I'll allow Obsidian to update ever again. Feels like russian roulette every time.

@marcinsmialek
Copy link

@CobaltMongoose this is an issue with extension, which was "working good enough" under the past conditions.

The fix was provided on January 7th, but the last extension update was over a year ago. Since that, no changes / fixes have been included. Let's hope that the PRs will be merged

@claremacrae
Copy link

I just want to say that I really, really feel for @aidenlx at this point, receiving repeated requests to deal with this repo.

If they had the capacity to do this currently, I imagine they would have done.

The thing about free software is that people make it in their spare time and offer it to others. And sometimes circumstances change and they can no longer maintain it.

And it can be easy for users to not understand the burden that repeated requests can place, in the situation. (Heck, they can be a burden even when one can maintain the project...)

An alternative to seemingly demanding that the software be updated - for free - is:

  1. be thankful that you could use it for as long as you could, for free...
  2. and then to search the Obsidian Community Store for newer plugins to see if there is one that meeds your needs.

@marcinsmialek
Copy link

Yeah, that's more demanding than one can expect.
Heck, that's one of the reasons why there aren't more plug-ins, or open-source software in general.

@SebastianMC
Copy link

I'm the author of obsidian-custom-sort plugin which was also affected by the breaking changes in File Explorer introduced in Obsidian 1.5.4. To fix the problem in my plugin I invested some time in a reverse engineering of Obsidian code to track back the relevant changes and then apply the required fixes.

I'm also a user of this alx-folder-note plugin (absolutely love it!) and when I found this discussion thread today I did two things:

  1. to simplify the life of not advanced users, I've created a fork of this alx-folder-note repository and applied the same fixes as for my plugin. Then created an official release in the fork, which means that you can install the patched alx-folder-note, compatible with Obsidian 1.5.4 (and newer), via the well known BRAT plugin. The plugin reference to use in BRAT is https://github.com/SebastianMC/alx-folder-note or - in shorter version - SebastianMC/alx-folder-note.
  2. to expose the code changes (the actual fix) I've created yet another pull request (#134 - fix to breaking changes introduced in Obsidian 1.5.4 (they did an internal refactoring of File Explorer, the fix follows the refactoring accordingly) #138). It contains the full set of required code changes (the two preexisting PRs cover this partially), and it contains only these code changes, isolated, for clarity. It can be helpful if one wants to apply the patch locally

Hopefully the author will find time to take care of fixing the issue. Until then I'm switching to use the alx-folder-note plugin installed via BRAT from the mentioned forked-and-patched repository (https://github.com/SebastianMC/alx-folder-note)

@quillmondo
Copy link

This worked! Thanks very much.

@TheOnlyWayUp
Copy link

looks like some of the properties were renamed. here is a quick fix / work around until the official one comes through:

go to file: .obsidian/plugins/alx-folder-note/main.js

find this line item.fileExplorer.fileBeingRenamed === item.file change to item.fileExplorer?.fileBeingRenamed === item.file

find this block

    if (item && item.collapsed) {
      item.setCollapsed(false);
      this.plugin.app.nextFrame(() => {
        this.fileExplorer.dom.infinityScroll.computeSync();
        this.fileExplorer.dom.infinityScroll.scrollIntoView(item);
      });
    }
    this.fileExplorer.dom.navFileContainerEl.toggleClass(focusModeCls, !!item);

change to

    if (item && item.collapsed) {
      item.setCollapsed(false);
      this.plugin.app.nextFrame(() => {
        this.fileExplorer.tree.infinityScroll.computeSync();
        this.fileExplorer.tree.infinityScroll.scrollIntoView(item);
      });
    }
    this.fileExplorer.navFileContainerEl.toggleClass(focusModeCls, !!item);

there are probably more fixes but this works for me to get the folder to be clickable again ymmv

Can reproduce, this fixed it. Thank you!

@HippyCraig
Copy link

I’m on obsidian 1.6.7 and this change is not working for me. Any advice?

@lethefrost
Copy link

I'm the author of obsidian-custom-sort plugin which was also affected by the breaking changes in File Explorer introduced in Obsidian 1.5.4. To fix the problem in my plugin I invested some time in a reverse engineering of Obsidian code to track back the relevant changes and then apply the required fixes.

I'm also a user of this alx-folder-note plugin (absolutely love it!) and when I found this discussion thread today I did two things:

  1. to simplify the life of not advanced users, I've created a fork of this alx-folder-note repository and applied the same fixes as for my plugin. Then created an official release in the fork, which means that you can install the patched alx-folder-note, compatible with Obsidian 1.5.4 (and newer), via the well known BRAT plugin. The plugin reference to use in BRAT is https://github.com/SebastianMC/alx-folder-note or - in shorter version - SebastianMC/alx-folder-note.
  2. to expose the code changes (the actual fix) I've created yet another pull request (#134 - fix to breaking changes introduced in Obsidian 1.5.4 (they did an internal refactoring of File Explorer, the fix follows the refactoring accordingly) #138). It contains the full set of required code changes (the two preexisting PRs cover this partially), and it contains only these code changes, isolated, for clarity. It can be helpful if one wants to apply the patch locally

Hopefully the author will find time to take care of fixing the issue. Until then I'm switching to use the alx-folder-note plugin installed via BRAT from the mentioned forked-and-patched repository (https://github.com/SebastianMC/alx-folder-note)

Would it be possible to add an option to make clicking on all the folder titles (regardless of whether they have a folder note or not) don't fold/unfold the folder? For now, turning off the Expand folder on click option only takes effect on the folders containing folder notes. And with the inconsistent behavior, the long press to focus feature doesn't work well on those folders without folder notes. If you long press on their title, they will first expand and when you release the mouse button they will immediately collapse.

Thank you so much for the efforts making those fixes in your beta repository! It's awesome and still works in v1.7.

@HippyCraig
Copy link

This worked for me thanks

I'm the author of obsidian-custom-sort plugin which was also affected by the breaking changes in File Explorer introduced in Obsidian 1.5.4. To fix the problem in my plugin I invested some time in a reverse engineering of Obsidian code to track back the relevant changes and then apply the required fixes.
I'm also a user of this alx-folder-note plugin (absolutely love it!) and when I found this discussion thread today I did two things:

  1. to simplify the life of not advanced users, I've created a fork of this alx-folder-note repository and applied the same fixes as for my plugin. Then created an official release in the fork, which means that you can install the patched alx-folder-note, compatible with Obsidian 1.5.4 (and newer), via the well known BRAT plugin. The plugin reference to use in BRAT is https://github.com/SebastianMC/alx-folder-note or - in shorter version - SebastianMC/alx-folder-note.
  2. to expose the code changes (the actual fix) I've created yet another pull request (#134 - fix to breaking changes introduced in Obsidian 1.5.4 (they did an internal refactoring of File Explorer, the fix follows the refactoring accordingly) #138). It contains the full set of required code changes (the two preexisting PRs cover this partially), and it contains only these code changes, isolated, for clarity. It can be helpful if one wants to apply the patch locally

Hopefully the author will find time to take care of fixing the issue. Until then I'm switching to use the alx-folder-note plugin installed via BRAT from the mentioned forked-and-patched repository (https://github.com/SebastianMC/alx-folder-note)

Would it be possible to add an option to make clicking on all the folder titles (regardless of whether they have a folder note or not) don't fold/unfold the folder? For now, turning off the Expand folder on click option only takes effect on the folders containing folder notes. And with the inconsistent behavior, the long press to focus feature doesn't work well on those folders without folder notes. If you long press on their title, they will first expand and when you release the mouse button they will immediately collapse.

Thank you so much for the efforts making those fixes in your beta repository! It's awesome and still works in v1.7.

Thanks this worked great for me hopefully the owner will incorporate your changes.

@hnmike
Copy link

hnmike commented Sep 10, 2024

his change is not working for me.
plugin:alx-folder-note:4274 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'fileBeingRenamed')
at eval (plugin:alx-folder-note:4274:23)
at t.eval (plugin:alx-folder-note:4883:20)
at t.wrapper [as onSelfClick] (plugin:alx-folder-note:4107:20)
at HTMLDivElement. (app.js:1:1466273)

@quillmondo
Copy link

Hi,
Yesterday I updated to v1.7.4 and everything worked as normal all day.

Today however, the same issue cropped up again. The error "folder-note-core encountered an error while loading" shows up at Obsidian startup. Then, clicking the folder name in navigator no longer opens the folder note. Folder and folder note are now separate entries in the navigator.

Earlier this year, March 2024, I implemented the changes suggested by @lx0n2acl and it got fixed. Thanks again. The suggested changes are still in the main.js file at this time.

Would anyone know a new solution?

Thank you

@HippyCraig
Copy link

I also upgraded 1.7.4 and I reapplyed the and it doesnt work anylonger for me I reapplyed the patches from the forked version and that didnt help. Not sure what causes it but I didable it to see if it would fix other issues I saw in the console but not I can't even renable it.

@hsiktas
Copy link

hsiktas commented Oct 19, 2024

I switched over to the similar but still maintained https://github.com/LostPaul/obsidian-folder-notes
So far, I don't notice huge differences for my use case. 😃

@HippyCraig
Copy link

Yea I just made this switch just after I wrote my comment, this seems to do the exact same thing but with more features so Im happy with that. Shame things seem to have quited down on this plugin

@MolaveM
Copy link

MolaveM commented Oct 20, 2024

@hsiktas @HippyCraig Thank you for pointing me in the right direction. I was not aware of the Folder Notes plugin by Lost Paul. I first disabled the older plugins AidenLx's Folder Note and Folder Note Core, then installed the new one directly from the Obsidian interface. After fiddling with the settings, my vault seems to work the same as it did before. Which is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests