Keep losing my edit and add tiddler buttons - where to look?

59 views
Skip to first unread message

Cade Roux

unread,
Aug 27, 2019, 8:37:33 PM8/27/19
to TiddlyWiki
I have imported a lot of JSON tiddlers, sometimes with errors, and I think these must bash something.  Typically, it's something in the JSON that's not escaped properly - like \import instead of \\import (unexpected element i or something like that) or an embedded double quote in the JSON that's not escaped \".  Currently the JSON is clean and not giving any warnings or anything on the import.  (I'm running --verbose).

At the end of my build process, I use nodejs to init an empty TW, I load my template TW file (single html), I import the JSON of all the tiddlers about my database and build process and tests (which may overwrite many tiddlers that have updated data) and then build a single file (which then become my future template).  As I add manual tiddlers to this, the manual tiddlers of it expand in scope while the regenerated parts just keep getting overwritten and expanding themselves.  The process seems to work pretty well over the last couple weeks.

But at some point the edit and add buttons are lost.

I can add or edit a tiddler in many ways, like using the dropdown on an existing tiddler and new here or edit.

But I have lost the pencil on tiddlers and the + by the controls toolbar.

Occasionally it comes back - presumably when whatever is breaking those tiddlers isn't interfering.

I'm probably going to go ahead and start with a blank TW again so my template is a little cleaner, but I expect this issue will return.

Any ideas as to what causes this?

Thanks,

Cade

TonyM

unread,
Aug 28, 2019, 6:56:19 AM8/28/19
to TiddlyWiki
Case

Is it easy to determin the difference between your database tiddlers and the others in your import? I would imagine such problems could come about if you overwrite a system tiddler or display or use styles or css. Are there tiddlers that once closed or you remove a system tag the problem goes away?

When you create a json are you only exporting what you need or are you including others?

just some possible approaches.

Tony

@TiddlyTweeter

unread,
Aug 28, 2019, 7:19:28 AM8/28/19
to TiddlyWiki
Cade Roux wrote:

I have imported a lot of JSON tiddlers, sometimes with errors, and I think these must bash something.  Typically, it's something in the JSON that's not escaped properly.

Doesn't this answer your own question?

I never seen a TiddlyWiki JSON EXPORT ever fail on IMPORT.

So are you talking about TiddlyWiki created JSON? OR something else?

TT

Cade Roux

unread,
Aug 28, 2019, 10:34:51 AM8/28/19
to TiddlyWiki
It's not supposed to contain any system tiddlers.  It is generated from my build process/database schema/testing results.  But some are containing macros now, and of course, I occasionally find problems where things aren't escaped out or a stray line feed makes it through escaping.

It's just an array of tiddlers of the form:

{
        "title" : "dbo Schema"
        ,"text" : "Module: \n<br />Description: \n<br />Tables:\n\n* [[dbo.Numbers Table]]\n"
        ,"tags" : "schema text-source.auto"
        ,"type" : "text/vnd.tiddlywiki"
    },{
        "title" : "Doc Schema"
        ,"text" : "Module: \n<br />Description: \n<br />Tables:\n\n"
        ,"tags" : "schema text-source.auto"
        ,"type" : "text/vnd.tiddlywiki"
    },{
        "title" : "ETL Schema"
        ,"text" : "Module: \n<br />Description: \n<br />Tables:\n\n"
        ,"tags" : "schema text-source.auto"
        ,"type" : "text/vnd.tiddlywiki"
    }

Cade

Cade Roux

unread,
Aug 28, 2019, 10:45:18 AM8/28/19
to TiddlyWiki
It's generated JSON.

When you get a JSON error on the command-line, it just gives a JSON error at a character in the JSON file, but it's not clear how to see what this affects in TW.  It does make a .tid file with the error in the name in the tiddlers folder.  I fix the problem, delete that tiddler and re-run the import without any error.

I'm going to try to experiment with increasing subsets of the import.

Thanks,

Cade

@TiddlyTweeter

unread,
Aug 28, 2019, 10:48:18 AM8/28/19
to TiddlyWiki
Its then a serious issue of real substance. I can't replicate it on TW stand alone so can't help.

TT

Cade Roux

unread,
Aug 28, 2019, 11:59:46 AM8/28/19
to TiddlyWiki
OK, I have replicated the issue.  It has nothing to do with the JSON imports or the occasional errors in the JSON.  It is due to the tiddlywiki/tiddlyweb plugin in my tiddlywiki.info file.

This script replicates the issue (empty.html is the clean TW dowloaded) as simply as I can without any JSON imports - just an init, load and build:

$tests = ( "good", "bad" )

foreach ($test in $tests) {
Remove-Item -Path ".\twtest" -Force -Recurse -ErrorAction "Ignore" # purge wikifolder completely
& tiddlywiki twtest --verbose --init
Copy-Item ".\tiddlywiki.$($test).info" -Destination .\twtest\tiddlywiki.info -Force # Needed to enabled the filesystem plugin, otherwise the load can't save the tiddlers anywhere
# Bring in base template to the nodejs TW
& tiddlywiki twtest --verbose --load empty.html
# Build the single file TW
& tiddlywiki twtest --verbose --build
# Copy the output for comparison
Copy-Item ".\twtest\output\index.html" -Destination ".\$test.html" -Force
}


The only difference between the good and bad .info files is the tiddlyweb plugin (which it looks like I don't need for this).

I can't say if this is a bug or what.  When I was initially trying to get node to import the JSON, it was saying it was importing but there was nothing in the folder, and the exports were empty too.  That's when I added the plugins.

Hopefully that helps determine if anything needs to change or what.

Thanks,

Cade
tiddlywiki.bad.info
tiddlywiki.good.info
Reply all
Reply to author
Forward
0 new messages