On the stock edit form (node/%/edit/stock), the following message appears when there are no sku's defined for the node:
Notice: Undefined variable: rows in theme_uc_stock_edit_form() (line 323 of ...\sites\all\modules\contrib\ubercart\uc_stock\uc_stock.admin.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ubercart-undefined_variable-1505276-1.patch | 426 bytes | glekli |
Comments
Comment #1
glekli commentedSubmitting a patch to fix it.
Comment #2
tr commentedHow did you create a node without a SKU? That's a required form element, and you should *never* have a product node without a SKU. So no, I don't think hiding the error is the correct thing to do here - you need to identify how the node can get created without a SKU then prevent that from happening.
Comment #3
glekli commentedOn this particular site, a content type that is set up as a product has some nodes that are not intended for sale, and those nodes do not have the sku field filled in.
I don't think defining a variable before using it could be considered 'hiding an error' in any scenario. Nevertheless, I understand that UC is set up so that it requires a sku to behave normally.
Comment #4
longwaveCommitted to both branches as it's a trivial fix.