Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
_uc_cart_product_get_options() fails with the above error if the $data field does not exist in the product $item. This can happen when previewing a new product and there is a module that implements hook_uc_product_alter(), and that implementation calls _uc_cart_product_get_options().
Yes, you're not really supposed to call underscore functions from outside of that one module, but uc_price_per_role does.
Comment | File | Size | Author |
---|---|---|---|
#1 | ubercart_undefined_options_data-1897242-1.patch | 445 bytes | DanZ |
Comments
Comment #1
DanZ CreditAttribution: DanZ commentedThis little patch fixes it.
Comment #2
longwaveArguably, uc_price_per_role could check this before calling, but I guess this doesn't really hurt anything.
Comment #3
DanZ CreditAttribution: DanZ commentedYes, uc_price_per_role could do the check.
However, that would be a workaround, and won't help other add-on modules. I'd rather have a fix.
Comment #4
longwaveCommitted.
Comment #5.0
(not verified) CreditAttribution: commentedGrammar.