Warning: Missing argument 4 for _options_get_options()...
Warning: Missing argument 5 for _options_get_options()...
Notice: Undefined variable: entity_type in _options_get_options()...
Notice: Undefined variable: entity in _options_get_options()...
This message appears with the Add to Cart form, when a List type field is added to a product entity, and the "Enable this field to function as an attribute field on Add to Cart forms." option is checked on that field.
The function commerce_cart_add_to_cart_form() which invokes _options_get_options() does not provide two required parameters: entity_type and entity.
The following patch provides them via the available $context array provided to commerce_cart_add_to_cart_form().
Comments
Comment #1
helior commentedComment #2
helior commentedComment #3
rszrama commentedI'm not sure the test bot is ever gonna get back to us on this with the tests failing, so I tested locally and committed. : )
Comment #4
joemoraca commentedI can verify the fix ;-) installed commerce kickstart 1.7 with commerce 1.2 and had the error using inline entity form (which seems pretty awesome) - updated to the current commerce dev version and the error is gone.
Comment #5
rszrama commentedGreat, thanks for letting us know, Joe. : )
Comment #6
rowbotony commentedConfirm this is fixed in commerce 7.x-1.3 for me. I downloaded commerce_kickstart-1.7, drush up'd to Drupal-7.14, then encountered this error. I then updated commerce-7.x-1.2 to 7.x-1.3 and the errors are gone now.
Comment #7
thomas_rendleman commentedNot just Ubercart.
Just installed Multiselect Module.
Getting this same error.
Comment #8
rileg commentedAlso confirming fix in commerce 7.x-1.3