Mini K2 Thumbnail Proximity not working, it stopped working even on your demo site

Hi,
first of all: thanks for the great Mini K2 module!

I tried either the 2.5 and the 3.0 version (v. 1.2.2), in both cases all works well except the Thumbnail Proximity template, i get the error:

cannot call method 'width' of null on line 14 of /tmpl/thumbnail-proximity/assets/proximity.js

I looked for differences comparing my sites with your demo at:
demo.templateplazza.com/joomla/index.php...-thumbnail-proximity
..but it stopped working also!!

Your demo worked on my PCs until yesterday, but not now.
I tried cleaning the browser cache, different browsers on different machines, but it continues not to work.

May be it's something related to the jQuery version?
On my local installations mod_minik2 loads the 1.8.2, if I remember well yesterday your demo site was loading the 1.8.1 version, or may be I'm wrong?

Thank yoy in advance for your support!
11 years 3 months ago #1 by Luigi

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

Hi Maniscalco

Thanks for noticing a problem in our demo site. It looks like we have loaded some jquery libraries there and I would guess your problem might be similar.
We have un-loaded jQuery lib from one of our newly tested plugin, and it starts to work normally as you can see it again. So maybe you also have loaded jQuery more than one with different version there maybe?
11 years 3 months ago #2 by erwinschro

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

Hi erwinschro,
I tried to make Thumbnail Proximity to work searching for muliple jQuery lib loaded, but with no success.
Then I tried modifying the call in proximity.js from:
$ = jQuery.noConflict();
$(document).ready(function(){
});
$(function() {
	[i]<code here>[/i]
});
to:
jQuery.noConflict();
jQuery(document).ready(function($){
	$(function() {
		[i]<code here>[/i]
	});
});
In this way, I get Thumbnail Proximity working on the 2.5 version.

The 3.0 version is still not working.
In J3 jQuery 1.8.1 is loaded froma a local copy by default, other calls are disabled by Joomla itself.
I tried also to force the call into mod_minik2.php (2.5 style), the lib loads, but Proximity still does not work.
I'm going to try to substitute the local jQuery copy with the 1.8.2 one, I'll keep you informed.
Meanwhile, any help is appreciated!

Thank you in advance!
11 years 3 months ago #3 by Luigi

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

Yes I will confirm that what you've done in 2.5 is correct. I thought I have fixed this module with that couple times ago. Will check them out.

For the J3.0 version at the line just before this lines (about line 40)
switch ( $getTemplate ) {

Can you try add this line
JHtml::_('jquery.framework');

and see if that helps.

Let us know then.
11 years 3 months ago #4 by erwinschro

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

Thank you always for your support!

The last suggestion does nothing, anyway there's no need to modify the code, it was my fault!!

The thing is that some images were missing, so _loadImages() cant'load them, and _calcDescrp() and _initEvents() were never launched ;)

Thumbnail Proximity template in 3.0 miniK2 module actually works!

Thanks a lot!

P.s. now I'm gonna find a way to resize thumbnails according to window size (onResize), so thumbnails will fill 100% widht, that would be fine. I'll make you know if I find a simple solution that can be integrated into your beautiful module ;)
11 years 3 months ago #5 by Luigi

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

The last suggestion does nothing, anyway there's no need to modify the code, it was my fault!!


Of course that does nothing as I assume the problem is in the jquery thing not in forgetting some images...
11 years 3 months ago #6 by erwinschro

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

Powered by Kunena Forum