Anyone else having trouble loading browser-storage in node.js?

I’m trying to run the browser-storage plugin the “proper” way, from the tiddlywiki.info file. Unfortunately, after rebooting, the browser-storage plugin doesn’t show up in the list. There are no error messages on the node.js command line. To make sure I knew what I was doing, I added some other official plugin, bibtex, and it loaded fine. I also verified that the browser-storage components were available inside the node.js system.

I had previously run browser-storage the “wrong” way – by dragging and dropping. But I deleted that instance both from tiddlywiki and from the tiddlers directory.

I also have btheado’s brower-storage plugin by drag-and-drop, but it is currently disabled.

I’m wondering if anyone else has tried running it from node.js via tiddlywiki.info.

I’m one version back : 5.3.0

Hi @Mark_S the most likely cause sounds like overridden shadow tiddlers, but I imagine you’ll have already checked for those.

For what it’s worth, there is an example of the browser-storage plugin being installed here:

As always backup - backup - … first :wink:

As Jeremy wrote you should check for overwritten shadows: AdvancedSearch → Filter → [is[tiddler]is[shadow]!sort[modified]]

I would remove this one - just to be sure.

See lists below. Just to be clear, the plugin isn’t showing up at all.

Deleting btheado’s brower storage plugin didn’t change anything.

Thanks!

Plugin config

 "plugins": [
        "tiddlywiki/tiddlyweb",
        "tiddlywiki/filesystem",
        "tiddlywiki/markdown",
	"tiddlywiki/browser-storage",
	"tiddlywiki/bibtex"

Over-ridden shadows:

$:/temp/advancedsearch 
$:/core/ui/EditTemplate/body/editor
$:/tags/ViewTemplateBodyFilter 
$:/config/AutoSave 
$:/SiteSubtitle 
$:/SiteTitle 
$:/themes/tiddlywiki/vanilla/metrics/bodylineheight 
$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize 
$:/core/ui/EditorToolbar/StampDropdown/ItemTemplate 
$:/DefaultTiddlers 
$:/palette 
$:/config/sq/SaveAsExternalFile 
$:/core/ui/EditorToolbar/picture 
$:/core/ui/EditorToolbar/picture-dropdown 
$:/core/templates/canonical-uri-external-image 
$:/config/ViewToolbarButtons/Visibility/
$:/core/ui/Buttons/delete

if you don’t get “Warning: cannot find plugin…” in the console then looking at TW’s code there are only two possibilities:

  1. The plugin gets loaded correctly (in that it is parsed and stored as a packaged JSON tiddler)
  2. The plugin is not even attempted to be loaded.

#2 can be ruled out if you modify node_modules/tiddlywiki/boot/boot.js (not so simple if TW is installed globally), function $tw.loadPlugin = ... and just add console.log(name) at the start, then restart the node process. See if the plugin is printed in the console. This won’t solve the problem but at least will narrow the possibility space a little.

Make sure to undo the change afterwards!

// here is how the function should look after modifications
$tw.loadPlugin = function(name,paths) {
	console.log(name); // This line was added, in 5.3.0 it should be #2146
	var pluginPath = $tw.findLibraryItem(name,paths);
	if(pluginPath) {
		var pluginFields = $tw.loadPluginFolder(pluginPath);
		if(pluginFields) {
			$tw.wiki.addTiddler(pluginFields);
			return;
		}
	}
	console.log("Warning: Cannot find plugin '" + name + "'");
};

For what it’s worth, I tried modifying tiddlywiki.info in my plugin showcase project and run it on 5.3.0 so it’s unlikely to be something specific to that TW version. (I also added bibtext and markdown plugins for better match with your environment)

Another possible weird edge case I no longer remember what I wanted to type here D:

1 Like

I’m sure it’s something I did wrong. Maybe by loading the plugin initially by hand (drag/drop) and then deleting.

The console shows the plugin being asked to be loaded (per your edit), but no warning message about a missing plugin. Yet the plugin doesn’t show up in the plugin list.

tiddlywiki/tiddlyweb
tiddlywiki/filesystem
tiddlywiki/markdown
tiddlywiki/browser-storage
tiddlywiki/bibtex
tiddlywiki/vanilla
tiddlywiki/snowwhite