• Resolved fisheriks

    (@fisheriks)


    Hi.
    I’m just installed your plugin and configured it according to instruction, but it is not working.
    On Basic plugin settings page – I select: ADD LIGHTBOX OPTIONS – Images with Lightbox – All Images and All WordPress Galleries.
    After this on post page images are not clickable and in browser console I see an error from jquery:
    Uncaught ReferenceError: img is not defined

    jquery.min.js?ver=3.6.0:2 Uncaught ReferenceError: img is not defined
        at HTMLImageElement.<anonymous> (ewd-ulb.js?ver=1.0.7:14:29)
        at Function.each (jquery.min.js?ver=3.6.0:2:3003)
        at s.fn.init.each (jquery.min.js?ver=3.6.0:2:1481)
        at HTMLDocument.<anonymous> (ewd-ulb.js?ver=1.0.7:11:17)
        at e (jquery.min.js?ver=3.6.0:2:30038)
        at t (jquery.min.js?ver=3.6.0:2:30340)

    This error specifies to plugin script – ewd-ulb.js at lines 11 and 14
    Line 11: jQuery("img").each(function() {
    Line 14: else {var description = img.attr(description_src);}

    jQuery working properly on my site. And I don’t know what cause this problem. So please help me to make your plugin and all lightbox functions working properly.
    Thanks.
    Wait for your quick reply.
    Regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter fisheriks

    (@fisheriks)

    You can see this error on page
    Sample page

    Plugin Support jaysupport

    (@jaysupport)

    Hi fisher,

    I just took a look at your page and the links you have on the images point to URLs for which it seems access is not allowed…

    For example, for the first image, the link points to https://klantportal.atrea.loc/wp-content/uploads/2022/03/mobiele_app_1.png. The img src uses that same URL, which works, but the link does not work. Whatever restriction you have in place to block direct linking to image files on your server is likely what is also causing the images to not load in our lightbox.

    Thread Starter fisheriks

    (@fisheriks)

    Hi, Jay.
    Thank you for reply.
    Sorry about links from local site, I forgot about them. Now I fixed it all.
    But lightbox doesn’t work with the same error, at the same script lines. Problem still exist.
    So there is another reason for the problem. Help to found solution.
    Waiting for an answer. Thank you.

    Plugin Support jaysupport

    (@jaysupport)

    Strange. Thank you for correcting that issue and getting back to me. I wonder if it’s something in the way the variable used to get that attribute is declared that is not jiving with your setup.

    We’ve tried altering how the variable is declared in the JS file. Tests on our end show no difference or ill-effect. However, we were having no issues on our test sites and could not recreate yours. With that in mind, do you think you could replace the ewd-ulb.js plugin file on your end with the one found here?

    https://www.etoilewebdesign.com/downloads/ulb/ewd-ulb.js

    (To replace it, you’ll need to access your site via FTP and go to /wp-content/plugins/ultimate-lightbox/assets/js.)

    With the revised variable declaration, does it now get rid of the error for you?

    Thread Starter fisheriks

    (@fisheriks)

    Hi, Jay.
    Thank you very much for fixed script. Issue resolved. I got rid of the error, sorry I did not understand what was the reason that everything didn’t work right away…
    Best wishes and regards. I’m continue to test and work with your plugin)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lightbox is not working, Uncaught ReferenceError: img is not defined’ is closed to new replies.