- Posts: 42
 
COMMUNITY FORUM
- Forum
 - K2 Community Forum
 - English K2 Community
 - Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working
 
Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working
- SD
 - 
				
Topic Author
 - Offline
 - Senior Member
 
		Less
		More
		
			
	
		
			
	
						6 years 11 months ago		 -  6 years 11 months ago		#170432
		by SD
	
	
		
			
	
	
	
			 		
													
	
				Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working was created by SD			
			
				I have updated my site running Joomla 3.9.1 and K2 2.9.1 and after doing so the images within the articles no longer pop out, they instead opening within the window causing the use of the back button to return to the article. I have also setup a test site that reverted back to K2 2.9 and the same issues are occurring within the articles.
On my production site I have now reverted back to v2.8 and the lightbox pop out of the image works without issue.
I am including two samples of what it looks like within v2.8 and v2.9.1.
I have jquery 1.12.4 enabled and loading.
Ideas? Suggestions?
					On my production site I have now reverted back to v2.8 and the lightbox pop out of the image works without issue.
I am including two samples of what it looks like within v2.8 and v2.9.1.
I have jquery 1.12.4 enabled and loading.
Ideas? Suggestions?
		Last edit: 6 years 11 months ago  by SD.		Reason: Spelling	
			Please Log in or Create an account to join the conversation.
- JoomlaWorks
 - 
				
 - Offline
 - Admin
 
		Less
		More
		
			
	
		- Posts: 6229
 
			
	
						6 years 11 months ago				#170440
		by JoomlaWorks
	
	
		
			
	
			
			 		
													
	
				Replied by JoomlaWorks on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				Unless you have a JS conflict/error, simply make sure your item.php override is up to date. The modal now requires a data attribute instead of a class/rel combo.
See here: github.com/getk2/k2/blob/master/components/com_k2/templates/default/item.php#L202
					See here: github.com/getk2/k2/blob/master/components/com_k2/templates/default/item.php#L202
Please Log in or Create an account to join the conversation.
- Django
 - 
				
 - Offline
 - Premium Member
 
		Less
		More
		
			
	
		- Posts: 128
 
			
	
						6 years 2 months ago				#172844
		by Django
	
	
		
			
	
			
			 		
													
	
				Replied by Django on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				Hi Fotis
I have the same problem of no lightbox on main image of K2 items. Joomla 3.9.0 / K 2.9.0
"make sure your item.php override is up to date" ?
Everything seems to be up to date in my site.
What can we do more ?
					I have the same problem of no lightbox on main image of K2 items. Joomla 3.9.0 / K 2.9.0
"make sure your item.php override is up to date" ?
Everything seems to be up to date in my site.
What can we do more ?
Please Log in or Create an account to join the conversation.
- René
 - 
				
 - Offline
 - New Member
 
		Less
		More
		
			
	
		- Posts: 1
 
			
	
						6 years 2 months ago		 -  6 years 2 months ago		#172868
		by René
	
	
		
			
	
	
			 		
													
	
				Replied by René on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				Hi Django.
Change this line in you item.php override:
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
For this:
<a data-k2-modal="image" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
					Change this line in you item.php override:
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
For this:
<a data-k2-modal="image" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
		Last edit: 6 years 2 months ago  by René.		Reason: wrong	
			Please Log in or Create an account to join the conversation.
- Django
 - 
				
 - Offline
 - Premium Member
 
		Less
		More
		
			
	
		- Posts: 128
 
			
	
						6 years 2 months ago				#172881
		by Django
	
	
		
			
	
			
			 		
													
	
				Replied by Django on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				Thanks René, but in which item.php ? I don't find this code in any of them (com_k2/model, or /templates/default, or views/item/tmpl/ ...).			
					Please Log in or Create an account to join the conversation.
- JoomlaWorks
 - 
				
 - Offline
 - Admin
 
		Less
		More
		
			
	
		- Posts: 6229
 
			
	
						6 years 2 months ago				#172891
		by JoomlaWorks
	
	
		
			
	
			
			 		
													
	
				Replied by JoomlaWorks on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				See my response here: www.joomlaworks.net/forum/k2-en/50528-no-more-lightbox-on-main-image#172889
And please avoid cross posting.
					And please avoid cross posting.
Please Log in or Create an account to join the conversation.
- Django
 - 
				
 - Offline
 - Premium Member
 
		Less
		More
		
			
	
		- Posts: 128
 
			
	
						6 years 2 months ago				#172899
		by Django
	
	
		
			
	
			
			 		
													
	
				Replied by Django on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				Hi,
I made this change in the item.php override, but it didn't work at first. Then I disabled the "Minify javascript" function in the RSSEO plugin, and it worked.
It doesn't work without any of these 2 modifications.
Problem solved for me.
Thanks for your help.
					I made this change in the item.php override, but it didn't work at first. Then I disabled the "Minify javascript" function in the RSSEO plugin, and it worked.
It doesn't work without any of these 2 modifications.
Problem solved for me.
Thanks for your help.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
 - 
				
 - Offline
 - Admin
 
		Less
		More
		
			
	
		- Posts: 6229
 
			
	
						6 years 2 months ago				#172901
		by JoomlaWorks
	
	
		
			
	
			
			 		
													
	
				Replied by JoomlaWorks on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				The plugin you mention probably breaks JS code when doing any minifying. Avoid such plugins.			
					Please Log in or Create an account to join the conversation.
- Django
 - 
				
 - Offline
 - Premium Member
 
		Less
		More
		
			
	
		- Posts: 128
 
			
	
						6 years 2 months ago				#172902
		by Django
	
	
		
			
	
			
			 		
													
	
				Replied by Django on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				RSJoomla makes VERY good components, but indeed, anyway, with any optimisation (minify / compression JS and CSS) in plugins, components, or templates, we have always to be very careful, and test each function, 1 by 1.			
					Please Log in or Create an account to join the conversation.
- JoomlaWorks
 - 
				
 - Offline
 - Admin
 
		Less
		More
		
			
	
		- Posts: 6229
 
			
	
						6 years 2 months ago				#172910
		by JoomlaWorks
	
	
		
			
	
			
			 		
													
	
				Replied by JoomlaWorks on topic Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working			
			
				That's why I mentioned "avoid such pluginS" (plural). In general, JS minifying is 99,9% of the times just breaking JS overall.			
					Please Log in or Create an account to join the conversation.
- Forum
 - K2 Community Forum
 - English K2 Community
 - Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working