Ikool’s Blogbed

Javascript issue and fixes of WP E-commerce plugin (3.6.6) in WordPress (2.5.1) admin panel

After reading WP e-commerce plugin’s documents and some online articles/blogs, I started to install WP e-commerce 3.6.6 (the latest version as of today) on my local wordpress (2.5.1). And I tried to add one product but I keep getting the following javascript error:

“catagorylist” is not defined

I tried to find out a solution from WP e-commerce’s forum, unfortunately there is no one reporting this issue at all. So I am wondering that most of us are not using the latest version of the plugin, so I dig into the code and figure out the plugin is using the latest version of jQuery, I am documenting this here for myself’s later use just in case I forget it and also throw this out so that others can also benefit, so here is what I did to fix the issue:

  • Download the latest jQuery from jQuery.com, note I picked jquery 1.2.4
  • And upload or copy jquery.js to your wordpress’ jquery’s javascript directory which is under <WORDPRESS INSTALL DIR>/wp-includes/js/jquery. Note that please make a copy of the existing jquery.js before you overwrite it just in case something bad happens although it doesn’t happen to me
  • Do a file search under your <WORDPRESS INSTALL DIR> to find all reoccurances of jquery.js. Here is what I got:
    wp-shopping-cart.php(2355):
       wp_enqueue_script( 'jQuery', WPSC_URL.'/js/jquery.js', false, '1.2.3');
    C:\wordpress\wp-includes\script-loader.php(76):
    $this->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.2.3');
    ...
  • replace these highlited version # to ‘1.2.4’ if you download jQuery 1.2.4, otherwise, you will have to give what you have.

By now, you should be able to add products to WP e-commerce from the administrator panel

Advertisements

June 12, 2008 - Posted by | How Tos, WP E-Commerce | , , , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: