Praxxian / lava-flow

A Foundry VTT module that allows you to import your notes from Obsidian MD into Foundry journal entries.
MIT License
68 stars 11 forks source link

v10 compatibility #19

Closed arirawr closed 1 year ago

arirawr commented 2 years ago

Hello! First off thanks for making my life so much easier.

I am using the testing build of Foundry v10, which is set to be released as stable in about 2 days. The update includes some changes to the journal.

Your module works for the most part in v10 and importing is fine, but the links are no longer being replaced properly.

Attaching an image of what it looks like:

image

I get a warning followed by an error:

Error: You are accessing the JournalEntry#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly.
    at logCompatibilityWarning (commons.js:1232:19)
    at JournalEntry._logV10CompatibilityWarning (commons.js:6119:14)
    at get data [as data] (commons.js:6019:24)
    at LavaFlow.updateLinks (lava-flow.js:254:45)
    at LavaFlow.importVault (lava-flow.js:80:32)

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'replace')
[Detected 1 package: lava-flow]
    at LavaFlow.updateLinks (lava-flow.js:254:58)
    at LavaFlow.importVault (lava-flow.js:80:32)
Praxxian commented 2 years ago

Thanks for the heads up. I've totally lost track with when v10 is releasing. I'll check out the new Journal structures and update.

Razeick commented 2 years ago

I am having a problem importing with V10. I am getting the same error as above but only the first file in my obsidian vault is getting imported .

I am also getting this error in the console Uncaught (in promise) TypeError: journal.data.content is undefined

Praxxian commented 2 years ago

Right now it does not support v10, but I am working on that and it's getting pretty close!

Razeick commented 1 year ago

Hello, love this module its making my life so much easier. I was wondering if you are still planning to update this to V10?

TravisLite commented 1 year ago

Any updates?

Praxxian commented 1 year ago

Hey everyone! Thank you so much for your patience. Had a very strange and busy year. Taking some time off from work, and I am hoping to have this done before 2023.

One hurdle I ran into was I, perhaps foolishly, was also looking at converting the project to typescript. So that added some additional time, but in the end this codebase will be much cleaner and well organized. There's a third party project to provide types for the Foundry API, and at the time I started, they had not fully updated for all the new journal changes.

But I suspect they will have caught up by now, which should make development much smoother.

Praxxian commented 1 year ago

Merry Midwinter and happy New Year, everyone! Release 2.0.1 introduces compatibility with v10! The README has been updated with some known formatting issues since Obsidian has more bells and whistles than Foundry's markdown.

Try it out and let me know if you run into any issues.

sliverspell commented 1 year ago

Hi there. First awesome module. I am running v10 build 291. My problem is that when you choose vault folder, foundry only imports 1 md file from that folder.*So lets say I have folder x, with 3 .md files inside, it only imports one of them and not the 2 others. Ive tried several different folders with the same result. Ive tried root then md files inside, 2 level folders , 2 notes and 3 notes, but still the same problem. Any idea what could be wrong here?

Praxxian commented 1 year ago

@evenfell That is unusual and not something I've experienced during testing.

If using a browser resolves the behavior, I know the issue. If not, could you give me examples of file paths (relative to your vault) that work and those that don't work?

sliverspell commented 1 year ago

@Praxxian lava flow version 1.2.1 Tested Using foundry v10. build 291 brave browser and chrome tested, same result. I first thought it was related to folder structure. I put .md files in a single folder, so folder/ file 1 , 2 , 3 Same result as if I choose any folder, it only imports 1 md file.

so a typical file path would be obsidian/myworld/ inside there 1.md 2.md 3.md

It then only import 1.md even if i choose the myworld folder. So basically as far as I can see non of them work, no matter how i structure the folders.

Any idea how to fix it? It used to work fine under version 9.x.x in foundry, so it seems this started to happen after I upgraded to version 10 +

Praxxian commented 1 year ago

@evenfell can you upgrade to Lava Flow 2.0.1 and let me know how it goes? v1.* is not compatible with v10.

sliverspell commented 1 year ago

@Praxxian worked like a charm, should have spotted that. Thanks anyway for your quick reply. :)

Praxxian commented 1 year ago

Gonna go ahead and close this. If anyone has any issues with v2, please open a new ticket. Thanks!