How to: Edit Tiddlywiki html files directly now with JSON store - to fix wiki load issues

Folks,

Every now and then I make an error in a wiki that causes an infinite loop “InternalError: too much recursion” or causes a JAVA script error that disables the wiki.

In this case it is possible to edit the html file directly such as with Notepad++, I have being doing this occasionally for years, however now tiddlers have moved into the script tag as JSON I have finding it difficult to edit.

Snag_538129b

Any suggestions how to navigate the file and edit a tiddler, or in this case I expect editing the list field of the $:/StoryList tiddler will help me load the wiki without the error.

unfortunately the $:/StoryList tiddler is referenced in many places.

I found the solution and document here;

For example it would appear searching for

“title”:"$:/StoryList"

would find the tiddler, then editing list to blank it.

“list”:""

I also changed

“title”:"$:/DefaultTiddlers",“text”:“Home [list[$:/StoryList]]”

to

“title”:"$:/DefaultTiddlers",“text”:""

Now the wiki is loading;

Note, if you know a tiddler title, rather than open it then edit it, because the opening step will re-trigger the error again we want to edit it directly. Thy this replacing the tiddlername;

{{tiddlername||$:/core/ui/Buttons/edit}}

To get a button to edit directly.

I have a sidebar tab that lists recent tiddlers and system tiddlers with an edit button to do this automatically.

You should petition for those changes to be added to https://tiddlywiki.com/#SafeMode

Perhaps but I have stayed away from safe mode when I was unable to reverse it once upon a time :upside_down_face:

Tony, if that odd occurrence was more than a few releases ago, you should really let go of that – it’s just old baggage you’re carrying around.

Besides, try it on a copy first. Can’t be any worse, right?

But yes, you’re right, the json store is easier to tinker with (if it’s not encrypted).

I am happy to “let it go”, in fact this instance is the trigger to revisit the use of safe mode.

In the past there were a few types of error that safe mode did not address,

I note the caution

Safe mode should only be used with the single file configuration of TiddlyWiki, and then only with savers that do not autosave.

Since as as rule my local single file wikis autosave, then it appears there is a small number of cases where this is valid.

Also

  • There is not indication how to reverse;
    • "Any tiddlers that override shadow tiddlers are renamed to give them the prefix SAFE: "
  • If its my coding and not the introduction or editing of a plugin, safe mode seems simultaneously like overkill and unlikely to fix my problem.

Perhaps we need to document or create some other wiki failure methods eg;

Change address bar to https://tiddlywiki.com/#notexisting and reload (So no default tiddlers loaded) especially when [list[$:/StoryList]] is used.

And/Or make use of my edit-recent sidebar tabs;
edit-recent.json (1.9 KB)

Or my simple history-sidebar.json (536 Bytes) to find the last tiddler.

1 Like