Keyword

Lightbox Article Image Pop-Out In K2 2.9 and 2.9.1 Not Working

More
5 years 11 months ago - 5 years 11 months ago #170432 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?
Attachments:
Last edit: 5 years 11 months ago by SD. Reason: Spelling

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #170440 by JoomlaWorks
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

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #172844 by Django
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 ?

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago - 5 years 3 months ago #172868 by René
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'); ?>">
Last edit: 5 years 3 months ago by René. Reason: wrong

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #172881 by Django
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.

More
5 years 3 months ago #172891 by JoomlaWorks
See my response here: www.joomlaworks.net/forum/k2-en/50528-no-more-lightbox-on-main-image#172889

And please avoid cross posting.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #172899 by Django
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.

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #172901 by JoomlaWorks
The plugin you mention probably breaks JS code when doing any minifying. Avoid such plugins.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #172902 by Django
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.

More
5 years 3 months ago #172910 by JoomlaWorks
That's why I mentioned "avoid such pluginS" (plural). In general, JS minifying is 99,9% of the times just breaking JS overall.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum