Problem with TiddlerEncryptionPlugin and DataTiddlerPlugin

137 views
Skip to first unread message

Kriss

unread,
May 8, 2012, 6:28:56 AM5/8/12
to tiddl...@googlegroups.com
Hello,

I have a wiki that I use already for some time with bookmarks, serialnumbers, passwords and the like. It uses the DataTiddlerPlugin and FETmacro and everything works fine.
Now I have installed the TiddlerEncryptionPlugin and that too seems to work fine.

However, when I decrypt a tiddler, the <<showData>> makro is no longer displayed correctly.

After decryption, it only shows the tableheader, but not the contents of the table. The rest of the contents of the tiddler is displayed correctly.
When I look at the contents of the tiddler in edit-mode everything is there, including the <data>...</data>.

When I exit edit-mode using "cancel", the table-contents remains hidden, but when I exit edit-mode using "done" or ctrl+enter, the table-contents is displayed correctly again...

Tiddlers with the showData-macro but not marked for encryption display just fine.

What is going wrong? Anyone an idea?

I use:
wiki v2.6.2
TiddlerEncryptionPlugin v3.2.1
DataTiddlerPlugin v1.0.6   (tested v1.0.7 as well and got same issue)
Firefox 11 and firefox portable 10  (also tested on IE6 :-)

Thank you for your help.
K

PMario

unread,
May 8, 2012, 3:32:44 PM5/8/12
to TiddlyWiki
On May 8, 12:28 pm, Kriss <bipah...@gmail.com> wrote:
> However, when I decrypt a tiddler, the <<showData>> makro is no longer
> displayed correctly.
The data tiddler plugin (DTP) hijacks some core functions at a very
low level, to get it's stuff done. If a tiddler containing some <data>
is programmatically changed by any other plugin, DTP seems to remove
cached data from memory.

> After decryption, it only shows the tableheader, but not the contents of
> the table. The rest of the contents of the tiddler is displayed correctly.
> When I look at the contents of the tiddler in edit-mode everything is
> there, including the <data>...</data>.
>
> When I exit edit-mode using "cancel", the table-contents remains hidden,
> but when I exit edit-mode using "done" or ctrl+enter, the table-contents is
> displayed correctly again...
"done" or "ctrl+enter" seems to rebuild the data in memory. So it is
available for <<showData>>. "Cancel" doesn't.

Is the data stuff displayed, if you close the tiddler and reopen it?

-m

Kris Meyssen

unread,
May 9, 2012, 8:43:23 AM5/9/12
to tiddl...@googlegroups.com
Yes, in the case where I close the tiddler and reopen it, the table is displayed correctly again and functions as normal.



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.


PMario

unread,
May 9, 2012, 12:46:19 PM5/9/12
to TiddlyWiki
On May 9, 2:43 pm, Kris Meyssen <i...@virtualdreams.eu> wrote:
> Yes, in the case where I close the tiddler and reopen it, the table is
> displayed correctly again and functions as normal.
OK. That's what I expected.

You should contact abegio software and point them to this thread.
There should be enough info, to get things fixed ...

Since there have been some updates lately, they still do care.

have fun!
mario

Lyall

unread,
May 9, 2012, 8:50:59 PM5/9/12
to tiddl...@googlegroups.com
Let me know if you think it's a problem with TiddlerEncryptionPlugin.
Is there a method I should invoke after programatically changing a tiddler contents?
If so, let me know and I can update the TiddlerEncryptionPlugin.

I must, however, admit I have not really looked at this for quite some time, and TiddlyWiki seems to have moved forwards significantly since this macro was written.

...Lyall

PMario

unread,
May 10, 2012, 8:18:56 AM5/10/12
to TiddlyWiki
Hi Lyall,

I did have a short look at your plugin, prior to my second post. After
decrypting you call story.refreshAllTiddlers(); which should be
enough.

DTP hooks into the core Tiddler.prototype.changed() function to remove
the .data object from an open tiddler, if any other plugin changes the
tiddler.text.

Since decrypting does change the tiddler.text the cached data object
is removed.

I think, <<showData>> needs to check, if the data object is there. If
not, it needs to rebuild it. IMO that is the problem at the moment.

DataTiddlerPlugin probably is one of the best (insource) documented
plugins I've seen. But I'm not 100% sure. So I think Udo (abegio SW)
should have a closer look ;)

-m

Udo Borkowski

unread,
May 10, 2012, 5:28:26 PM5/10/12
to tiddl...@googlegroups.com
Hi Kriss,

could you give me with a complete TiddlyWiki with the plugins installed and a "step-by-step" description so I can reproduce the problem?

I never used the TiddlerEncryptionPlugin before and when I tried it now I could encrypt tiddlers but never saw the "Decrypt" button next to the "edit" button (as explained in the documentation). So I probably missed something. The "Decrypt All" worked but this does not seem to refresh the tiddlers.

Udo

P.S.: you can send the (zipped) TiddlyWiki to the email given in http://tiddlywiki.abego-software.de/#Contact.



K

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/nPrAwY-K0f8J.

Lyall

unread,
May 10, 2012, 10:05:43 PM5/10/12
to tiddl...@googlegroups.com
The decrypt button will only appear if you have the default ToolbarCommands shadow tiddler.
I assume that if you have a non-shadow version of this tiddler, that you have custom buttons and I did not want to interfere by fiddling with your customisations.
In this case, you will need to manually edit your non-shadow ToolbarCommands tiddler to include the DecryptThis button.


...Lyall

Kris Meyssen

unread,
May 11, 2012, 5:16:11 AM5/11/12
to tiddl...@googlegroups.com
Udo,

I tried to make a new tiddlywiki (1) and reproduce the issue. Unfortunally after I installed all the different relevant plugins, I still can not reproduce the problem. So I switched back to original file (2) and disabled all plugins via the backstage. By re-enabling them one by one I found that the ForEachTiddlerPlugin is related to the problem. When I disable this in the original file (with all the other plugins enabled), the table is drawn correctly, when I enable it again the table disappears. However, I don't use the FET-macro in the datatiddler or anywhere visibly on the screen... ?!

I tried to put the FET plugin and FET makro in the new file (1), but this does not reproduce the problem.
Could the problem be somewhere in one of the FET-implementations I use in other tiddlers??
I suppose these makros are not run when they are not displayed on the screen, so they should not be of influence, right ?

What else can I test or should I provide to figure this one out?

K

Udo Borkowski

unread,
May 15, 2012, 5:21:11 PM5/15/12
to tiddl...@googlegroups.com
Kriss, 

Could the problem be somewhere in one of the FET-implementations I use in other tiddlers??
I suppose these makros are not run when they are not displayed on the screen, so they should not be of influence, right ?

Right, the FET macros only have an effect when displayed/rendered.


What else can I test or should I provide to figure this one out?

This all sounds very strange.

As you cannot reproduce the problem with a new TiddlyWiki, maybe you could copy the "buggy" one and remove all confidential tiddlers? If this still produces the error you could send me the copied TiddlyWiki and I will have a look. If the bug disappears after you removed some tiddlers maybe you can get an idea what is special about the one that "fixed/caused" the problem...

Udo

K
To unsubscribe from this group, send email to tiddlywiki+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+unsubscribe@googlegroups.com.

Udo Borkowski

unread,
May 16, 2012, 5:38:48 PM5/16/12
to tiddl...@googlegroups.com
Kriss sent me the "buggy" TiddlyWiki and I could track down the problem.

It looks like the problem is caused by the way the TiddlerEncryptionPlugin changes the tiddler text after decryption.

In the function CheckTiddlerForDecryption_TiddlerEncryptionPlugin(tiddler) the text of the tiddler is changed to the decrypted text using this code:

tiddler.text = decryptedText;

This "silent" change to the text is not noticed by the DataTiddlerPlugin (and possibly other code that is interested in changes to a tiddler).

To notify other code (like DataTiddlerPlugin) about this change one should add a line like this:

tiddler.changed();  // notify others about the tiddler change

in the CheckTiddlerForDecryption_TiddlerEncryptionPlugin.

With this extra line the DataTiddlerPlugin will now display the data of "decrypted" tiddlers properly.

Lyall Pearce: If you read this, here the function's code with my changes: https://gist.github.com/2714083  


Udo

Lyall

unread,
May 17, 2012, 12:51:06 AM5/17/12
to tiddl...@googlegroups.com
I have been watching this thread. I will release an update for the TiddlerEncryptionPlugin, hopefully, within the next 48 hours.

Thanks very much for identifying this issue.

...Lyall


Kriss

unread,
May 17, 2012, 5:45:45 AM5/17/12
to tiddl...@googlegroups.com
Just added this one line and now it works like a charm  :-D *-) )

Thank you all so much for your help and support !!

Kriss

Lyall

unread,
May 17, 2012, 9:14:16 AM5/17/12
to tiddl...@googlegroups.com
Updated TiddlerEncryptionPlugin at http://www.remotely-helpful.com/TiddlyWiki/TiddlerEncryptionPlugin.html

Minor version bump.

If you check the code, you will find I had to insert the change in two places, rather than one. :)

...Lyall

Reply all
Reply to author
Forward
0 new messages