TiddlyWiki.org

Ticket #189 (new defect)

Opened 2 years ago

Last modified 3 months ago

ImportTiddlers is broken on some browsers

Reported by: BobMcElrath Assigned to:
Priority: minor Milestone: 2.5
Component: core Version:
Severity: critical Keywords:
Cc:

Description

Firefox 1.5.0.7

1. importing a file:// into a file:// works

2. importing a http:// into a file:// fails

        Permission denied to call method XMLHttpRequest.open

3. importing a http:// into a http:// fails

        Permission denied to call method XMLHttpRequest.open

succeeds if both http:// url's are on the same server

4. importing a file:// into a http:// fails

        Error in send [Exception... "Component returned failure code:
        0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]"
        nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS
        frame :: http://bob.mcelrath.org/empty-2.1.0.html :: anonymous ::
        line 0" data: no]

Mozilla 1.7.13

1. importing a file:// into a file:// fails

        The original file
        file:///tmp/index.html?nocache=0.39423945284925 does not appear
        to be a valid TiddlyWiki file.

2. importing a http:// into a file:// fails

        The original file
        http://www.tiddlywiki.com?nocache=0.39423945284925 does not appear
        to be a valid TiddlyWiki file.

config.macros.importTiddlers.onLoad gets called after the first couple of PACKETS have been received, so the entire document is not available, and import fails. This might be the reason for the same error above.

3. importing a http:// into a http:// fails

        Permission denied to call method XMLHttpRequest.open

succeeds if both http:// url's are on the same server

4. importing a file:// into a http:// fails

        Error in send [Exception... "Component returned failure code:
        0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]"
        nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS
        frame :: http://bob.mcelrath.org/empty-2.1.0.html :: anonymous ::
        line 4960" data: no]

Konqueror 3.5.3

1. importing a file:// into a file:// fails (silently)

2. importing a http:// into a file:// fails (silently)

3. importing a http:// into a http:// fails (silently)

if both url's are on the same server, konqueror displays a blank white screen and no error.

4. importing a file:// into a http:// fails (silently)

Opera 9.01

1. importing a file:// into a file:// fails (silently)

2. importing a http:// into a file:// fails (silently)

3. importing a http:// into a http:// fails

        Error in send [Error:
        name: Error message:
        Security violation
        ]

4. importing a file:// into a http:// fails

        Error in send [Error:
        name: Error message:
        Security violation
        ]

When I say "silently" above, I mean that TW displays the message "Please wait while the file is loaded from: "... but nothing happens after that.

This is all with vanilla 2.1.0.

Change History

04/10/06 17:41:02 changed by BobMcElrath

Firefox # 2 (importing a http:// into a file://) should be "works". Darn firebug.

06/10/06 17:01:33 changed by JeremyRuston

  • summary changed from ImportTiddlers is completely broken on most browsers to ImportTiddlers is broken on some browsers.
  • milestone changed from 2.1 to 2.2.

11/10/06 20:18:00 changed by JeremyRuston

  • priority changed from critical to minor.

05/02/07 17:02:10 changed by MartinBudden

  • milestone changed from 2.2 to 2.3.

01/06/07 19:59:45 changed by cawoodm

Here is my fix so that an import works. Basically I don't understand why we are trying to use XHR for a file operation. FileAdaptor?.prototype.openHost = function(host,context,userParams,callback) {

this.host = host; if(!context)

context = {};

context.adaptor = this; context.callback = callback; context.userParams = userParams; var str = loadFile(host.replace(/file:\/\//,),FileAdaptor?.openHostCallback,context); if (str)

FileAdaptor?.openHostCallback(true,context,str,host,null)

else

return "Error loading file " + host;

return true;

};

29/11/07 16:31:47 changed by MartinBudden

  • milestone set to 2.3.1.

29/01/08 14:22:43 changed by MartinBudden

  • owner deleted.

01/04/08 15:59:25 changed by MartinBudden

  • milestone changed from 2.3.1 to 2.4.

14/04/08 10:00:57 changed by MartinBudden

  • milestone changed from 2.4 to 2.5.