Lightbox shortcode issue in X theme v7.2.3

Trying to use the [lightbox] shortcode in X theme v 7.2.3 but I get the following error in my Developer console:

cs.0ce70e6.js:1
Unable to render element TypeError: a.toLowerCase is not a function
at X (eval at (ilightbox.js?ver=4.2.3:7), :1:2121)
at HTMLSpanElement.eval (eval at (ilightbox.js?ver=4.2.3:7), :1:10892)
at Function.each (jquery.js?ver=1.12.4-wp:1)
at a.fn.init.each (jquery.js?ver=1.12.4-wp:1)
at aa.attachItems (eval at (ilightbox.js?ver=4.2.3:7), :1:10716)
at new aa (eval at (ilightbox.js?ver=4.2.3:7), :1:6820)
at a.fn.init.g.fn.iLightBox (eval at (ilightbox.js?ver=4.2.3:7), :1:54522)
at HTMLSpanElement. (cs.0ce70e6.js:8)
at cs.0ce70e6.js:1
at cs.0ce70e6.js:1 <span id=​"x-lightbox-1" data-x-element=​"lightbox" data-x-params=​"{“selector”:​".lightbox-image",“deeplink”:​false,“opacity”:​"0.85",“prevScale”:​"0.85",“prevOpacity”:​"0.65",“nextScale”:​"0.85",“nextOpacity”:​"0.65",“orientation”:​"horizontal",“thumbnails”:​false}​">​​
(anonymous) @ cs.0ce70e6.js:1

I’ve already tried disabling all plugins (except for Cornerstone) and setting Cloudflare to “maintenance mode” to bypass all cacheing, but the same error appears.

I’m not using a child theme, and there’s no custom JS under Theme Options.

Hello @samuraicow,

Thanks for writing in!

Please make sure that you have updated to the latest version. Our latest versions are:

  • X theme 7.2.3
  • Cornerstone 4.2.3

This latest release contains fixes for several issues so be sure to check out the changelog (http://theme.co/changelog/).

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: How The Forum Works

Please let us know how it goes.

Hi @ruenel.

Yes, I’m using the latest theme and plugin. My login info and page in question are already in the secure note in my initial post.

Thanks!

Hello @samuraicow,

Thanks for updating in!

You need to update your lightbox shortcode and make sure that you have inserted the correct selector. It seems that you need to use .lightbox-image > img as the selector. You can check out this old demo of the site to know how to correctly use the shortcode:

Hope this helps.

Strange. Your suggestion did not work, but changing the selector to a different name worked! Thanks!

Glad to hear it’s working with the other name now, @samuraicow.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.