JQuerry error in affiliate plugin breaks component

  • Posts: 259
  • Thank you received: 10
12 years 1 day ago #78201

I'm using a component called CookieConfirm to be in compliance of the EU privacy cookie directive. However with hikashop installed, there is an error in the JQuery that stops the banner asking for cookie permission to work. The author of the component has found the problem and it lies with the hikashop affiliate plugin. The exact error is as followed.

<script type="text/javascript">

				jQuery(document).ready(function (){
					jQuery('select').chosen({
Uncaught TypeError: Object [object Object] has no method 'chosen'
						disable_search_threshold : 10,
						allow_single_deselect : true
					});
				});
			
do_nothing( function() {
				
			});
  </script>

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 1 day ago #78204

Hi,

We do not have such javascript code in HikaShop because we do not initialize chosen directly.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 259
  • Thank you received: 10
12 years 1 day ago #78209

That's rather weird, cause when the affiliate plugin gets disabled the component works just fine. I can provide the CookieConfirm component if you like

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 1 day ago #78210

Hi,

HikaShop can call the Joomla 3 "chosen" library, but we do not initialized it.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 259
  • Thank you received: 10
12 years 1 day ago #78217

The error is gone when I disable the hikashopaffiliate plugin. It's also not happening when that plugin is enabled and the Hikashop helper is not loaded, by commenting the include in hikashopaffiliate.php:

if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;



I've enabled the plugin and you can see the error at the following website (Firebug -> console) [my personal browser is firefox 16.0.2. Firebug is an extension]:

www.soliweb.be/ This is either a bug in Hikashop or in Joomla 3.



Could you please give it a look? Thanks!

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 1 day ago #78219

Hi,

Without an access to the front end, it would be difficult.

Please add a new element in the #__hikashop_config table.
config_namekey : bootstrap_forcechosen
config_value : 0
config_default : 1

It would remove the Joomla 3 chosen initialization.
But as I already said 2 times, this is not an HikaShop bug. This is a Joomla 3 Template problem.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 259
  • Thank you received: 10
12 years 1 day ago #78227

Key added and its working Thanks. about the bug issue, sorry. I understood where you said it was not a hikashop issue but didn't know where else to look. Now that you've said it's a template issue, i can go knock on Joomla's door :)

Check your hikashop domain mailbox for Superuser access to the site if you still need it. Ifnot lemme know and ill remove the account. If needed FTP access will be granted aswell

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 1 day ago #78231

Hi,

When Joomla ask for the "chosen" library, the template should include it.
Joomla adds some javascript to initialize chosen on the page but if the library is not include, the javascript fails.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 259
  • Thank you received: 10
12 years 1 day ago #78251

If i could ask a favor if you (or someone else on the HS team has the time), could this template bug in combo with CookieConfirm & HS be added & followed up on the J3 joomlacode.org/gf/project/joomla/tracker...owse&tracker_id=8103 . Since you guys are obviously more skilled then i am in the whole joomla code & javascript thing and how it works (or interferes) with proper component & template function.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum