• Resolved kkpp

    (@kkpp)


    Lightbox is no longer working. Not sure at what point this started to not work. Tried deactivating some plugins but still didn’t work. Error messages on developer tool start with:

    Uncaught SyntaxError: Unexpected token in JSON at position 10125
    at JSON.parse (<anonymous>)
    at eval (eval at <anonymous> (jquery.js?ver=1.12.4:2), <anonymous>:1:29)
    at eval (<anonymous>)
    at jquery.js?ver=1.12.4:2
    at Function.globalEval (jquery.js?ver=1.12.4:2)
    at Ha (jquery.js?ver=1.12.4:3)
    at a.fn.init.append (jquery.js?ver=1.12.4:3)
    at a.fn.init.n.fn.(/gallery/anonymous function) [as appendTo] (https://www.ericksonengineering.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:3:24510)
    at Object.success (scripts.min.js?ver=1.5.21:1)

    etc. Any help would be appreciated!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Kima Baghdasaryan

    (@kimabaghdasaryan)

    Hi,

    Please navigate to photo-gallery/frontend/views/BWGViewGalleryBox.php file and replace the code written in line 677, 678 whith this:

    $data[$key]["alt"] = addslashes(htmlspecialchars(str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->alt), ENT_COMPAT | ENT_QUOTES));
         $data[$key]["description"] = addslashes(htmlspecialchars(str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description), ENT_COMPAT | ENT_QUOTES));

    Probably, the issue is because of backslash. Please implement this solution. We will fix this issue in our future updates.

    Thank you!

    Have a nice day!

    Thread Starter kkpp

    (@kkpp)

    Thanks for your reply. Replaced the code as directed, still didn’t work. I put the old code back in, because with the old code if you click on the page while it’s “spinning” it will at least end the lightbox attempt and bring you back to the page, but with the new code that was not the case and you had to use the browser back arrow to get out of the spinning. Is there anything else I could try?

    Plugin Support Zhanna Khachatryan

    (@zhannak)

    Hi @kkpp,

    Probably, you have a backslash in alt/description of the images. Could you please check and remove the backslashes?

    This should solve the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Lightbox not working’ is closed to new replies.