• Resolved HeyBlondie

    (@heyblondie)


    Hi

    I’m having a look at this plugin and while I like it initially, I’m finding that a whole lot of jQuery errors come up (in error console) when advancing (previous or next) images when viewing in the Lightbox. It happens whether I use keyboard arrow keys or mouse click on the screen.

    Have you experienced this before?

    I have disabled other Instagram plugins, but error still occurs – something to do with JQMIGRATE ?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello, @heyblondie!

    Thank you for posting about this problem!

    We apologize for the inconvenience. Please drop us a line through this contact form (select “I have a pre-sales question” and the form will appear).

    Make sure to mention the link to this forum topic in your message. We will figure out a solution soon and share it here.

    Thanks! Have a great day!

    Thread Starter HeyBlondie

    (@heyblondie)

    Thanks. Have done that.

    Just posting the solution we found, @heyblondie 🙂

    Turns out there is an error in Divi theme. When the hash fragment of page URL contains slashes, Divi throws a Javascript error.

    Instagram Feed WD just triggers that by modifying hash fragment of URL. For example, when viewing images in lightbox, the URL is set to something like this:
    http://sunspacecafe.com.au/my-instagram-feed/#wdi1/1583047457076321701_1434399813

    This Javascript error will be triggered by any similar URL, such as:
    http://sunspacecafe.com.au/#aaa/bbb

    The fragment of code throwing error is in /wp-content/themes/Divi/js/custom.min.js file. If you search for the following line:
    $("#" + element).length && $("#" + element).trigger({

    the second instance of expression in the following function:

    function process_et_hashchange(hash) {
       if (-1 !== hash.indexOf(et_hash_module_seperator, 0)) {
           modules = hash.split(et_hash_module_seperator);
           for (var i = 0; i < modules.length; i++) {
               var module_params = modules[i].split(et_hash_module_param_seperator)
                 , element = module_params[0];
               module_params.shift(),
               $("#" + element).length && $("#" + element).trigger({
                   type: "et_hashchange",
                   params: module_params
               })
           }
       } else {
           element = (module_params = hash.split(et_hash_module_param_seperator))[0];
           module_params.shift(),
           $("#" + element).length && $("#" + element).trigger({
               type: "et_hashchange",
               params: module_params
           })
       }
    }

    which is $("#" + "aaa/bbb") causes “Uncaught Error: Syntax error, unrecognized expression: #aaa/bbb”. Therefore, please contact Divi theme support and ask them to have a look at this. Let us know how it goes.

    Thanks! Have a wonderful day!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘jQuery errors when using lightbox’ is closed to new replies.