Page 1 of 1

Uncaught TypeError: $(...).prettyPhoto is not a function

Posted: Fri Jul 24, 2015 2:13 pm
by FCazabon
Hi,

I am using CMSMS 1.12 with the Gallery 2.0.2 module.

When I click on an image in a gallery it displays in is own web page and then I have to click on the browser's back button to go back to the list of photos in the gallery and click on another one. THis despite having set the template to PrettyPhoto which is supposed to display the photo and let me click next and previous buttons to go through all the photos in the gallery.

When I inspect the element I see the error:

Uncaught TypeError: $(...).prettyPhoto is not a function

I have this working in another site so I've tried comparing the source and don't understand why there is a difference.

Working Site:
http://pavitandt.org/index.php?mact=Gal ... 66&page=66

Code: Select all

	<div class="img">
			
		<a class="group" href="uploads/images/Gallery/Album1/DSC00718.JPG" data-title="On the computer" data-lightbox="cmsmsgallery12"><img src="uploads/images/Gallery/Album1//thumb_DSC00718.JPG" alt="On the computer" /></a>
		</div>
	<div class="img">
Problem site:
http://arrivealivett.com/index.php?mact ... 84&page=84

Code: Select all

	<div class="img">
	   <a class="group" href="uploads/images/Gallery/Art%20Essay/IMG_2743-3.jpg" title="" rel="prettyPhoto[21]"><img src="uploads/images/Gallery/Art%20Essay//thumb_IMG_2743-3.jpg" alt="IMG_2743-3.jpg" /></a>
		</div>
I do know I've used a different template in the working site, but that should not be a problem.

Any ideas what could be wrong here?

Re: Uncaught TypeError: $(...).prettyPhoto is not a function

Posted: Fri Jul 24, 2015 2:58 pm
by velden
jQuery library is included multiple times. Probably that causes the problem

Re: Uncaught TypeError: $(...).prettyPhoto is not a function

Posted: Sat Jul 25, 2015 2:04 pm
by FCazabon
velden wrote:jQuery library is included multiple times. Probably that causes the problem
Thanks, but it seems to be the same in the working page and all the jquery references are handled by the template and the module so I haven't added in any extra calls (that I am aware of) and don't want to mess with the template or module to remove any.

Any other ideas?

Later:

I switched from the PrettyPhoto template to the Lightbox template and it is working! So I guess there is some problem with that template.