VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: fabvincent on September 24, 2013, 11:57:43 AM

Title: strange error on VM 2 search engine
Post by: fabvincent on September 24, 2013, 11:57:43 AM
HI all,
VM2 gives me lately an error in my javascript console

$(".vm-chzn-select").chosen is not a function

concerning, apprently the following javascript code that is automatically implemented onto the site

//<![CDATA[
60 var vm2string ={editImage: 'edit image',select_all_text: 'COM_VIRTUEMART_DRDOWN_SELALL',select_some_options_text: 'COM_VIRTUEMART_DRDOWN_AVA2ALL'} ;
61 jQuery( function($) {
62 $(".vm-chzn-select").chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text});
63 });
64//]]>

The code itself would not bother me if it was not for the blocking of further down the code.
If the code is useless because the search engine is finding the articles in the page, is there any way to block it?

Thanks for your help, I really need a solution to that.
Title: Re: strange error on VM 2 search engine
Post by: jenkinhill on September 24, 2013, 12:28:11 PM
http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: strange error on VM 2 search engine
Post by: fabvincent on September 24, 2013, 13:56:59 PM
sorry :
joomla 2.5.11
VM 2.0.22c
PHP Version 5.3.5

Title: Re: strange error on VM 2 search engine
Post by: jenkinhill on September 24, 2013, 14:50:03 PM
Can you try 2.0.22e as that has some minor fixes. None of my VM2.0.22d/e installations give that error so what other script are you using that can cause conflict. url?
Title: Re: strange error on VM 2 search engine
Post by: fabvincent on September 25, 2013, 15:13:05 PM
VM 2.0.22d/e?
my system tells me I have the lastest version and Vm download page only gives me the "latest 2.0.22c" version. Where can I get the d/e?
As far as what other plugins/ modules could create the conflict, the business I'm working for has got me installed a bunch of things like slideshowCK as background image, magicZoom for products, AWO coupons - I also have JCH optimize (not active 'cause it's messing the administration part when active so as I'm working on it it is un active) and tried to solve the problem with jquery easy that took care of a couple of problems but not all.

Still trying...
Title: Re: strange error on VM 2 search engine
Post by: jenkinhill on September 25, 2013, 20:00:18 PM
http://dev.virtuemart.net/projects/virtuemart/files

Don't use the live updater. Use Joomla's extensions installer to upgrade VM components.  Too many bells & whistles are the usual cause of JavaScript problems.
Title: Re: strange error on VM 2 search engine
Post by: claesbas on October 08, 2013, 14:43:48 PM
Im also having a conflict with only this code in the cart:

//<![CDATA[
      var vm2string ={editImage: 'edit image',select_all_text: 'COM_VIRTUEMART_DRDOWN_SELALL',select_some_options_text: 'COM_VIRTUEMART_DRDOWN_AVA2ALL'} ;
       jQuery( function($) {
         $(".vm-chzn-select").chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text});
      });
//]]>

We have a special payment module so it might be that one. What exactly is that script? Where does it come from? What file in vm installation is this coming from?

Im using latest 2.0.24

Title: Re: strange error on VM 2 search engine
Post by: Maxim Pishnyak on October 10, 2013, 10:07:03 AM
Could you be more specific?
Title: Re: strange error on VM 2 search engine
Post by: kok on October 11, 2013, 07:38:10 AM
I have a similar problem: TypeError: $(...).chosen is not a function
This error is disrupting orderlist.
http://softex.it-klub.ru/index.php?keyword=350&search=true&view=category&limitstart=0&option=com_virtuemart (http://softex.it-klub.ru/index.php?keyword=350&search=true&view=category&limitstart=0&option=com_virtuemart)


J2.5.14
VM2.0.24
Title: Re: strange error on VM 2 search engine
Post by: kok on October 11, 2013, 09:10:12 AM
Solved.
On the search results page has been deleted library chosen.jquery.min.js
It did plugin "jQuery Easy". After setting it all worked (jQuery Easy - Advanced Site Options (Expert users only) - Ignore Scripts - chosen.jquery.min.js).
In my case - this is the reason for the error.