Posted by Carlitus on October 27, 2009 at 9:33am
| Project: | Ubercart Out of stock Notification |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The out_of_stock module has conflicts with JQuery Update 6.x-2.x-dev (with jquery 1.3) in the line 78 of uc_out_of_stock.js:
$("form[@id*=uc-product-add-to-cart-form]").each(function(index) {
The javascript error:
[Exception... "'Syntax error, unrecognized expression: [@id*=uc-product-add-to-cart-form]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
Comments
#1
uc_out_of_stock.js belongs to this project.
#2
Firefox 3.6 throws this line in Error Console:
#3
It kills my jQuery custom code and I can't use jQuery with this module enabled. Marking it as critical.
#4
Using this as a guide: http://stackoverflow.com/questions/1487792/jquery-find-element-whose-id-...
changing line 78 to
$("form[id*=uc-product-add-to-cart-form]").each(function(index) {and line 91 to
$("form[id*=uc-catalog-buy-it-now-form]").each(function(index) {That said, this should be tested with the default jquery 1.2.6
#5
Indeed, symbol @ is deprecated:
From http://api.jquery.com/category/selectors/attribute-selectors/
Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the ‘@’ symbol from your selectors in order to make them work again.
There are more deprecated symbols inside uc_out_of_stock.js. I am attaching the patch.
#6
#7
#8
committed, thanks.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.