2 articles with AG in the same page: no pictures displayed!

Admiror Gallery is free extension for Joomla! 1.6. Joomla! 1.7 and Joomla! 2.5 based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
Immortal
Posts: 2
Joined: Tue Dec 10, 2013 8:10 pm

2 articles with AG in the same page: no pictures displayed!

#1 Post by Immortal »

Hi!
I'm trying to use AG for my website but I have several issues.
The main issue is this:
I have a page (menu item type: article->category blog) in witch I would put X articles, all with the same basic template (the galleries in the articles will have the same template too).
If I put only one article, the page is "fine" (it cuts all the left and the bottom borders, but I think this is another issue related to the template) as you can see there: link
If I put two articles (link) the page has some "strange" layout and no more picture displayed.
Moreover the popup engine doesn't work (if I click on any picture there is no popup).

Can you help me to solve this?

ps. I have the same problem also with the default template.

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: 2 articles with AG in the same page: no pictures display

#2 Post by Vasiljevski »

I have some strange behavior, when I open second link (one that should have more galleries).
Firefox CPU load jumps to 100% and I cannot do anything.
In Chrome I managed to see this:

Code: Select all

Uncaught RangeError: Maximum call stack size exceeded jquery.galleryview-2.1.1.js:1
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
150
Uncaught RangeError: Maximum call stack size exceeded jquery.galleryview-2.1.1.js:1
62
Uncaught RangeError: Maximum call stack size exceeded jquery.galleryview-2.1.1.js:1
Uncaught RangeError: Maximum call stack size exceeded jquery.galleryview-2.1.1.js:1
20
Uncaught RangeError: Maximum call stack size exceeded 
I'm not sure what is the cause for this error, but it seems to be stuck in the infinite loop in this part of code:

Code: Select all

	/*
	**	getPos(jQuery element
	**		Calculate position of an element relative to top/left corner of gallery
	**		If the gallery bounding box itself is passed to the function, calculate position of gallery relative to top/left corner of browser window
	** 		RETURNS - JSON {left: int, top: int}
	*/
		function getPos(el) {
			var left = 0, top = 0;
			var el_id = el.id;
			if(el.offsetParent) {
				do {
					left += el.offsetLeft;
					top += el.offsetTop;
				} while(el = el.offsetParent);
			}
			//If we want the position of the gallery itself, return it
			if(el_id == id) {return {'left':left,'top':top};}
			//Otherwise, get position of element relative to gallery
			else {
				var gPos = getPos(j_gallery[0]);
				var gLeft = gPos.left;
				var gTop = gPos.top;
				
				return {'left':left-gLeft,'top':top-gTop};
			}
		};
inplugins/content/admirorgallery/admirorgallery/templates/galleryView/jquery.galleryview-2.1.1.js

In the past we had problems with more GalleryView template on the same page, but it turned out it was ID problem, that prevented the gallery for properly generating. But this is new to me.
Help Admiror Gallery become even better,
give us a review on JED

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: 2 articles with AG in the same page: no pictures display

#3 Post by Vasiljevski »

What happens if you use classic instead of GalleryView? Can you change and let me check?
Help Admiror Gallery become even better,
give us a review on JED

Immortal
Posts: 2
Joined: Tue Dec 10, 2013 8:10 pm

Re: 2 articles with AG in the same page: no pictures display

#4 Post by Immortal »

Vasiljevski wrote:What happens if you use classic instead of GalleryView? Can you change and let me check?
check yourself. It seems ok! :o
And now, also the popup function works!

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: 2 articles with AG in the same page: no pictures display

#5 Post by Vasiljevski »

Probably some JavaScript file causes GalleryView to break. It goes into infinite loop and everything is lost :)

You can further check the cause of this by debugging JS files you include on your page, or use classic template :)
Help Admiror Gallery become even better,
give us a review on JED

Admiror Gallery 5 - Fundraising Campaign

Post Reply