Not respecting links
anthonydeaver opened this issue · 8 comments
Thanks for providing those screenshots! That helps a ton. Nothing seems wrong with those links just from looking at them.
I have to ask the obvious just in case: were the notes associated to those links imported as well? This could happen if you import a subfolder and it contains links that were not imported.
Side by Side in Foundry and Obsidian. I'm assuming the one in Foundry is/was the one in Obsidian. :)
Showing the obsidian versions in edit mode so you can see that the data in both files match. Also figured edit mode might show anything 'off'.
What I find really odd is in both pages, the link to the Eberron 'parent' page (the page under which all the imported files belong) is linked. But that's the only one.
Did you receive an "import complete" message? I am wondering if there is some underlying bug that stopped the link replacement from completing.
I did fix one bug. Could you please try upgrading the module to the latest version and seeing if you can still reproduce the issue?
Negative, same result. Even deleted that world and created a new one and reimported. Same pages, same results, no linkage.
Just saw you question about the "Import Complete" messaged so I created another world and imported again, this time with the debug console open. Sure enough, it threw an error in the console:
SyntaxError: Invalid regular expression: /\[\[(Calendar|Eberron/Modules/Eberron Campaign Setting (3)\]\]/: Unterminated group at new RegExp (<anonymous>) at MDFileInfo.getKeyRegex (lava-flow.js:313) at Function.updateLinks (lava-flow.js:210) at Function.importVault (lava-flow.js:77) at async LavaFlowConfig._updateObject (lava-flow.js:260) at async LavaFlowConfig._onSubmit (foundry.js:3822)
So I did some further digging. The files it's complaining about below is actually titled Eberron Campaign Setting (3.5). I renamed it, removing the (3.5) and everything imported without issue.
At first I thought it might not like the extra period in 3.5 so I renamed another file, adding an extra couple of periods but that also imported without issue. So I then renamed another file called Forgotten Forge to Forgotten Forge (3.5) and it failed again with the same error message as above, 'Unterminated group'
It doesn't like having a period (a.k.a. 'separator') inside the parens. I'm guessing that on line 309 in lava-flow.js, when you split on the separator for this filename it's returning Eberron Campaign Setting (3. as the fullKey which the regex freaks out about because of the open paren.
I can easily work around this by removing the '(3.5)'. I don't know if a lot of people will do things like this, but it's something to maybe think about in the future. At least for cases when someone else reports the issue :)
Anyway, great work!
My next suggestion was going to be to open the console, so thanks for anticipating!
Yeah I need to do some regex escaping. You shouldn't have to remove that stuff for it to work. I'll update when I have a fix for that, but glad to hear you have a workaround.
Release 1.0.3 resolves this issue. Thanks for your feedback!