Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Bug Report: Similar Directory Names

I've found a bug in the way CityDesk handles links between articles that have the same publish name, but are in different (but similarly named) directories. The steps to reproduce are:

1. Create a new CityDesk site.

2. Add a folder named 'up', and create an article named 'index (up)' within it.

3. Add a folder named 'update', and create an article named 'index (update)' within in.

4. Open up the 'index (update)' article, type 'up' <return> and 'update'. Link the word 'up' to the article 'index (up)', and link the word 'update' to the article 'index (update)'.

5. Publish or preview. Both words will actually be linked to the 'index (update)' article on the HTML page, but the article still shows them as linked to different articles.

In order to work around this bug, I had to rename my folders so that one name wasn't a subword of the other - e.g. by changing the directory 'up' to 'upload'.

Darren Collins
Monday, March 03, 2003

Wow... Wierd.

Now explain to me how this happened.

I followed your steps & then copied the source into 'index (up)'

This source code:
====
PTMFOG0000000017<br>
PTMFOG0000000016
====

turned into this:
====
index.html
ate/index.html
====

ate/index.html? as in ../update/index.html that's 6 characters that got gobbled up by CityDesk. Probably the same six that got gobbled up to turn ../up/index.html into just index.html

www.marktaw.com
Monday, March 03, 2003

Wow, I don't even know where to begin my wild speculation about the cause of this error!

Darren Collins
Monday, March 03, 2003

This is a bug where some of the code that compares directory names is a little bit stupid. :)

I've fixed it & you'll see the fix in the next version.

Joel Spolsky
Monday, March 03, 2003

I've been playing around with similar scenarios and it seems only when I do exactly what Darren said does it happen...

www.marktaw.com
Monday, March 03, 2003

oh... it's a bug where something's stupid. makes perfect sense. =)

www.marktaw.com
Monday, March 03, 2003

The code that replaces PTMFOG links with actual links compares two strings but does not check that they are the same length, so if one is a substring of the other it gets mixed up.

Joel Spolsky
Monday, March 03, 2003

I'm only teasing you... I actually didn't mind the "it's something stupid" explanation. It's rare when the head of a company comes out and says there's some stupid code in their product.

www.marktaw.com
Monday, March 03, 2003

I just had to smile when I read, "I've fixed it & you'll see the fix in the next version. "

David Burch
Wednesday, March 05, 2003

*  Recent Topics

*  Fog Creek Home