TW5-TiddlyMap
TW5-TiddlyMap copied to clipboard
Error caused by freelinks plugin installed along with TiddlyMap
Hi Felix,
I have 2 wikis with TiddlyMap installed. After upgrading one of them to 5.1.22 I get the following Javascript error - 'NotFoundError: Node.insertBefore: Child to insert before is not a child of this node' which disappears if I disable the plug in.
I upgraded to the latest version of TiddlyMap (v0.17.4+9899) but the problem remains. I upgraded the other wiki in the same way as the first and that one is fine - no Javascript error.
Is there anything I can do to hunt down the problem?
Regards Jon
Hi @5rise
The JS line that causes this error is called when TiddlyMap Widgets gets rendered in a Tiddler and does not get a parent widget passed by TiddlyWiki where it can render itself into. Really not sure how this can happen, but did you for some reason add any <$tiddlymap>
or <$tmap-connections>
tags in any tiddler body yourself?
Hi felix,
No I didn't add any tags like that. Is there anything else I could check?
p.s. I also found that deleting all the views in the map didn't make any difference either
FWIW, I began with a fresh copy of TiddlyRoam, which runs off of TiddlyWiki 5.1.21. TiddlyMap worked fine. I upgraded the copy to TiddlyWiki 5.1.22 (in order to install the new Freelinks plugin) and it immediately broke TiddlyMap with the same error message above. I upgraded TiddlyMap to the latest version, but the error remains.
Thanks for the input - might point to a solution.
Hi @apkawel and @5rise Just FYI it seems to be related to the Freelinks plugin. Some (non technical) testing seems to consistently produce this error when selecting the map tab in the sidebar with the following configuration:
Tiddlywiki Core: 5.1.22 hotzone: 0.0.3 tiddlymap: 0.17.4+9899 topstoryview: 0.2.0 vis Freelinks: 5.1.22
Disabling Freelinks resolves the problem.
Hope this helps those with the skills chasing the bug down.
Cheers
Geoff.
Hi Geoff - you're quite right!
I didn't even know I had Freelinks installed but after disabling it and then re-freshing, there is no longer an error message when using the map. On enabling Freelinks again, the problem re-appears. My other wiki which wasn't affected, didn't have Freelinks so it looks like that is the culprit.
Thanks, Jon.
Thanks for investigating @gtothill, it sounds to me that this is caused by some "DOM manipulation" that "freelinks" is doing which affects the rendering tree of widgets, unfortunately this is nothing I can fix. Will leave this ticket open for a short while for future reference though.
This actually IS fixed now that all extraneous whitespace has been removed from TiddlyMap. What was happening is that Freelinks was manipulating the tiny bits of whitespace between elements (e.g. "\n "), and messing stuff up. If there is no whitespace, Freelinks does nothing. Problem solved!
However, this is only available in the latest versions of TiddlyMap, which aren't available through Tiddlymap.org. You need to get the bundle from github.