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

Project:Ubercart» Ubercart Out of stock Notification
Version:6.x-2.0-rc7» 6.x-1.4

uc_out_of_stock.js belongs to this project.

#2

Firefox 3.6 throws this line in Error Console:

Uncaught exception: Syntax error, unrecognized expression: [@id*=uc-product-add-to-cart-form]

#3

Priority:normal» critical

It kills my jQuery custom code and I can't use jQuery with this module enabled. Marking it as critical.

#4

Status:active» needs review

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.

AttachmentSize
deprecated-symbol.patch 2.29 KB

#6

Version:6.x-1.4» 6.x-1.x-dev

#7

Status:needs review» reviewed & tested by the community

#8

Status:reviewed & tested by the community» fixed

committed, thanks.

#9

Status:fixed» closed (fixed)

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

nobody click here