Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Relative URLs

CD is converting ALL relative URLs to file:\\ - is there anyway to turn this really annoying behaviour off? Its breaking our mirror publishing badly.

Chad Z. Hower
Wednesday, November 27, 2002

That's not a CD behaviour.  Either you have a bad BASE HREF in your template, or you were using FrontPage or some other editor to edit your template or articles and it mangled your references.

Create a New article.  Right click on it, and copy magic name.
Then make a link to it in another article, and publish.  View source on the HTML that it published and you'll see the correct URL.

Michael H. Pryor
Wednesday, November 27, 2002

What is "copy magic name" do? I can't find it in the help files.


John Cesta
Thursday, November 28, 2002

Right click on a file name in CityDesk's main window, one of the options is "Copy magic name."

Thursday, November 28, 2002

I know...but what is it for? What is the purpose?


John Cesta
Thursday, November 28, 2002

It copies to the clipboard the "magic name" for an article or file, which you can paste directly in your HTML. The magic name is converted to the actual file name when the site is published.

If you have an article named "Blah" in the folder "Folder," and you copy its magic name, you get something like PTMFOG1234 in the clipboard. Now paste this into HTML like so:

<a href="PTMFOG1234">

When this is published it will be automatically converted to the actual name of the file as published:

<a href="Folder/Blah.html">

If Blah moves to a different folder, the magic name stays the same, but when you republish, the link moves. That's what makes it magic.

Joel Spolsky
Thursday, November 28, 2002

Out of interest, what does the PTM stand for in the magic names?

John Topley
Friday, November 29, 2002

Yes it is a CD problem. No I dont have any base HREFs. Try this.

We have several files that are NOT managed by CD - our downloads specifically because CD does not allow easy udpating of such and for other reasons.

So imagine my is at /downloads/ I publish to a site and mirrors, and thus a HREF="/downloads/" will find it as published on all mirrors. If I include the hostname, this defeats the purpose of mirrors.

I cannot use a magic name, because the file does not exist in CD.

Now do this. Create a new link, in the URL window enter:

Click ok. Now edit the link again. CD changes it to:


Please fix this.

Chad Z. Hower
Sunday, December 1, 2002

May be the default behavior of Internet Explorer is fooling you.

Suppose you have an article with the full url

A Citydesk href (expanded magic name) from a index.html in the same directory would be  like
<a href="art1.html">article 1</a>

However, Internet explorer will expand this in the status bar as

And for a local (preview copy) you can expect to see a file:// link.

Check HTML code to be sure of the link types used! There you can also check on BASE HREFs etc.

Adriaan van den Brand
Monday, December 2, 2002

No, its not IE.

Try what I said - I NEVER left CD and it can be demonstrated WHOLLY in CD. CD MODIFIES the URL.

Chad Z. Hower
Monday, December 2, 2002

Chad's right. Follow his steps and the bug is there.

It must be a bug with editing existing links as if you initially preview the page the URL is correct, but editing the link again breaks it.

I suppose the workaround is to get the link right first time!

John C
Monday, December 2, 2002

Yes, I've been able to reproduce the bug also.  Still, as John says, as long as you don't edit the link after you create it, the link seems to work OK.

Alex Chernavsky
Monday, December 2, 2002

Its still a very annoying bug.... Should be an easy fix. Please do so.

Chad Z. Hower
Tuesday, December 3, 2002

Chad, you're right. It is a nasty bug, although I've never bumped into it (I use the HTML view more often)

Adriaan van den Brand
Tuesday, December 3, 2002

*  Recent Topics

*  Fog Creek Home