PDA

View Full Version : Understanding servcer error message


jakobkegel
12-20-2007, 04:51 PM
I recently set up a lightbox derivative from Christophe Beyls http://www.digitalia.be. In the server error log I have now found a substantial number of error messeges that I cant really understand nor google with any success. What is puzzling me is the last bit of the message: ' + src + '

[Thu Dec 20 16:14:51 2007] [error] [client xxx.xx.xxx.xxx] File does not exist: /big/dom/xDOMAINNAME/www/lightbox2/js/' + src + '

What does it mean? :umm:

Tom E.
12-20-2007, 05:12 PM
My guess (and I stress guess) is that there's a bug in some Javascript code that is trying to add some strings (with the '+') to create the path to a file.

Try searching the program code for "+ src +" and post the entire line if you find it - might just be a simple syntax error.

... or it could be something completely different

jakobkegel
12-20-2007, 05:26 PM
The problem with searching is that google disregards the pluses [+] on each side of src and so the result page becomes quite irrelevant...

jakobkegel
12-20-2007, 05:31 PM
Try searching the program code for "+ src +"

if (document.readyState && window.ie){
if (!$('ie_ready')){
var src = (window.location.protocol == 'https:') ? '://0' : 'javascript:void(0)';
document.write('<script id="ie_ready" defer src="../../lightbox2/js/%27%20%2B%20src%20%2B%20%27"><\/script>');
$('ie_ready').onreadystatechange = function(){
if (this.readyState == 'complete') domReady();
};
}


Take a look at row 4...

Tom E.
12-20-2007, 06:13 PM
src="../../lightbox2/js/%27%20%2B%20src%20%2B%20%27">
That's not what I expected.

I'm not sure what the URL is trying to do, unless there is supposed to be a file named js/' + src + '.

I recently set up a lightbox derivative from Christophe Beyls...Maybe something was lost in translation ???

jakobkegel
12-20-2007, 07:50 PM
Hi Tom,

Go a fresh script from the originator and there was possibly something 'lost in translation'. The script now looks like this - with the actual characters printed and not the HTML 'translations'. Dont know if it will make any difference, but will monitor the error log:


if (!$('ie_ready')){
var src = (window.location.protocol == 'https:') ? '://0' : 'javascript:void(0)';
document.write('<script id="ie_ready" defer src="' + src + '"><\/script>');
$('ie_ready').onreadystatechange = function(){
if (this.readyState == 'complete') domReady();
};

Tom E.
12-20-2007, 08:10 PM
Aaaaah, that looks much better; "+ src +" is outside of the single quoted strings.

I don't know if it'll work, but I guarantee it'll do something different (or at least give you a different error).

Randall
12-21-2007, 04:27 PM
Which reminds me: Has anyone seen a Lightbox-type script that resizes to accommodate the photo and the caption/button area all at once? I find that extra stretch after the photo has already loaded distracting and unnecessary -- sort of like the extraneous visual effects in Windows XP, most of which I have turned off. Otherwise, the effect is great.

Hmmm ... I just noticed this option on the Slimbox page: animateCaption: Boolean; set it to false to disable the caption animation. Does the caption area still trail behind the image with that option disabled? I don't care if the caption itself arrives late, I just want to get the box resize operations over with in one shot.

It's interesting that the examples I've seen always have a white border around the image. That happens to be my preferred style, so I'm already predisposed to like the Lightbox effect. :wink:

Randall