When you save a new discount, this notice is displayed:
Notice: Undefined index: #value in number_field_widget_validate() (line 373 of modules/field/modules/number/number.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | commerce_discount_usage-php_notice_on_discount_edit-1777828-8.patch | 1.21 KB | tmsimont |
| #3 | FireShot Screen Capture #026.png | 16.75 KB | kevster |
Comments
Comment #1
steven_kropp commentedI have the same issue... any resolution yet???
Comment #2
giuvax commentedI'm having this error, Discounts work but I want to understand what is this and how to solve it before publishing website.
Comment #3
kevster commentedI am having the same issue also - using the latest dev module. I noticed I have no access to change the available setting (shows 50 available on the discounts list) and also no text showing under offer column (see attached). I havent got coupon switched on, using drupal 7.22 and commerce 1.5 kickstart2.
I updated to entityref latest dev.
EDIT:
I can see the discount in the cart but when I go to checkout and try to hit /checkout/755/checkout I get
"Error The website encountered an unexpected error. Please try again later. "
checking the log I see:
php -
Notice: Undefined index: #value in number_field_widget_validate() (line 373 of /mnt/web/www/sites/xxxx/html/modules/field/modules/number/number.module).
rules -
Unable to get a data value. Error: Unable to get the data property type as the parent data structure is not set.
rules -
Unable to evaluate condition commerce_shipping_compare_shipping_service.
commerce_order -
EntityMetadataWrapperException: Unable to get the data property commerce_total as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 442 of /mnt/web/www/sites/xxxx/html/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
php -
EntityMetadataWrapperException: Unable to get the data property commerce_total as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 442 of /mnt/web/www/sites/xxxx/html/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
If I turn off discount I can check out ok. Hope the above is enough info to debug?
Comment #4
tmsimont commentedit's releated to the quantity field... if you set "unlimited" on the "quantity" then it fires off this error.
if you have discount usage installed, it reads "50 available" even though you've set it to "unlimited" quantity.
Comment #5
tmsimont commentedComment #6
tmsimont commentedsorry my issue with max uses is not related.. this notice comes from the overwrite of the field with this code:
You can't re-write the type of the field because it breaks the validation, yielding the notice everyone is seeing... why not use the "disabled" field property?
Comment #7
tmsimont commentedComment #8
tmsimont commentedhow about this?
Comment #9
karlmc15 commentedThanks @tmsimont
It's working for my site: shopyeucon.net
Comment #10
pcambraComment #11
jtibbles commentedYes that patch works for me too, thanks.
Comment #12
pcambraPlease don't mark it as fixed until is actually included in the module
Comment #13
jkuma commentedWorks for me as well.
Comment #14
jkuma commentedCommitted in 7.x-1.x-dev branch. Thanks for your fix tmsimont.
Comment #17
joelpittet