Radio button attributes not working in IE when Jquery Update installed

djmystic82 - November 19, 2008 - 13:51
Project:Ubercart Ajax Attribute Calculations
Version:5.x-1.4
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The prices update for me ok in Safari and Firefox but nothing happens in IE.

I've got 1.3.2.8 commit running so I think the previous IE problem (http://drupal.org/node/263381) was fixed before this?

#1

cYu - November 19, 2008 - 22:23

What version of IE? Any Javascript errors? Should be fixed in 5.1.3, but perhaps try the newest release anyhow?

#2

djmystic82 - November 20, 2008 - 14:57

I've tried IE 7.0 and IE 6.0. It does nothing in either.

No javascript errors.

I'm running a custom theme, but the same happens with Garland running.

#3

cYu - November 21, 2008 - 19:25

I'm unable to duplicate this with a fresh install of Ubercart Deluxe and the newest version of uc_aac tested on IE 6. Are there any other enabled modules that might be causing conflict? Can you try updating uc_aac and trying again?

Is there anything odd about the product or attribute or options? Special characters in any of them? Is this happening on normal products or only in product kits?

#4

djmystic82 - November 22, 2008 - 17:05

I made some slight progress with this.

I didn't have the product attribute set to "required". By making it "required" the first calculation worked. Eg, if my product is £5 (small) and one of the attributes added £2 (large), it updated the display to £7. However, attempting to choose another option after that (back to small) did nothing.

I don't think there are any odd characters in my attribute options. Just "size" as the attribute name, then "Small" and "Large" as the options with price variance, but no weight or size variance set (although adding values to these made no difference).

I do have a lot of other modules installed, but I've unchecked pretty much everything that can be on the module list and it made no difference. Would uninstalling modules make any difference to this rather than just unchecking them?

I'm running the latest stable version of UC_AAC. When you say the latest version, did you mean the dev version?

I have three sites running with this module and they all do the same. I'm going to try a fresh install next and see what happens.

Thanks for your time in helping with this problem, it's much appreciated!

#5

djmystic82 - November 22, 2008 - 17:09

No sooner than I posted the above, I think I've cracked it.... Jquery Update module.

This module requires you replace the /misc/jquery.js file so that it uses the lastest jquery.js available. Changing it back to the one provided with the Drupal install and clearing my browser cache fixed it!

Is there anything I can do or can be done with the module so that the jquery update module can run too as I'm using it for some other things on my sites.

#6

cYu - November 24, 2008 - 16:46

I'll take a look at why this is not compatible with jquery update. If you happen to find a fix that only works with jquery update installed I don't mind making that module a dependency of uc_aac either.

#7

cYu - November 25, 2008 - 17:04

Using Jquery Update 5.x-2.0 along with the dev release of this module I am still able to get desired behavior on IE6.

Are you sure you are properly installing Jquery Update? Moving not only the jquery.js file but also the other /misc files and then enabling the module?

#8

djmystic82 - November 26, 2008 - 18:58

I've double checked this. I'm not using the dev version of Jquery update. I'm using the latest stable version - 5.x.2.0.

I have followed the installation instructions for the module, replacing all the files in the misc folder it specifies.

To make the uc_aac work, all I do is set the jquery.js file back to the original and clear my internet explorer cache.

This is the page you can see it happening : http://www.bibiandjules.co.uk/amalfi-journal

If the "medium" option is selected first, the addition is made, but the "small" option does not alter the price back.

#9

cYu - December 1, 2008 - 14:22
Title:Nothing happens in IE» Radio button attributes not working in IE when Jquery Update installed

#10

cYu - December 1, 2008 - 17:39
Status:active» fixed

Should be fixed in latest release,
http://drupal.org/node/341248

I believe the problem was with some of the code in compat.js with the Jquery Update module where it tries to alter how events are bound and unbound. I fixed this by using .bind("click", function()) instead of .click(function()) and unbinding and binding each time the radio buttons get an innerHTML change.

#11

djmystic82 - December 3, 2008 - 09:06

This has done the trick for me. Many thanks for looking into it.

#12

djmystic82 - December 3, 2008 - 15:06

Just thought I would add this. I think that the fix applied here has made it a requirement for jquery update to be installed and running on the site.

I upgraded the uc_aac module from 5.x.1.4 to 5.x.1.5 which did not have jquery update running and the press adjusting did not work. Installing the jquery update module got it working again.

#13

cYu - December 3, 2008 - 17:06

Ack, I did not test that but did not see any reason why my code change would cause that to happen. I will take a look, thanks.

#14

cYu - December 3, 2008 - 17:23

I fixed it here...
http://drupal.org/cvs?commit=156566

The downside is that it now unbinds all click events on the radio buttons instead of only the namespaced click events, but this was needed since namedspaced event binding was not supported in the version of Jquery packaged with D5. It should not have any adverse effects unless you have some other module which is trying to fire actions whenever those radio buttons are clicked.

#15

djmystic82 - December 3, 2008 - 22:51

Thanks for looking into this. I have applied the patch and it seems to be working ok for me now with or without jquery update running, plus the calls that are using jquery on the same page are not affected.

#16

System Message - December 17, 2008 - 22:51
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.