Wiki on a Stick Official Forums

A personal wiki living in a self-modifying XHTML file

You are not logged in.

#1 31-10-2012 12:20:10

IAnjo
Experienced newbie
Registered: 24-03-2010
Posts: 13

Heads up: Firefox 17 breaks WoaS load/save

The latest Firefox from the beta channel seems to have disabled the read/write functionality that WoaS uses.

I've patched my personal version to use the java-based writing plugin as such:

Code:

diff --git a/wiki.htm b/wiki.htm
index b963496..371dede 100644
--- a/wiki.htm
+++ b/wiki.htm
@@ -403,6 +403,7 @@ woas.browser = {
        opera: false,
        safari: false,
        chrome: false,
+       modernff: false,

        // breeds - used internally, should not be used by external plugins
        ie6: false, ie8: false,
@@ -449,6 +450,9 @@ if((navigator.userAgent).indexOf("Opera")!=-1) {
                                        // possibly Firefox4
                                        woas.browser.firefox_new = true;
                        }
+                       if (parseFloat(woas.browser.gecko) >= 17.0) {
+                               woas.browser.modernff = true;
+                       }
        } // not Gecko
 } else if((navigator.appName).indexOf("Microsoft")!=-1) {
        woas.browser.ie8 = document.documentMode ? true : false;
@@ -489,7 +493,7 @@ var is_windows = (navigator.appVersion.toLowerCase().indexOf("windows")!=-1);
 woas._server_mode = (document.location.toString().match(/^file:\/\//) ? false:true);

 // set to true if we need Java-based file load/save
-woas.use_java_io = woas.browser.chrome || woas.browser.opera || woas.browser.safari;
+woas.use_java_io = woas.browser.chrome || woas.browser.opera || woas.browser.safari || woas.browser.modernff;

 // returns the DOM element object given its id - enables a try/catch mode when debugging
 if (woas.config.debug_mode) {

Hope this helps someone out there, and remember to ALWAYS USE THE LATEST VERSION OF THE JAVA PLUGIN, as there are many exploits in the wild for older versions.

Last edited by IAnjo (31-10-2012 12:27:38)

Offline

 

#2 27-11-2012 09:33:30

Hallo
Total newbie
From: Pforzheim - Germany
Registered: 10-06-2009
Posts: 6

Re: Heads up: Firefox 17 breaks WoaS load/save

So what can I do? This diff-file means nothing to me. Will there be a new version?
Or how can I pach my version?

Offline

 

#3 27-11-2012 10:43:20

IAnjo
Experienced newbie
Registered: 24-03-2010
Posts: 13

Re: Heads up: Firefox 17 breaks WoaS load/save

If you open up your copy of WoaS (don't forget to back up first!) with a text editor like Kate (http://kate-editor.org/) or Notepad++, you can apply it manually: new lines are those that show up with '+', and removed ones are those with '-'.

If it helps, I've taken the latest version of WoaS from sourceforge (0.12.0) and patched it: https://sites.google.com/site/knuckles/ … 7fixed.zip (edit: outdated version, see below for better one).

Last edited by IAnjo (04-12-2012 18:15:35)

Offline

 

#4 01-12-2012 09:07:05

mysheepb
Total newbie
From: Leuven, Belgium
Registered: 25-08-2011
Posts: 2

Re: Heads up: Firefox 17 breaks WoaS load/save

Thank you for the post. I have incorporated the changes to my WoaS but it doesn't seem to solve the problem on Mac OS X (10.8.2). I have the latest Firefox (17.0.1), and Java plug-in (Java 7 update 9). The problem may be related to Java, since it doesn't work on Safari either.

Offline

 

#5 01-12-2012 17:09:40

IAnjo
Experienced newbie
Registered: 24-03-2010
Posts: 13

Re: Heads up: Firefox 17 breaks WoaS load/save

You can check if you have the java plugin working correctly by going to
https://www.java.com/en/download/installed.jsp

Don't also forget that you need the TiddlySaver.jar file on the same directory as your wiki.

Offline

 

#6 03-12-2012 19:13:42

Ireng
Experienced newbie
Registered: 19-10-2012
Posts: 25

Re: Heads up: Firefox 17 breaks WoaS load/save

Many thanks for the patch and support!
I patched my WOAS sucessfully!
Regards, Ireng

Offline

 

#7 04-12-2012 14:07:56

Ireng
Experienced newbie
Registered: 19-10-2012
Posts: 25

Re: Heads up: Firefox 17 breaks WoaS load/save

In addition to the applied patch, I still have the problem, that I can't load any plugins.

Now the error message changed to:  'Cannot find the file', even though i navigate to the folder
containing the files, selecting one and pressing load!

Strange!

regards, Ireng

Offline

 

#8 04-12-2012 18:14:40

IAnjo
Experienced newbie
Registered: 24-03-2010
Posts: 13

Re: Heads up: Firefox 17 breaks WoaS load/save

You're right. I've looked it up and the issue seems to be that WoaS can't read the full path of the file, it only gets the file name.

It seems that this could already be a problem with other browsers, so the code needed was already there, I just enabled it for firefox too.

Patch:

Code:

--- woas-0.12.0-ff17fixed.html  2012-11-27 09:40:31.000000000 +0000
+++ woas-0.12.0-ff17fixed-r2.html       2012-12-04 17:09:09.000000000 +0000
@@ -13057,10 +13057,10 @@
 // not to be called for Mozilla-based browsers
 woas.get_input_file_url = function() {
        var r = false;
-       if (this.browser.opera || this.browser.webkit) {
+       if (this.browser.opera || this.browser.webkit || this.browser.modernff) {
                // ask user for path, since browser do not allow us to see where file really is
                r = d$("filename_").value;
-               r = prompt(this.i18n.ALT_BROWSER_INPUT.sprintf(this.basename(r)), this.ROOT_DIRECTORY);
+               r = prompt(this.i18n.ALT_BROWSER_INPUT.sprintf(this.basename(r)), this.ROOT_DIRECTORY + r);
                if ((r === null) || !r.length)
                        r = false;
                else

And already patched version: https://sites.google.com/site/knuckles/ … xed-r2.zip

This works for me, please test if it fixes your issue too.

Offline

 

#9 04-12-2012 19:05:34

Ireng
Experienced newbie
Registered: 19-10-2012
Posts: 25

Re: Heads up: Firefox 17 breaks WoaS load/save

Dear IAnjo,

thanks for your support. Your fix did not solved the issue!

Now i receive a message saying:

PLease specify full path to file blablabla because your browser does not allow such a path to be read directly for security reason  (FF17.0).
And in the message the full path to the file is shown!

Very Strange!

Regards, Ireng

PS: Unfortunately I cannot upload any screenshots!

Last edited by Ireng (04-12-2012 19:06:24)

Offline

 

#10 04-12-2012 19:18:32

IAnjo
Experienced newbie
Registered: 24-03-2010
Posts: 13

Re: Heads up: Firefox 17 breaks WoaS load/save

Ireng wrote:

Now i receive a message saying:

PLease specify full path to file blablabla because your browser does not allow such a path to be read directly for security reason  (FF17.0).
And in the message the full path to the file is shown!

Yes, that's on purpose. You need to check that the path is correct, and fix it, if necessary.
It's not as good as it was before, but I don't really have the time to research a full fix, if there is one -- I'm guessing that when the code for the message was created, possibly there was none.

Last edited by IAnjo (04-12-2012 19:18:49)

Offline

 

#11 04-12-2012 19:31:05

Ireng
Experienced newbie
Registered: 19-10-2012
Posts: 25

Re: Heads up: Firefox 17 breaks WoaS load/save

Thanks for your answer. It makes no sense to me to use woas anylonger, if i have to aplly daily fixes, which do not give a complete solution!!

Regards, Ireng

Last edited by Ireng (04-12-2012 19:32:12)

Offline

 

#12 14-12-2012 08:49:38

Hattori88
Total newbie
Registered: 24-10-2011
Posts: 3

Re: Heads up: Firefox 17 breaks WoaS load/save

@IAnjo Thank you, for me it works now with FF 17 and higher on Linux, at least in the modus all in one file. I am using Paul Leveys branch where the index.wsif is automatically split from the woas.html.

Have you tried this?

On line 26 one can configure to generate automatically the index.wsif.
<code>
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    3 <head>
    4 <meta woas_permanent="1" http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    5 <script woas_permanent="1" type="text/javascript">
    6 /* <![CDATA[ */
    7
    8 /* DFQRCTsKlU-0000214-START */
    9
   10 var woas = {"version": "0.12.0"};
   11
   12 var __marker = "DFQRCTsKlU-0000214";
   13
   14 woas["config"] = {
   15 "permit_edits":true,
   16 "dblclick_edit":false,
   17 "save_on_quit":false,
   18 "nav_history":false,
   19 "allow_diff":true,
   20 "key_cache":true,
   21 "cumulative_save":false,
   22 "safe_mode":false,
   23 "debug_mode":true,
   24 "main_page":'some main',
   25 "wsif_author":'John',
   26 "wsif_ds":'index.wsif',          <---------------------
</code>


Import works.

Last edited by Hattori88 (14-12-2012 08:50:28)

Offline

 

#13 26-12-2012 06:05:59

mysheepb
Total newbie
From: Leuven, Belgium
Registered: 25-08-2011
Posts: 2

Re: Heads up: Firefox 17 breaks WoaS load/save

Thank you @IAnjo and @Ireng, it is working now when I put TiddlySaver.jar to the same directory where I have my wiki file.

Offline

 

#14 21-01-2013 23:53:40

tingo
Total newbie
From: Oslo, Norway
Registered: 21-01-2013
Posts: 2

Re: Heads up: Firefox 17 breaks WoaS load/save

@IAnjo: this thread helped me fix a couple of WoaS wiki's that I had neglected for a long time.
Thank you - much appreciated.

BTW, how do I figure out which version of TiddlySaver.jar I have, and where do I get the newest version of it?

Last edited by tingo (22-01-2013 00:07:36)


Torfinn

Offline

 

#15 22-01-2013 15:50:39

IAnjo
Experienced newbie
Registered: 24-03-2010
Posts: 13

Re: Heads up: Firefox 17 breaks WoaS load/save

@tingo Excellent question. I just took the TiddlySaver.jar from the latest released version, but I think the original comes from http://tiddlywiki.com/ .

Unfortunately with all the java plugin snafu it currently is not recommended to use java until oracle releases a new update (>7_u11) . Let's hope they do it soon.

Offline

 

#16 22-01-2013 19:51:58

tingo
Total newbie
From: Oslo, Norway
Registered: 21-01-2013
Posts: 2

Re: Heads up: Firefox 17 breaks WoaS load/save

ah, then I'm good I think. Thank you.
WRT the current Java situation, I have my own security measures - the machine  with WoaS on isn't used for anything else Java-wise, it is screened, and it runs FreeBSD. I'll take my chances. smile


Torfinn

Offline

 

#17 16-04-2013 09:24:29

lucyming
Total newbie
Registered: 16-04-2013
Posts: 1

Re: Heads up: Firefox 17 breaks WoaS load/save

Hello, I'm new here

Offline

 

Board footer

Copyright © WoaS Project 2007~2010