kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
610 stars 30 forks source link

Bug: All my Longform projects disappeared #147

Closed matthewmerendo closed 1 year ago

matthewmerendo commented 1 year ago

Versions Longform version: 2.0.3 Obsidian version: 1.1.16 OS [e.g. macOS, Windows, iOS, Android]: Windows Theme: Other plugins that you think might be relevant here:

Describe the bug I spent two weeks importing all of my works in progress into Longform. Today, I loaded Obsidian, and I have no Longform projects at all in the Longform screen. All the files are still there, intact and untouched, but Longform itself is blank.

To Reproduce Steps to reproduce the behavior:

  1. Go to Longform tab.
  2. See that it is empty.

Expected behavior I'd like to see all my Longform projects!

celtickuma commented 1 year ago

This happens aperiodically to my files. Using the reload command always restores them for me. In the editor, open the command palette, then type reload and select "Reload app without saving".

matthewmerendo commented 1 year ago

Tried that to no avail. All my projects are still missing.

matthewmerendo commented 1 year ago

I tested this in a completely new vault.

New vault -> Install Longform -> Create folder called Manuscripts -> Create a project -> Add two scenes.

Closed Obsidian. Reopened Obsidian. Everything is fine.

Then I copied one of my smallest folders from my original vault into the Manuscripts folder for the new vault. When I reopened Obsidian, no Longform projects at all, not even the test project.

Close Obsidian. Delete the copied folder from my original vault. Reopen test vault. Test project is back!

Any idea what's causing this? Anyone? I tried looking at the code -- I'm a programmer myself -- but it's very, very long. Very long.

kevboh commented 1 year ago

Is there an error in the dev tools console? Alternatively, are you comfortable zipping the broken project and sending it to me?

matthewmerendo commented 1 year ago

@kevboh I actually figured out what it was. One of my project folders had this in the index.md:

ignoredFiles: [
   - Eternity in an Hour
   - NULL
]

and Longform really did not like that random NULL. I'm not sure how it got there, to be honest, but once I removed it and reloaded, everything was fine.

kevboh commented 1 year ago

Ah, great catch. I'll see if I can work around that, but I'm sort of at the mercy of Obsidian's yaml parser here.

matthewmerendo commented 1 year ago

Yeah, it's odd because it broke every project in Longform, not just the one with the offending NULL. I'm not sure if it threw any console errors -- I didn't check, though I can certainly add that NULL back in to see.

kevboh commented 1 year ago

it's odd because it broke every project in Longform

That's to be expected at present—parsing is done across at projects at once. I could improve this somewhat by trying to silo parsing and skip erroring projects, and then log errors....

esmevane commented 1 year ago

Just coming in to add that this thread helped me debug a similar issue. I was loading a project between iPadOS and Mac. On the iPad I'd goofed up a file name (".md") and when I loaded Obsidian no projects would load. Renaming the file and reloading again did the trick.

kevboh commented 1 year ago

Okay, I'm going to close this issue but leave it otherwise untouched in case it helps others. I'll file a separate issue to make project loading more discrete and a bit louder when things error.