Possible bug: Importing tiddlers with existing names causes unexpected data loss

138 views
Skip to first unread message

Diego Mesa

unread,
Dec 18, 2017, 5:40:32 PM12/18/17
to TiddlyWiki
Hello all,

I just now realized that importing does not warn about overwriting existing tiddlers with the same name! I feel this is a bug, but am not sure if this is the desired behavior. If it is, I will open an issue on GitHub asking for a warning to be shown. 

Steps to reproduce:
  1. Go to https://tiddlywiki.com/
  2. Drag and drop the attached tiddler to import
  3. Accept import

Desired Outcome:
  • The import tiddler warns you of the incoming tiddler with the same name and leaves that conflicting incoming tiddler unchecked, preventing accidental data loss. A user can still manually check it, acknowledging the warning. 

Actual Outcome:
  • The import tiddler shows no indication of a collision/existing tiddler. Upon accepting the import, the contents of the HelloThere tiddler are lost without warning. 

I came across this while trying to import around 100 tiddlers into my TW. These tiddlers were automatically generated using a modified bibtex importer in another playground TW for some papers I am working with. I realized after the fact, that I already had an entry in my actual TW for a paper, whose content I now lost.


Note: The attached tiddler is just a title of "HelloThere" and the content "modified":

[
   
{
       
"created": "20171218222709327",
       
"text": "modified",
       
"title": "HelloThere",
       
"tags": "",
       
"modified": "20171218222716073"
   
}
]

HelloThere.json

TonyM

unread,
Dec 18, 2017, 5:55:02 PM12/18/17
to TiddlyWiki
A Dump from my own notes=, using import, perhaps this will help.

$:/config/wikilabs/enableOverwriteCheck = no vs Yes

<$checkbox tiddler="$:/config/wikilabs/enableOverwriteCheck" field="text" checked="yes" unchecked="no" default="no"> Enable Overwrite Check</$checkbox>

By default, the import mechanism overwrites existing tiddlers. By enabling this option, you can activate a mechanism, that creates a new tiddler name. By default this option is off.

Tony 

Diego Mesa

unread,
Dec 18, 2017, 6:13:19 PM12/18/17
to TiddlyWiki
Sorry Tony,

Maybe I'm missing something, but is this just the code for the actual checkbox not the mechanism? 

Thanks!
Diego

TonyM

unread,
Dec 18, 2017, 7:01:14 PM12/18/17
to TiddlyWiki
Sorry,

My Mistake, I could not locate the option to select this, so I saved it. It comes with the Marios Tiddler Bundle Plugin


and has the side effect of letting you choose to overwrite or create new with duplicate tiddler names even when using the import facility.

Tony

Diego Mesa

unread,
Dec 18, 2017, 8:18:19 PM12/18/17
to TiddlyWiki
Thanks for bringing this to my attention Tony! 

Mario - would you consider contributing that overwrite detection to core?

Do you all think that this behavior is indeed a bug?

Best,
Diego

Jeremy Ruston

unread,
Dec 20, 2017, 1:02:35 PM12/20/17
to tiddl...@googlegroups.com
Hi Diego

Do you all think that this behavior is indeed a bug?

The present behaviour is what was implemented originally; it could be changed, but subject to backwards compatibility (in particular, the import mechanism is reused by the upgrade process so we’d need to make sure that that still works).

Best wishes

Jeremy

-- 
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/cd8aaf8b-0918-4e6a-99fa-573f743e0ede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Diego Mesa

unread,
Dec 20, 2017, 1:35:55 PM12/20/17
to TiddlyWiki
Hey Jeremy,

Thank you for your response. I am paranoid about things that cause someone to lose data without warning. I would suggest that the import wizard at least warn users of the collision! I think this (as is everything that causes unexpected data loss) is a high priority! 

Best,
Diego

PMario

unread,
Dec 20, 2017, 6:07:03 PM12/20/17
to TiddlyWiki
On Monday, December 18, 2017 at 11:40:32 PM UTC+1, Diego Mesa wrote:
Hello all,

I just now realized that importing does not warn about overwriting existing tiddlers with the same name! I feel this is a bug, but am not sure if this is the desired behavior. If it is, I will open an issue on GitHub asking for a warning to be shown. 

The "bundler-plugin" has a configuration option for the import mechanism. It extends the core with:

Enable Overwrite Check, that lets you define the import behaviour.

So for me this is plugin territory.

have fun!
mario 

Diego Mesa

unread,
Dec 20, 2017, 6:16:21 PM12/20/17
to TiddlyWiki
Thanks for that Mario - I will definitely be using that option. 

I respect everyone's opinion, I'd just like to say again that I strongly object to any and all methods of unwarned/unplanned data loss. 

Best,
Diego
Reply all
Reply to author
Forward
0 new messages