Scenario:

  • UC Discounts - latest dev
  • Ubercart - 6.x-2.4
  • Jquery Update 6.x-2.0-alpha1 (jquery 1.3)

uc_discounts.js uses deprecated at-symbol attribute selectors of the form [@name*=value]. The "@-attribute" syntax was deprecated as of Jquery 1.2 and removed as of Jquery 1.3 for the preferred [name*=value] syntax.
Therefore, while uc_discount's javascript works with off-the-shelf Drupal, it breaks when jquery update is enabled.
(Jquery Update 2.x is used by 75,000+ sites as of this writing: http://drupal.org/project/usage/jquery_update )

The attached patch updates the syntax in uc_discount.js to the new standard by removing the @'s

I'm surprised no one else has run into this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AaronBauman’s picture

Project: UC Discounts » UC Discount Framework
jeremy.zerr’s picture

Priority: Major » Critical

Definitely can confirm this as a bug. Completely broke the shopping cart and ability for customers to pay when they were selecting an existing address. Moving to Critical because I think that's appropriate as it completely breaks the cart, and creates an unneeded dependency on jQuery version when it can be avoided. I also read that the new name= works in older versions of jQuery, at least back to 1.2, so it should be backwards compatible.

I didn't exactly apply the patch, but just made the changes in the file by hand, so I can't totally move from "needs review" to "reviewed & tested". But is such a small change that I hope this can make it in someday.

Jeremy Zerr