문제

I have a website at http://www.landmhighland.com/index.php?main_page=product_info&cPath=41_58&products_id=461

The lightbox script seems to be starting without having clicked on anything, and without any reference image. It only does this on product pages.

Specifically, the overlay is appearing on the page, and the LightboxImage appears to be loading. When the image is clicked on, it redirects to the home page.

It seems to have started after modifying unrelated pages. I am not seeing any JS errors. Any ideas?

도움이 되었습니까?

해결책

The issue was accidentally including the Lightbox JS and CSS files twice on the page.

Once, in the header, and again on product pages.

It was always included on the product pages as they were the only pages using the lightbox script. I moved it to the header as some other pages were built to use lightboxes. The php file that handles the header was uploaded along with the new pages.

I forgot to upload the updated product page. This caused the live site to have the JS and CSS included twice on the page, with unpredictable and sporadic results.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top