Importing Tiddler Errors

33 views
Skip to first unread message

Chris Eichenberg

unread,
Feb 23, 2026, 2:30:21 PMFeb 23
to TiddlyWikiClassic
Has anyone has issues with importing exported tids? Having issues with importing tids, especially those from backstage export (SaveAs Plugin does not seem to cause issues). Home computer, so there shouldn't be any external security issues. Latest available version Tiddlywiki. Latest version available TiddlyDesktop. Tried opening it in browser and ran a copy as *.hta to see if it was TiddlyDesktop. nope same error.

the error is "TypeError: Cannot read properties of null (reading 'replace')". Anyone have any ideas what could cause this? 

I did try to create a relatively empty tid with SaveAs. I thought switching out the storedata. It sorta worked. It imported but not the storedata section. 

Franklin

unread,
Jun 7, 2026, 5:34:05 AM (4 days ago) Jun 7
to TiddlyWikiClassic
That `TypeError: Cannot read properties of null (reading 'replace')` is a classic TiddlyWiki .tid import bug. Happens when the importer hits a malformed/missing field in the tid file.

WHY IT HAPPENS
The error means TW code tried to do `something.replace()` but `something` was `null`. 

Main causes with Backstage export:
1. Empty/missing `title` field - Most common. If `title:` line is blank or missing, TW crashes on import.
2. Corrupted `text` field - Backstage export sometimes writes `text:` with no content + no newline after it.
3. Bad `created/modified` dates* - Non-standard date format makes TW parse `null`
4. Windows line endings + HTA* - Mixing `\r\n` and `\n` breaks the parser

SaveAs plugin works because it rebuilds the tid properly. Backstage export just dumps raw fields, so 1 bad tiddler kills the whole import.

FIX IT 3 WAYS, FROM FASTEST TO PROPER:*

1. QUICK FIX - Find the bad tiddler* [2 min]
Open the `.tid` file in Notepad++. Search for `title:` lines. 
Look for any tiddler where:
title:
text: some content
No title text after `title:` = that’s the crash. Delete that whole tiddler block or add a title like `title: Untitled`.

2. PROPER FIX - Use TW’s own exporter* 
Backstage export is buggy. Do this instead:
1. Open the wiki where the tiddlers are
2. Install `$:/plugins/tiddlywiki/filesystem` if you don’t have it
3. Go to `$:/AdvancedSearch` → tag the tiddlers → `Export` → `Export as .tid files`
4. Import those .tids instead

Export from AdvancedSearch never gives `null` fields.

3. BULK FIX - Clean with regex
If you have 100+ tids from Backstage:
1. Open tid file in VSCode/Notepad++
2. Find regex: `^title:\s\n`
3. Replace with: `title: Untitled-$$$\n` 
That adds a title to any blank one.

ABOUT YOUR STOREDATA TEST
You were right: swapping `storeData` sorta works because SaveAs forces a valid `title` field. But Backstage exports often skip `storeData` section or format it wrong, so TW imports tiddler but can’t read the content.

Rule for TiddlyWiki: `title` field can never be null/empty. Everything else TW can handle.

---

Try fix #1 first - 90% of the time it’s 1 empty title in 500 tiddlers. 

Paste the first 20 lines of the tid file here if you want. I’ll point to the exact line that’s breaking it.

What were you trying to import - single tiddlers or a whole wiki dump?

Reply all
Reply to author
Forward
0 new messages