WordPress.org

Ready to get started?Download WordPress

Forums

Lightbox 2
Lightbox 2 Doesn't Work in Firefox with WP 3.1 (28 posts)

  1. Alan Haynes
    Member
    Posted 3 years ago #

    Using Window 7, I try to move my Firefox window to my second monitor. I click the title bar and drag it. It resizes a bit as it should and then stops moving. After several seconds, I get an error saying that a script has stopped working. When I look at that script, it's the one used by Lightbox 2.

    If I disable Lightbox 2 in my WordPress 3.1 dashboard, everything works fine. Also, it works fine - even with the plugin enabled - in Chrome.

    BTW, I've been using Lightbox 2 on this site for a long time and never had a problem with until I upgraded to WP 3.1 today.

    I've disabled the plugin for now, but my site relies on Lightbox 2, so how do I fix it?

    Alan
    PhotoCitizen.com

  2. CrazyMoose
    Member
    Posted 3 years ago #

    I don't know if it has something to do with windows 7, I still got vista but Lightbox 2 works very well on two pages with WP 3.1. With firefox and IE.

  3. cbh
    Member
    Posted 3 years ago #

    Not working for me either - just noticed. When I click on an image that used to work, in Safari or Firefox, no lightbox, just the image on a separate web page.

  4. cbh
    Member
    Posted 3 years ago #

    That's on a Mac, BTW

  5. ashrafsobli
    Member
    Posted 3 years ago #

    Thanks Alan for raising this question. I've similar problem with one of my sites. I really appreciate if anyone/developer can show us how to deal with this. Thanks in advance .

  6. Alan Haynes
    Member
    Posted 3 years ago #

    I've switched to a different lightbox plugin: Auto Thickbox. It works perfectly, but it doesn't allow my visitors to use their keyboard cursor keys to browse through the photos the way Lightbox 2 does. Oh well, at least it doesn't break my site.

    Alan
    PhotoCitizen.com

  7. ElFregadero
    Member
    Posted 3 years ago #

    My first impression is that it has something to do with the theme. I have two websites using this plugin. One works fine (www.fijnedag.com) and the other is broken (www.elfregadero.nl). This is with Internet Explorer. Both website work fine with FireFox.

  8. ElFregadero
    Member
    Posted 3 years ago #

    I found out that it has something to do with a new version of jQuery that comes with WP 3.1. Replacing the file jquery.js (../wp-includes/js/jquery/) with the older versions from WP 3.0.5 solves my issues.

    Of course it would be nice not to use a workaround, but rather have a new version from lightbox2.

    Download version 3.0.5: http://wordpress.org/wordpress-3.0.5.zip

  9. Alan Haynes
    Member
    Posted 3 years ago #

    I've never tried to replace individual files in WordPress before.

    Is it simply a matter of uploading the jquery file (in wp-includes) from WP3.05 to my server to overwrite the existing jquery folder there?

    Alan
    PhotoCitizen.com

  10. ElFregadero
    Member
    Posted 3 years ago #

    Alan,

    Yes, it is just as simple as that.
    Just to be sure, I only replaced the file jquery.js in this folder. Not the entire folder.

    Niels

  11. Alan Haynes
    Member
    Posted 3 years ago #

    Hi ElFregadero,

    Thanks that worked.

    In case anyone else needs a step-by-step:

    I used Filezilla to copy jquery.js from the WP3.05 install (it's in the js folder inside wp-includes) to my server - overwriting the existing jquery.js file.

    Then I deactivated the Auto Thickbox plugin and reactivated Lightbox2. Everything works as before.

    I wonder if having an "old" version of jquery.js will cause any problems with any new plupgins I might install later on. Guess we'll have to see.

    Thanks again,

    Alan
    PhotoCitizen.com

  12. missmandarin
    Member
    Posted 3 years ago #

    the tip to replace the jquery file was awesome, and i tried it ,though it did not work for me :(
    i had to install the auto thickbox, which is soooooo far away from lightbox2's amazing css and keyboard navigation...

    any guess what i can do?

  13. ElFregadero
    Member
    Posted 3 years ago #

    I am afraid I can't help you there. I noticed it could have also something to do with the choosen theme, changing it might help, but this is probably not the solution you were looking for.

    I do agree with you on the wanted functionallity regarding the use of the keyboard etc., so I'am looking for an other plugin, otherwise this issue will return with every new version of WP. I will post it back here whenever I found one I like.

    Cheers

  14. missmandarin
    Member
    Posted 3 years ago #

    we might want to write to lightbox2 developer to update the plugin .
    it 's one of the bests.

  15. missmandarin
    Member
    Posted 3 years ago #

    that 's weird. it s now working ..... :O
    well, let me say i m happy and i don t wanna know how or why not it works :DD
    maybe before the jqeuery file was not refreshed. don't know :)

  16. greencouchstudio
    Member
    Posted 3 years ago #

    Just upgraded WordPress, and am having the same issues with three other lightboxes (WP-Slimbox2 quit working, so I tried Lightbox 2 and Lightbox Plus as well... to no avail.) Had to install Auto Thickbox for the time being, which aside from being clunky, works perfectly.

  17. greencouchstudio
    Member
    Posted 3 years ago #

    I forgot to mention that I tried replacing the jquery version method listed above, but this did not appear to work for me.

  18. reinard
    Member
    Posted 3 years ago #

    My Weblog http://blog.hr-schmitz.de is still 3.0.2 and lightbox2 is working well there. In all other weblogs with > 3.0.2 lightbox2 doesn't work, not with an old jquery and not with other themes.
    I mailed to the developer but did no get an answer yet. He seems to be traveling somewhere without connection to the Internet...

    I cannot change to an other plugin, would have to rewrite my posts of the the last years! So I will not upgrade until it's working again.

  19. reinard
    Member
    Posted 3 years ago #

    Again me,annotation to my last post:

    Lightbox is ONLY working in Safari, not in Chrome and Firefox on a MacBook Pro. On the iMac (PPC) it's alo not working in Safari :-(

    So I think, the solution will be somehow complex...

  20. vouchey
    Member
    Posted 3 years ago #

    I'm having a similar problem:

    http://www.centersquarejournal.com/news/rahm-emanuel-holds-rally-in-welles-park

    The pop-up images display progressively lower on the screen when viewed in Firefox (just updated to 3.6.15) but not in Chrome. (Have not tested IE).

    I'm running WP 3.1 and Lightbox Plus 2.2.1.

    I tried ElFregadero's nifty jQuery swap-out, but I see no improvement.

    Any other ideas?

  21. nbatch
    Member
    Posted 3 years ago #

    I found out that it has something to do with a new version of jQuery that comes with WP 3.1. Replacing the file jquery.js (../wp-includes/js/jquery/) with the older versions from WP 3.0.5 solves my issues.

    Of course it would be nice not to use a workaround, but rather have a new version from lightbox2.

    Download version 3.0.5: http://wordpress.org/wordpress-3.0.5.zip

    Thanks, this fixed my problems with lightbox 2

  22. penderra
    Member
    Posted 3 years ago #

    Had the same problem, but using the jquery.js fix didn't work until I restarted the server

  23. vouchey
    Member
    Posted 3 years ago #

    Penderra, you were right. Once I was able to convince my ISP to do a soft-restart of the server, everything worked out.

  24. chilm
    Member
    Posted 3 years ago #

    The fix is:

    In your plugins folder >> Lightbox-2 folder >> lightbox2.php

    Replace (near 62)

    $replacement = '$1 rel="lightbox['.$post->ID.']">';

    With:

    $replacement = '$1 rel="lightbox">';

    and it's working again ;-)

  25. vincent.zomer
    Member
    Posted 3 years ago #

    chilm, your solutions works, but not in (my) galleries. I can't use the next and previous buttons with this solution.

    I'm back to using an older jQuery

  26. Alan Haynes
    Member
    Posted 2 years ago #

    Chilm,

    I tried your solution, but it didn't work for me. I'm using the Thesis theme and WP 3.1.1. Besides still causing a scripting error, none of my image captions appeared in the enlarged Lightbox view: the caption area was blank.

    So, again I installed the OLD version of jquery (from WP 3.05) and the problem was solved.

    Thanks for the suggestion though. I'm sure it works with some themes, just not mine.

    Alan
    PhotoCitizen.com

  27. Pedro Candeias
    Member
    Posted 2 years ago #

    Hi,

    I don't think that changing the jquery that comes bundled with WordPress is a good idea. I might need it.
    My solution would be to add this to the functions.php file:

    // Change jquery version
    function current_jquery($version) {
    wp_deregister_script('jquery');
    wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/'.$version.'/jquery.min.js',false, $version);
    }

    add_action( 'wp_head', current_jquery( '1.4.2' ) ); // change number to the desired version

    Hope ir helps

  28. larssonk22
    Member
    Posted 2 years ago #

    Just experienced this problem.

    Pedro Candeias, your suggestion broke wordpress lol, had to reupload the functions.php file to regain access.

    SIMPLE FIX - Download Use Google Libraries Plugin

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags