PDA

View Full Version : Trailing slash


shashvat
11th of September 2002 (Wed), 04:52
Hi Pekka,

I was setting up EE and came across this problem:
1. While setting up the size paths, I didn't put a trailing slash after the paths. I didn't come to know this was an error.
EE simply appends filenames after the pathname, so the 2 of them got concatenated without a slash in between. I came to know of this only when I looked at the source of the add photos page, where the IMG urls were like http://servername/dirname/dirnamefilename.jpg
It would be a simple excercise for the path editor page to check for a trailing slash and add it in the end if it didn't exist.

After identifying the problem, I updated the size paths in the path editor page. The change was reflected in subsequent reloads.

But in the Exhibition Editor page, in the thumb and microthumb dropdowns, the paths shown still didn't have the trailing slash. Evidently these are picking up the sizepath values from somewhere else.

Can you look into these two issues (1 enhancement, 1 bug).

Thanks,
Shashvat

Pekka
11th of September 2002 (Wed), 12:31
shashvat wrote:
Hi Pekka,

I was setting up EE and came across this problem:
1. While setting up the size paths, I didn't put a trailing slash after the paths. I didn't come to know this was an error.
EE simply appends filenames after the pathname, so the 2 of them got concatenated without a slash in between. I came to know of this only when I looked at the source of the add photos page, where the IMG urls were like http://servername/dirname/dirnamefilename.jpg
It would be a simple excercise for the path editor page to check for a trailing slash and add it in the end if it didn't exist.

After identifying the problem, I updated the size paths in the path editor page. The change was reflected in subsequent reloads.



Hi Shashvat,

Good point. I have put a check for trailing slash in the next version. I also remove all spaces from both sides of the path before trail check.

But in the Exhibition Editor page, in the thumb and microthumb dropdowns, the paths shown still didn't have the trailing slash. Evidently these are picking up the sizepath values from somewhere else.

Now this is something I could not reproduce. Could it be a browser cache thing?

shashvat
13th of September 2002 (Fri), 03:46
Pekka wrote:
shashvat wrote:
But in the Exhibition Editor page, in the thumb and microthumb dropdowns, the paths shown still didn't have the trailing slash. Evidently these are picking up the sizepath values from somewhere else.

Now this is something I could not reproduce. Could it be a browser cache thing?



Hi Pekka, found the cause:
In the Microthumb and Thumb paths, I had updated the relative paths to have a trailing slash. But I hadn't done that for the URL paths for thumbs and microthumbs, so was getting inconsistent behaviour. Oversight on my part.

Fixed it.

Cheers,
Shashvat