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

[Bug]: Upgrading to 0.9.6 disables all core plugins #232

Closed
2 tasks done
0atman opened this issue Apr 18, 2024 · 6 comments · Fixed by #234
Closed
2 tasks done

[Bug]: Upgrading to 0.9.6 disables all core plugins #232

0atman opened this issue Apr 18, 2024 · 6 comments · Fixed by #234
Labels
bug Something isn't working

Comments

@0atman
Copy link

0atman commented Apr 18, 2024

Bug Description

Yesterday (17th) Upon upgrading to surfing 0.9.6, all my core plugins (including sync!) got disabled!

Something to do with this disable/re-enable patch maybe? 0.9.5...0.9.6#diff-f956c54d67796b696eee0b56736fbc72034a4c2144c86779cc7b2665ea1c53d0R644

3 others in the OMG discord had this too, but only for upgrades of surfing, not for fresh install. So weird!

Relevant Screenshot

I don't understand the code, but this part looks strange, lines 616-651 in surfingIndex.ts looks strange:

const pagePreview = this.app.internalPlugins.plugins['page-preview'];
...
pagePreview.disable();

To Reproduce

I can't replicate this in a clean vault, something about the upgrade process caused this.

Obsidian Version

1.5.12

web-browser-only

  • Did you install only one web browser plugin?

Checklist

  • I updated to the latest version of the plugin.
@0atman 0atman added the bug Something isn't working label Apr 18, 2024
@0atman 0atman changed the title [Bug]: 0.9.6 disables all core plugins [Bug]: Upgrading to 0.9.6 disables all core plugins Apr 18, 2024
@Quorafind
Copy link
Collaborator

Could you take a loot at 0.9.7, and see if it remains?

The code is a way to patch page preview (make hovering external link just works like when you hover on the internal link)

@Quorafind
Copy link
Collaborator

Revert all the update from 0.9.5, now you can install 0.9.8 to make it work correctly.

@Vabolos
Copy link

Vabolos commented Apr 19, 2024

Bug is fixed now, but for those who are still experiencing it: try disabling the Surfing plugin - enable all of the core plugins you want - restart obsidian (quick test to see if it worked) and ur done! at the end i chose to enable surfing again which then stopped giving me this problem. I have now updated the plugin to the latest release so I'm not expecting any more future problems

@Quorafind Quorafind pinned this issue Apr 19, 2024
@0atman
Copy link
Author

0atman commented Apr 19, 2024

Thank you SO much for this fix, and so fast!

I'm a web developer, so I'm curious what was the problem? I can't see anything obvious! ❤️

@0atman 0atman closed this as completed Apr 19, 2024
@Quorafind
Copy link
Collaborator

Quorafind commented Apr 19, 2024

@0atman

After a thorough investigation, I believe the cause of the bug is that Obsidian loads and registers community plugins before enabling the core plugins. This sequence of actions results in the following issues:

  1. If the page preview toggle is used(based on disable() and enable() method), it causes the configuration to be saved at a moment when all core plugins except page preview are disabled. Therefore, the saved configuration reflects these plugins as being disabled.
  2. Subsequently, Obsidian begins to enable the core plugins. However, by this time, all settings have already been reset to 'disabled,' leading to the bug you observed.

details issue: #227 (comment)

@0atman
Copy link
Author

0atman commented Apr 19, 2024

Amazing, thank you so much for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants