Lightbox not working in Firefox on Mac, Safari works
jimphelps
Joined: 2007-06-16
Posts: 11 |
Posted: Tue, 2007-11-13 15:56 |
I have integrated wpg2 into my blog (http://www.jimphelps.info). The photos are at the bottom of the page. Clicking on a photo is Firefox loads the photo into the window. Lightbox does not work. Clicking on a photo in Safari works as expected (lightbox with navigation loads fine). I have tried this on three different Macs. BTW - two machines are running Leopard. One is still running 10.4.X. I am running WPG2 version 3.0.0 not 3.0.2 I have successfully embedded my gallery into my wordpress theme (see http://www.jimphelps.info/wpg2/ ) I hate to upgrade if I might break my embedded gallery. Any thoughts? |
|
Posts: 492
Sorry. I don't have a Mac to test on. (Haven't really used one since my college roommate's in 1989...)
If you go to the LightBox2 homepage, do the examples there work?
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 11
They work fine in both Safari and Firefox.
Not sure if that is good news or bad news ;-)
Posts: 492
Good news in the sense that we know it can work in the end. Bad news in that we're using the files straight off of his site, so it should work now.
Actually, we did update the underlying scripts (prototype.js, effects.js, and scriptalicious.js) from the ones he has in his download section, because the old version he has can cause problems in some browsers, especially Safari.
Ozgreg, any ideas? (We have to wait until tonight for a reply, because he's in Melbourne and it's the middle of the night there...)
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 11
Using PingDom, I see that prototype.js looks like it is loading twice. So... which one should I kill and how do I do that.
http://www.jimphelps.info/wp-includes/js/prototype.js?ver=1.5.1.1
http://www.jimphelps.info/wp-content/plugins/wpg2/js/prototype.js
Here is the URL for PingDom if you want to run it yourself.
http://tools.pingdom.com/fpt/?url=http://www.jimphelps.info&treeview=1&column=objectID&order=1&type=0
Posts: 11
Can't we wake him? Have cell phone number? ;-)
Thanks for the help and quick reply and the great plugin.
Posts: 492
What other plugins are you using. I've seen the wp-includes/js/prototype.js being loaded by another plugin, but I can't remember which one.
You might want to try disabling all of your other plugins and then reenabling them one at a time to see which one is loading the wp-includes version.
You could try commenting out the line in wpg2functions.inc that loads prototype, by adding two slashes at the front, like this:
That will eliminate the double scripts. Unfortunately, until you know which other plugin is loading it, you can't be sure that the second script will be there on every page that you need it for WPG2.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 11
I'll start de-bugging plugins though some have embedded code so things will blow-up. I'll let you know what I find. Until then, My list-o-plugins:
Plugin Version Description Action
Admin Menu 3.5 ** NOT ACTIVATED
Akismet 2.0.2
Batch Categories 1.3.1 ** NOT ACTIVATED
Category Cloud 1.5
Hello Dolly 1.5 ** NOT ACTIVATED
Improved Include Page 0.4.2
podPress 8.5 ** NOT ACTIVATED
ShareThis 2.0
SimpleTags 2.0
Twitter Tools 1.0
WordPress Database Backup 2.1.5
wp-cache 2.1.2
WPG2 3.0
Posts: 11
Commenting out prototype.js in wpg2functions.inc did get rid of the second prototype.js loading but did not make lightbox work. I uncommented it.
TwitterTools by Alex King was causing the second prototype.js to load. I disabled it but I still don't have lightbox working in Firefox.
Out of curiosity, does it work for you if you click on a photo (at the bottom of the page) on my site? http://www.jimphelps.info
The photos are four-across near the bottom of the white section of the page. It says, Random photos from my gallery.
Jim
Posts: 1378
I just looked at your site and can see the JS is not being called correctly. You have quite a number of Javascripts on that page including a widget.js which has a whole lot of listeners which could be clashing with the lightbox script.
Unfortunately I do not know enough about JS to point out what scripts are clashing with what, however I would start by just having the lightbox scripts running on your site and slowly reenable the remaining scripts until you find the clash..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 11
Thanks Ozgreg and capt_kirk,
It appears that Alex King's Sharethis and Twitter Tools plug-ins (which are widget plugins) break the Lighbox javascript.
This could be an issue with the way that widgets are implemented in my Wordpress Theme or with the new Wordpress widget system. I'm running WordPress 2.3.1
Turning off both of those widgets makes lightbox work in both Safari and Firefox on the Mac.
Interestingly enough, when I turned off ShareThis but turned on Twitter Tools, Lightbox worked in Firefox but not in Safari.
Once again - cheers and I owe you beers.
Jim
Posts: 1378
No issues, BTW we are switching to slimbox which is a smaller version of lightbox which may play a little better with others, one of the limitations we never liked with Lightbox was the fact the script would only work when the page has fully rendered..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 62
I've been internally keeping track of lightbox issues that have arisen, and almost all of them have revolved around the double prototype load and conflicting plugins. I second ozgreg, in that the move to slimbox should (knocking on wood) eliminate almost all these issues. And it's flat out faster....
---------------------------------------------------
Wordpress / Gallery2 (WPG2) Developer
My Site: http://www.marcnjami.com/
Posts: 492
I've got it switched in SVN, but the only hitch is that there is a conflict between TinyMCE and Slimbox in the G2Image window (breaks the magnifier button). I've posted a request for help here, but haven't gotten a reply yet.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 492
Slimbox has replaced Lightbox in the WPG2 SVN. It's now working in the G2Image popup window in both the TinyMCE view and the "Code" view. (A big thanks to Andres Obrero for helping to troubleshoot this.)
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 11
Let me know if/when you want someone to try it out in their Wordpress install. I would be happy to put the plugin in place and see what happens with/without widgets.
Jim
Posts: 21
Hi everybody, I have a similar problem. My installations are:
Wordpress (v2.2.2) Gallery (v2.2.2) and wpg2 (v 3.0.2) ... no other plug-ins
My blog is at kckongphoto.com and here's a blog entry with wpg2 thumbnails that are supposed to open in a "lightbox":
http://kckongphoto.com/?p=19
I normally use IE7 & the lightbox works fine. When I used Firefox (v2.0.0.11), the images opens up in a wwindow ... no lightbox.
Using Firefox, I visited the LightBox2 homepage and the examples page via capt kirk's posting above & the lightbox works fine. So does Jim Phelp's blog.
Can anyone hold my hand to solve this?
Thanks
kc
Posts: 1378
Hiya kckong,
I had a look at your website (nice piece of integration design btw) and noticed you are inserting the tags via g2image (I can tell this because of the rel="lightbox[g2image] tags) have you tried a test to see if you can insert a test image with lightbox via the WPG2 tag to see if you have the same issue. I have a theory about the way the tag is being set from g2image, which is not per html spec..
Thanks..
PS: also noticed JS error (Object cannot be created in this context" code: "9) which also could be causing this behaviour..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 21
Hullooooo Greg, Thanks for having a look at my problem. I'm not using wpg2 for all images yet ... some posts have images hotlinked from my flickr ... I'm still testing to see which might be better.
Yup, being a noob, I just used the pop-up Gallery2 Image Chooser & let the system generate the code.
oooooh I lost you there I don't know how to "insert a test image with lightbox via the WPG2 tag". Did you mean type in the raw html code? ooooo I know some html but not the code to invoke the lightbox
ooops again .... what does this mean?
LOL as you can see, I'm not a coding guy ... at most I can only mimic some html
Or did you mean using another insertion option? I managed to pull out the html for the options:
[code]
<legend>Insertion Options</legend>
<label for="alignment">How to Insert Image</label>
<select name="imginsert" size="1" onchange="toggleTextboxes();" >
<option value='wpg2_image' selected='selected'>WPG2 tag of image</option>
<option value='thumbnail_image'>Thumbnail with link to image (HTML)</option>
<option value='thumbnail_album'>Thumbnail with link to parent album (HTML)</option>
<option value='thumbnail_lightbox'>Thumbnail with LightBox link to Fullsized Image (HTML)</option>
<option value='thumbnail_custom_url'>Thumbnail with link to custom URL (from text box below) (HTML)</option>
<option value='thumbnail_only'>Thumbnail only - no link (HTML)</option>
<option value='fullsize_image'>Fullsized image with link to Gallery page for image (HTML)</option>
<option value='fullsize_only'>Fullsized image only - no link (HTML)</option>
<option value='link_image'>Text link to image (HTML)</option>
<option value='link_album'>Text link to parent album (HTML)</option>
</select>
[code]
I've been using the "Thumbnail with LightBox link to Fullsized Image (HTML)" method/option 'cos I just want my blog entry to dim & the fullsize magically appear over the dimmed blurb. Did you want me to try other the other options?
Thanks
kc
PS: I've now done a new test posting to try two diff insertion options here:
http://kckongphoto.com/?p=24
No improvement ... unfortunately
Posts: 1378
Hiya kckong,
Unfortunately the placement of the REL flags is not the cause of your issue (which is what I suspected but wanted to rule out anyway).
Which leads us back to the original error, Object cannot be created in this context" code: "9 which is generated during the loading of prototype.js (lightbox script).
Like many others, we don't support the lightbox script however we are moving to a slimmed down lightbox called slimbox in the very soon to be released WPG2 3.0x maintenance release which could resolve your issue, being it is a different lightbox script.
I cannot give you a WPG2 release date but I expect it in the next few weeks as I have done most of the bug fixes I want to achieve and just want to do some unit testing before releasing..
Until then I am sorry but I do not have an immediate solution, you might also try the lightbox forums incase someone has seen this issue before or maybe turn off the internal WPG2 lightbox script and instead use the slimbox Wordpress plugin
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 21
Greg, do keep me informed & thanks for your help.
As you suggested I've now installed the slimbox plugin & disabled lightbox support from the WPG2 dashboard. So far so good. I've looked at the test blog entry on my firefox & IE7 ... works ok
If anybody out there finds that it doesn't work, can you please let me know by email or leave a comment on that test blog entry? Appreciate if you'll let me know what browser you're using too
the test blog entry = http://kckongphoto.com/?p=24
Posts: 1
Hi Guys,
Noob in extremis here. I am playing around with WP for the first time, and I am trying to get Slimbox to work. I followed instructions, activated the plugin via my dash, and added the rel="lightbox" to the link tag... and eets not verking...
site is here: http://www.marquis-studios.com/pressy/ (go to the email design page)
Code is
I would appreciate any advice.
Posts: 1
I dont want to open a new thread so I will post it here in the hopes that it gets read and someone can help me.
My lightbox does not work in IE and Firefox, but works well in Safari.
This is the code I used in my template:
<link href='http://gyprot.com/lightbox2.04/lightbox.css' media='screen' rel='stylesheet' type='text/css'/>
<script src='http://gyprot.com/lightbox2.04/prototype.js' type='text/javascript'/>
<script src='http://gyprot.com/lightbox2.04/scriptaculous.js?load=effects,builder' type='text/javascript'/>
<script src='http://gyprot.com/lightbox2.04/lightbox.js' type='text/javascript'/>
The second line has words highlighted in red (which is the error I think) <script src - and - type= - and - /
are all in red. So something is wrong with prototype.js I guess.
I do not run any other scripts and safari is able to use the lightbox effect...
please help me
site is : www.gyprot.com/folio