2.6.5 if(useJavaSaver) bug in Opera and Safari

167 views
Skip to first unread message

RonaldMulero

unread,
Nov 13, 2011, 11:28:56 PM11/13/11
to TiddlyWiki
Tiddlywiki 2.6.5 introduces a bug that affects Opera and Safari users:
Saving changes works, but only until the first time the browser is
refreshed. After that, the user will only get the warning:
"It's not possible to save changes. Possible reasons include:
- your browser doesn't support saving (Firefox, Internet Explorer,
Safari and Opera all work if properly configured)
- the pathname to your TiddlyWiki file contains illegal characters
- the TiddlyWiki HTML file has been moved or renamed"

The cause of this bug is at line 10144 of the source code for 2.6.5:
"<!--POST-SCRIPT-START-->" has been placed before the
"if(useJavaSaver)" script instead of after it (where it was in tw
2.6.4, which worked in Opera and Safari), so the entire
"if(useJavaSaver)" script gets overwritten after the first save by
whatever is in MarkupPostBody, which in a default tiddlywiki is
nothing.

A temporary workaround is to open the tiddlywiki in Firefox and create
a tiddler with the title MarkupPostBody and place the following script
in the tiddler's body:
<script type="text/javascript">
//<![CDATA[
if(useJavaSaver)
document.write("<applet style='position:absolute;left:-1px'
name='TiddlySaver' code='TiddlySaver.class' archive='TiddlySaver.jar'
width='1' height='1'></applet>");
//]]>
</script>

After saving the MarkupPostBody tiddler, the tiddlywiki can once again
be saved in Opera of Safari.

rakugo

unread,
Nov 14, 2011, 6:34:41 AM11/14/11
to TiddlyWiki
Hi Ronald thanks for the heads up.
I've sent a patch to fix this [1] but I must point out this wasn't
released.

The change that introduced this was done on a development version [2]
which happened after 2.6.5

[1] https://github.com/TiddlyWiki/tiddlywiki/pull/70
[2] https://github.com/TiddlyWiki/tiddlywiki/commit/9a26077a910354b3e0b768a99e8048702d09fa22

On Nov 14, 4:28 am, RonaldMulero <changethewo...@ronaldmulero.com>
wrote:

RonaldMulero

unread,
Nov 14, 2011, 4:44:26 PM11/14/11
to TiddlyWiki
Hi rakugo. Thanks for looking into this, but... I disagree. :)

The bug exists right now on the 2.6.5 released version at
tiddlywiki.com. I just downloaded another empty.zip (empty.html and
TiddlySaver.jar) from there to double-check it in Opera. Yep, failed
as expected: created a tiddler, saved it, refreshed the browser,
created a 2nd tiddler, but wasn't able to save that 2nd one. Same fail
in Safari. Creating a new MarkupPostBody tiddler in Firefox "fixed"
it.

I don't know which particular commit created that bug, I can only see
that in 2.6.4 "<!--POST-SCRIPT-START-->" comes after the
"if(useJavaSaver)" script and in 2.6.5 it comes before.

Either that wasn't the commit that created the bug or a dev version
sneaked onto tiddlywiki.com

On Nov 14, 6:34 am, rakugo <jdlrob...@gmail.com> wrote:
> Hi Ronald thanks for the heads up.
> I've sent a patch to fix this [1] but I must point out this wasn't
> released.
>
> The change that introduced this was done on a development version [2]
> which happened after 2.6.5
>
> [1]https://github.com/TiddlyWiki/tiddlywiki/pull/70
> [2]https://github.com/TiddlyWiki/tiddlywiki/commit/9a26077a910354b3e0b76...

rakugo

unread,
Nov 15, 2011, 2:51:22 AM11/15/11
to TiddlyWiki
Eeekk!
You are right. It seems the downloadable copy at tiddlywiki.com is not
2.6.5 released version and has somehow been overriden by the latest
dev copy. Thanks for letting me know.

I've opened http://groups.google.com/group/tiddlywikidev/browse_thread/thread/d4befc9fb7c6af6f
to get to the bottom of this.

On Nov 14, 9:44 pm, RonaldMulero <changethewo...@ronaldmulero.com>
wrote:
Reply all
Reply to author
Forward
0 new messages