[TW5] undeletable tiddlers on node.js

132 views
Skip to first unread message

mauloop

unread,
Oct 31, 2017, 1:36:21 PM10/31/17
to TiddlyWiki
This could be a little TW5 node.js backend bug.

On a TW running on node.js create a tiddler with like this:
tags: 
title: You will never kill my children
type: text/vnd.tiddlywiki

<$button>Make new ghost child
<$action-setfield $tiddler=<<now """ghost-child YYYY-0MM-0DD 0hh:0mm:0ss""">> tags={{!!title}}/>
</$button>

<$list filter="""[tag{!!title}]"""/>

I used the wrong action widget, I know. I realized it later. <$action-listops> with $tags attribute, is the better choice. Anyway I did it wrong.

This is an example of the tiddler created if I click the button:
created: 20171031165714381
modified: 20171031165715512
revision: 1
tags: You will never kill my children
title: ghost-child 2017-10-31 17:57:14
type: text/vnd.tiddlywiki

Since the tags are wrong I would delete it, but I can't (unless I restart node.js). If I try to delete the tiddler it reappears at the top of the "Recent" tab after few seconds.

If I have a look at the filesystem I see that the tiddler file has never been removed

Looking at the node.js messages...

This is when I clicked the button (I did grep the lines containing the string "ghost"):
[2017-10-31T17:57:15.516+-100] PUT     204 127.0.0.1 /twlab/twnode/recipes/default/tiddlers/ghost-child%202017-10-31%2017%3A57%3A14 6.845 ms - -
syncer-server-filesystem: Dispatching 'save' task: ghost-child 2017-10-31 17:57:14
For ghost-child 2017-10-31 17:57:14, type is application/x-tiddler hasMetaFile is false filepath is O:\Dropbox\lab\tw\twlab\twnode\tiddlers\ghost-child 2017-10-31 17_57_14.tid
FileSystem: Saved file O:\Dropbox\lab\tw\twlab\twnode\tiddlers\ghost-child 2017-10-31 17_57_14.tid
syncer-server-filesystem: Dispatching 'load' task: ghost-child 2017-10-31 17:57:14

This is when opened the tiddler to view it:
[2017-10-31T17:57:58.789+-100] GET     200 127.0.0.1 /twlab/twnode/recipes/default/tiddlers/ghost-child%202017-10-31%2017%3A57%3A14 3.830 ms - -

No messages appears if I delete it (I expected a "Dispatching 'delete' task".)

Obviuosly this affects only TW5 node.js. I tried with two different version of node.js (6.9.1 and 6.11.3).
TW version is 5.1.14.
I run it on Windows 10.

mauloop

unread,
Oct 31, 2017, 2:19:36 PM10/31/17
to TiddlyWiki
One more info.

I saw that closing the TW5 browser tab and opening a new one let me delete the ghost* tiddlers, without node.js restart. It still seems to be a buggy behaviour.

Mark S.

unread,
Oct 31, 2017, 2:23:08 PM10/31/17
to TiddlyWiki
Just out of curiosity, is it only the 'ghost' tiddlers? If you make some other tiddler like , 'DeleteMe' and delete it, does that work?

Good luck,
Mark

mauloop

unread,
Oct 31, 2017, 3:03:19 PM10/31/17
to TiddlyWiki
The tiddler name was just an example. It happens with every tiddler created with the "Make new ghost child" button. if I create one manually it has no problem.
The ones created with the button should be tagged [[You will never kill my children]], but the <$action-setfield> set the tags field to [[You]] [[will]] [[never]] [[kill]] [[my]] [[children]].

This is where I was wrong. I think that (in a way I can't explain) the node.js get confused when I create the "ghosts" with the button. Or maybe it's just me to get confused. ;^)))

Mark S.

unread,
Oct 31, 2017, 3:34:24 PM10/31/17
to TiddlyWiki
Maybe you should change the title to "You will never kill my tiddlers" ;-)

It doesn't delete (I think) because it thinks the tiddler is empty. If you add text=" " to your button macro, the tiddlers become deletable (my spell checker doesn't like that word). If you add text to the existing ghost children tiddlers, then you can delete them too.

Good ghost hunting,
Mark

mauloop

unread,
Oct 31, 2017, 5:05:46 PM10/31/17
to TiddlyWiki
You're right, but this make no sense for me.

I tested two different options:
  1. <$action-setfield $tiddler=<<now """ghost-child YYYY-0MM-0DD 0hh:0mm:0ss""">> tags={{!!title}} text="I will never die"/>
  2. <$action-listops $tiddler=<<now """ghost-child YYYY-0MM-0DD 0hh:0mm:0ss""">> $tags=[{!!title}]/>
The first one is the same of my first post, with a text added and, despite what text says, the tiddler has been regularly deleted
The second one uses the correct action widget to set tags, but has no text added. The generated tiddler has the same zombie behaviour that I described in the first post.

If I manually create a tiddler with no text, it could be deleted whenever I want. What is the difference? They actually disappears from the "Recent" tab when I delete them, but the .tid file is stiil there and they will be back as soon as node.js refresh the tiddler list

[2017-10-31T21:57:49.929+-100] GET     200 127.0.0.1 /twlab/twnode/recipes/default/tiddlers.json                 9.748 ms - -

Does not is text a field like anyone else? Why could it be sometimes empty and sometimes not? I'm getting convinced that this is really matter of ghosts.

mauloop

unread,
Nov 4, 2017, 8:50:32 PM11/4/17
to TiddlyWiki
Anyone else with an idea about this behaviour? Where was I wrong?
Unfortunately I am not able to set up a public node.js based demo, but it should be easy to reproduce.

Unless it affects just my wiki of course :^(((

Jed Carty

unread,
Nov 5, 2017, 4:19:27 AM11/5/17
to TiddlyWiki
I don't know the cause of it is this case but I have been running into times when deleting certain tiddlers on node the change isn't properly propagated back to the file system. I haven't been able to find anything consistent about what is happening they way that you have though.

So it may not be only your wiki but I haven't been able to consistently reproduce it and I have no idea how to fix it.

BJ

unread,
Nov 6, 2017, 5:08:11 AM11/6/17
to tiddl...@googlegroups.com

I can reproduce this. Also if I quickly delete the tiddler after creating it I don't get a ghost. if I wait I can see from the debug  "Dispatching 'load'" shortly after the tiddler is created. I put in some debug and can see that  the 'bag' info has been removed which stops the "Dispatching 'delete'".

So it seems to be a problem with calling for 'skinny tiddlers' - ie "Dispatching 'load'"(I don't know why this is beening called).
Reply all
Reply to author
Forward
0 new messages