When adding a new product, this appears after clicking "Save and Continue":

Notice: Undefined property: stdClass::$weight in uc_product_insert() (line 673 of C:\web\sites\all\modules\ubercart\uc_product\uc_product.module). 
Notice: Undefined property: stdClass::$weight_units in uc_product_insert() (line 673 of C:\web\sites\all\modules\ubercart\uc_product\uc_product.module). 
Notice: Undefined property: stdClass::$length in uc_product_insert() (line 673 of C:\web\sites\all\modules\ubercart\uc_product\uc_product.module). 
Notice: Undefined property: stdClass::$width in uc_product_insert() (line 673 of C:\web\sites\all\modules\ubercart\uc_product\uc_product.module). 
Notice: Undefined property: stdClass::$height in uc_product_insert() (line 673 of C:\web\sites\all\modules\ubercart\uc_product\uc_product.module). 
Notice: Undefined property: stdClass::$length_units in uc_product_insert() (line 673 of C:\web\sites\all\modules\ubercart\uc_product\uc_product.module). 

I'm using the Power Tools module to hide the weight and size fields (the "Show checkbox but hide all shipping fields on product entry form" option in the Shipping settings) and these notices only come up when I have this module enabled, which makes me think it's not an Ubercart issue.

Comments

tr’s picture

Status: Active » Postponed (maintainer needs more info)

What version of Ubercart are you using? I can't reproduce this with the latest Ubercart 7.x-3.x-dev. Do you have default values for weight and dimensions set in the Shipping section at admin/store/products/power-tools/product ?

OldAccount’s picture

Ubercart 7.x-3.x-beta, and no I don't have default values set. Are those required for the last option to work correctly? We're not making use of the weight and dimension fields for this store, that's why I opted to hide that part.

OldAccount’s picture

Status: Postponed (maintainer needs more info) » Active

I'm still getting these errors, is there any other info I can provide to help troubleshoot?

longwave’s picture

Similar notices reported in #1278464: Undefined index: uc_product_add_to_cart_form_ when previewing new products when fields are hidden and a new product is being previewed.

stefan.r’s picture

Issue summary: View changes
Status: Active » Fixed

Fix committed to 7.x

  • stefan.r committed 405b3ca on 7.x-1.x
    Issue #1219152: Multiple "Undefined property" notices when adding a new...

Status: Fixed » Closed (fixed)

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