mathisgauthey / obsidian-workflow-template

This is an Obsidian vault template from my Workflow with Tasks and Project Management, Journaling, Media Tracking, Offline Read-it-later and Bookmark Management, Note-taking and Note-sharing on Your Own Website
MIT License
195 stars 29 forks source link

2024-02-29 Issues with Daily-Note navigation links after plugin update #9

Open krisudo opened 4 months ago

krisudo commented 4 months ago

Hi @mathisgauthey!

And thanks for the template. I've been testing it out for few days and it feels great for my use case. I was just about to migrate fully, but after I updated the plugins today I'm experiencing issues with the Daily-Note navigation links e.g. these:

image

When clicking any of the links (2024/Q1/February/Week 09) It creates a page and the template quickly flashes/shows but after that it's an empty page:

image

Any ideas how to fix and what could cause this? I'd like to start using the template and this functionality is handy on the daily note.

Thanks!

mathisgauthey commented 4 months ago

Hey there, I just cloned the repository on last version using these versions :

SYSTEM INFO:
    Obsidian version: v1.5.8
    Installer version: v1.4.16
    Operating system: Windows 10 Pro 10.0.22631
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Base theme: adapt to system
    Community theme: AnuPpuccin v1.4.4
    Snippets enabled: 4
    Restricted mode: off
    Plugins installed: 39
    Plugins enabled: 39
        1: Style Settings v1.0.7
        2: Periodic Notes v0.0.17
        3: Omnivore v1.8.1
        4: Kanban v1.5.3
        5: Calendar v1.5.10
        6: Templater v1.16.0
        7: Commander v0.5.1
        8: Scroll to Top Plugin v2.1.3
        9: Iconize v2.6.0
        10: File Explorer Note Count v1.2.1
        11: Filename Heading Sync v1.9.0
        12: Colorful Tag v1.3.2
        13: Code Editor Shortcuts v1.14.0
        14: Find orphaned files and broken links v1.9.1
        15: Natural Language Dates v0.6.1
        16: Paste URL into selection v1.7.0
        17: Shortcuts extender v2.2.0
        18: Archiver v0.26.1
        19: Auto Link Title v1.4.1
        20: Better footnote v1.0.1
        21: Better Word Count v0.10.0
        22: Callout Manager v1.0.1
        23: Clear Unused Images v1.1.0
        24: Completr v3.2.0
        25: Dataview v0.5.64
        26: Editing Toolbar v2.4.0
        27: Footnote Shortcut v0.1.3
        28: Github Publisher v6.3.2
        29: Heatmap Calendar v0.6.0
        30: Image Toolkit v1.4.0
        31: Linter v1.20.0
        32: Note Refactor v1.8.2
        33: Paste image rename v1.6.1
        34: Show Whitespace v0.3.1
        35: Symbols Prettifier v1.1.1
        36: Tag Wrangler v0.6.1
        37: Tasks v5.5.0
        38: Todoist Plugin v1.11.1
        39: QuickAdd v1.4.0

RECOMMENDATIONS:
    Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

I can't reproduce the issue on a freshly cloned vault with the last Obsidian version, I probably won't be able to help more now.

But I'd suggest to :

Maybe try to disable every plugin except Templater and Periodic Note ? If it works, then a plugin is causing the issue. So try by activating half, and then another half using a divide and conquer strategy to find the potential plugin that causes the issue ?

krisudo commented 4 months ago

Hey! And thanks for the reply.

I just extracted the latest vault version and here's my starting point after updating the plugins:

SYSTEM INFO:
    Obsidian version: v1.5.8
    Installer version: v1.5.3
    Operating system: Windows 10 Enterprise 10.0.22631
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Base theme: adapt to system
    Community theme: AnuPpuccin v1.4.5
    Snippets enabled: 4
    Restricted mode: off
    Plugins installed: 39
    Plugins enabled: 39
        1: Periodic Notes v0.0.17
        2: Templater v2.2.1
        3: Archiver v0.26.1
        4: Auto Link Title v1.5.3
        5: Better footnote v1.0.1
        6: Better Word Count v0.10.1
        7: Calendar v1.5.10
        8: Callout Manager v1.0.1
        9: Clear Unused Images v1.1.0
        10: Code Editor Shortcuts v1.14.0
        11: Colorful Tag v1.3.2
        12: Commander v0.5.1
        13: Completr v3.2.0
        14: Dataview v0.5.64
        15: Editing Toolbar v2.4.0
        16: File Explorer Note Count v1.2.1
        17: Find orphaned files and broken links v1.9.1
        18: Footnote Shortcut v0.1.3
        19: Github Publisher v7.0.2
        20: Heatmap Calendar v0.6.0
        21: Iconize v2.10.1
        22: Image Toolkit v1.4.1
        23: Kanban v1.5.3
        24: Linter v1.23.1
        25: Natural Language Dates v0.6.2
        26: Note Refactor v1.8.2
        27: Omnivore v1.9.4
        28: Paste image rename v1.6.1
        29: Paste URL into selection v1.7.0
        30: QuickAdd v1.7.0
        31: Scroll to Top v2.1.4
        32: Shortcuts extender v2.2.0
        33: Show Whitespace v0.3.1
        34: Style Settings v1.0.7
        35: Symbols Prettifier v1.1.1
        36: Tag Wrangler v0.6.1
        37: Tasks v6.0.0
        38: Todoist Sync v1.12.0
        39: Filename Heading Sync v1.9.0

RECOMMENDATIONS:
    Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

I started to disable plugins and with only Templater and Periodic Notes everything seem to work when clicking the link e.g. "Week 09":

SYSTEM INFO:
    Obsidian version: v1.5.8
    Installer version: v1.5.3
    Operating system: Windows 10 Enterprise 10.0.22631
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Base theme: adapt to system
    Community theme: AnuPpuccin v1.4.5
    Snippets enabled: 4
    Restricted mode: off
    Plugins installed: 39
    Plugins enabled: 2
        1: Templater v2.2.1
        2: Periodic Notes v0.0.17

The page gets created, has content and looks normal:

image

Then I tried to enable Filename Heading Sync and the issue is back:

SYSTEM INFO:
    Obsidian version: v1.5.8
    Installer version: v1.5.3
    Operating system: Windows 10 Enterprise 10.0.22631
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Base theme: adapt to system
    Community theme: AnuPpuccin v1.4.5
    Snippets enabled: 4
    Restricted mode: off
    Plugins installed: 39
    Plugins enabled: 3
        1: Templater v2.2.1
        2: Periodic Notes v0.0.17
        3: Filename Heading Sync v1.9.0

The page gets created but it's empty.

image

Here's the settings for Filename Heading Sync - I didn't touch anything:

image
And here's the default Filename-Template.md ``` <%* let templater = app.plugins.plugins["templater-obsidian"]; let templateFolder = templater.settings.templates_folder; /** * format: momentjs format strings for filename * template: name of template * * If the file name matches the format, respective * template will be inserted. */ let noteTypes = [ { format: "YYYY-MM-DD", template: "Daily-Notes.md" }, { format: "GGGG-[W]WW", template: "Weekly-Notes.md" }, { format: "YYYY-MM", template: "Monthly-Notes.md" }, { format: "YYYY-[Q]Q", template: "Quarterly-Notes.md" }, { format: "YYYY", template: "Yearly-Notes.md" }, { format: "2-Areas", template: "Areas.md" }, { format: "0-Inbox", template: "Untitled.md" }, ]; for (const noteType of noteTypes) { // If found a matching note title if (moment(tp.file.title, noteType.format, true).isValid()) { // Get TFile of template let templateTFile; try { // Get TFile templateTFile = app.vault.getAbstractFileByPath( `${templateFolder}/${noteType.template}` ); // Error handling if (!templateTFile) { let msg = "Template not found\n" + `${templateFolder}/${noteType.template} does not exist.`; new Notice(msg); throw Error(msg); } } catch (e) { console.error(e); return; } // Insert template templater.templater.append_template_to_active_file(templateTFile); break; // Task completed, leaving the loop } // If found a matching note title else if (tp.file.folder(true) == noteType.format) { // Get TFile of template let templateTFile; try { // Get TFile templateTFile = app.vault.getAbstractFileByPath( `${templateFolder}/${noteType.template}` ); // Error handling if (!templateTFile) { let msg = "Template not found\n" + `${templateFolder}/${noteType.template} does not exist.`; new Notice(msg); throw Error(msg); } } catch (e) { console.error(e); return; } // Insert template templater.templater.append_template_to_active_file(templateTFile); break; // Task completed, leaving the loop } } %> ```

I understand it's hard to debug if you cant reproduce the issue. Let me know if you spot anything weird or have any ideas what I could try next, thanks!

mathisgauthey commented 4 months ago

Alright, thanks for the detailed message.

I was able to reproduce by updating all plugins. I'm looking for a fix right now, I'll keep you updated here.

Edit : I'm sorry, I tried for the last hour or so, and did not find any solution. I'm sure it is between Filename Heading Sync, Periodic Notes and Templater. I tried modifying templates as well, but couldn't come up with a solution. Sorry lad !

I updated only Templater and the issue started happening. I'd suggest creating an issue there and linking this present issue.