forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: PCG on June 16, 2008, 06:43:42 pm
-
I get a java script error after clicking on an image to see a larger size. The error only seems to appear with firefox on windows and os x.
Example from os x:
Error: Warning: unrecognized command line flag -psn_0_2490369
Source File: file:///Applications/Firefox.app/Contents/MacOS/components/nsBrowserContentHandler.js
Line: 706
The error is independent from the theme, there are no mods/plugins installed, it happens with every image.
Link: http://www.ibanezcollectors.com/gallery/displayimage.php?album=8&pos=3 (click the image)
Any help would be greatly appreciated.
PCG
-
I don't see that error , tried with FF on windows
Probably it's a bug on FF on mac
Not related to Coppermine IMO
-
Sami,
I'm running FF2 under windows. When I click the Intermediate image I get the full size image in a new window, but I also get a FF "Error Console" window pop up. The Error console window is empty!
Steve
-
From memory, that's caused by using
<a href="javascript:"
instead of
<a href="javascript:;"
I don't know if that's related to the mac issue.
-
I got it with FF2 on the PC also.
Searching returned this thread: http://forums.mozillazine.org/viewtopic.php?t=532094
It seems that, "In Firefox, when "javascript:" is entered as an address, it opens the error console."
Is there a way to modify the '<a href="javascript:"' reference to a standard URL in Coppermine?
<a href="javascript:" onclick="return MM_openBrWindow('picEditor.php?id=51','Crop_Picture','scrollbars=yes,toolbar=no,status=yes,resizable=yes')" ...
-
Check theme_html_picture() in your custom theme.
-
It seems to happen in all of the themes, including the "classic" theme.
Check theme_html_picture() in your custom theme.
What would I be looking for and where would I find this call?
-
If it happens in all themes then you must have edited include/themes.inc.php. Upload a clean copy.
-
If it happens in all themes then you must have edited include/themes.inc.php. Upload a clean copy.
Did not modify the file to my knowledge, but grabbed a fresh download and uploaded include/themes.inc.php.
No joy. I still get the error console. Any other ideas?
-
Looking through "include/themes.inc.php". I found:
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
Yet the rendered code is:
<a href="javascript:" onclick="MM_openBrWindow('displayimage.php?pid=47&fullsize=1','8972373614856d477e8ed8','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=1370,height=2051')"><img src="albums/userpics/11027/normal_Ibanez_Artist_AR300_sn_I815227.JPG" class="image" alt="Click to view full size image" border="0"><br></a>
Is it odd to be missing the ";"?
-
OK, I found the previous thread (http://forum.coppermine-gallery.net/index.php/topic,48072.0.html) and I think the same solution used there will work for you.
-
The code change worked. Adding "void(0)" keeps the console window from opening.
$pic_html = "<a href=\"javascript:;\" ...
to
$pic_html = "<a href=\"javascript:void(0);\" ...
Thanks Nibbler.
-
@Nibbler: potential bug?
-
No, but we should avoid using javascript links like that anyway.