ShowLocalDirectory transclusion error question

41 views
Skip to first unread message

axelm

unread,
Nov 26, 2011, 3:01:16 PM11/26/11
to tiddl...@googlegroups.com
Hello Everybody,

My system: OSX with FireFox 7.0.1

I am using the "ShowLocalDirectory" transclusion and it works great for PDF files.
But, if I put a FireFox URL into the folder, I get this error when I try to open it from a tiddler:

        This XML file does not appear to have any style information associated with it. The document tree is shown below.
      <plist version="1.0"><dict><key>URL</key><string>http://finance.yahoo.com/</string></dict></plist>

It says in the "ShowLocalDirectory" instructions that I could use a URL:

list
show fully-qualified path/filenames, so that the local system-specific filename can be *displayed* while linking to a valid system-independent "file:" URL for browser navigation.

Anybody else have this problem? Or what am I doing wrong?

Any help will be appreciated,

axelm


Eric Shulman

unread,
Nov 26, 2011, 3:32:01 PM11/26/11
to TiddlyWiki
> I am using the "ShowLocalDirectory" transclusion and it works great for PDF
> files.
> But, if I put a FireFox URL into the folder, I get this error when I try to
> open it from a tiddler:

What is a "FireFox URL" and what do you mean by "into the folder".
ShowLocalDirectory simply accesses the local filesystem and lists the
files/folders it finds. It is for LOCAL file access (e.g. file:///.../),
*not* remote URLs (e.g. "http://...")

Please provide the EXACT syntax you are trying to use.

> It says in the "ShowLocalDirectory" instructions that I could use a URL:
>

> *list*


> show fully-qualified path/filenames, so that the local system-specific
> filename can be *displayed* while linking to a valid system-independent

> "file:" *URL for browser navigation*.

It does NOT say you can use a URL. It says that if you provide a
*local directory* and the "list" keyword, the script will *generate*
output that uses system-independent "file://" URLs. You *cannot* use
an http:// URL as input to the script. It is called
ShowLOCALDirectory... not ShowREMOTEDirectory.

-e

axelm

unread,
Nov 26, 2011, 3:53:16 PM11/26/11
to tiddl...@googlegroups.com
I have this in a tiddler:

<<tiddler ShowLocalDirectory with: /Users/axelm/Documents/TiddlyWiki/Misc list>>

This is local and it works. In the "Misc" folder, I usually put PDF files only.
In the tiddler it shows the list of PDF files and when I click on one, the PDF is opened properly.

Now, when I have a website open in firefox (lets say "http://news.yahoo.com/"), I can drag the URL by its Favicon to the "Misc" folder or the desktop for that matter. It then becomes a bookmark file with this name: "Yahoo! News.webloc".
When you doubleclick on that file, firefox opens a new tab and opens the website. That also works just fine.

In the tiddler, the file also shows up fine. When I click on it, firefox opens a new tab and this error shows up:


        This XML file does not appear to have any style information associated with it. The document tree is shown below.
      <plist version="1.0"><dict><key>URL</key><string>http://news.yahoo.com/</string></dict></plist>

axelm

Eric Shulman

unread,
Nov 26, 2011, 5:56:31 PM11/26/11
to TiddlyWiki
> Now, when I have a website open in firefox (lets say
> "http://news.yahoo.com/"), I can drag the URL by its Favicon to the "Misc"
> folder or the desktop for that matter. It then becomes a bookmark file with
> this name: "Yahoo! News.webloc".

That behavior (and the resulting file content) are *system-specific*.
Under Win7, dragging a favicon to a folder creates a ".URL" file (as
compared with your ".webloc" file).

> When you doubleclick on that file, firefox opens a new tab and opens the
> website. That also works just fine.

Same here.

> In the tiddler, the file also shows up fine. When I click on it, firefox
> opens a new tab and this error shows up:

Under Win7/Firefox, when you click on the .URL file from the
ShowLocalDirectory output, FireFox successfully opens the URL, as
expected.

I think the problem is that OSX creates an XML-bearing ".webloc" file
that FireFox doesn't know how to open *natively*. When you double-
click from the icon on your system, I'll bet that the system is doing
something to extract the URL from the file and launch the browser,
rather than just handing the file content directly to the browser.
Thus, it works when double-clicking, but not when linked from within
the browser.

Try this experiment: take your .webloc file, and drag-n-drop it onto
an empty Firefox window... what happens? Does it load the URL, or
give an XML error?

-e

axelm

unread,
Nov 26, 2011, 6:12:03 PM11/26/11
to tiddl...@googlegroups.com
>Try this experiment: take your .webloc file, and drag-n-drop it onto
>an empty Firefox window... what happens?  Does it load the URL, or
>give an XML error?

It loads the URL fine.

Then I tried this:
1) open new empty window
2) open the file from the "File - Open File..." menu
then the error shows up again.

axelm

Eric Shulman

unread,
Nov 26, 2011, 6:32:03 PM11/26/11
to TiddlyWiki
> >Try this experiment: take your .webloc file, and drag-n-drop it onto
> >an empty Firefox window... what happens?  Does it load the URL, or
> >give an XML error?
>
> It loads the URL fine.

Hmm... I'll bet that, just like when you double-click, the OSX drop
handler is doing some work to read the URL from the file and giving
that to FireFox when dropped, rather than just dropping the content
and letting FireFox handle it.

> Then I tried this:
> 1) open new empty window
> 2) open the file from the "File - Open File..." menu
> then the error shows up again.

Ah ha! This reinforces my previous assumption, that FireFox simply
doesn't know what to do with the OSX-generated .webloc XML file
content, so it is trying to display it "as is"

I wonder what the other browsers do?

-e

axelm

unread,
Nov 26, 2011, 6:50:54 PM11/26/11
to tiddl...@googlegroups.com
I tried in Safari and there it works both ways.
So you are right, Firefox doesn't know what to do with this file.

I couldn't try the "ShowLocalDirectory" transclusion, because in Safari it produces an error.

axelm

han...@gmail.com

unread,
Nov 26, 2011, 10:53:45 PM11/26/11
to tiddl...@googlegroups.com
> axelm <mied...@gmail.com> Nov 26 12:01PM -0800

>
> Hello Everybody,
>
> My system: OSX with FireFox 7.0.1
>
> I am using the "ShowLocalDirectory" transclusion and it works great for PDF
> files.
> But, if I put a FireFox URL into the folder, I get this error when I try to
> open it from a tiddler:
>
> This XML file does not appear to have any style information

A similar problem comes when upgrading to Windows 7 / IE 9. In older
versions of Win/IE, dragging and dropping a URL to say the desktop
used to create a standard .URL file that any browser would open.
However the new setup creates a file with a different extension (sorry
forget what it is ATM) that has more functionality for that platform,
but other browsers such as Chrome) just open it as a structured text
file (I think also XML?).

My workaround is to use Ctrl-click to select the favicon and then
dragging to the desktop - this creates the "old-school" .URL file.

There may be a similar workaround for your platform. . .

Reply all
Reply to author
Forward
0 new messages