Product Attributes lost on node_save

douggreen - June 1, 2009 - 21:19
Project:UC Node Checkout
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm losing the product attributes because some custom code I have does a node_save() without setting the $node->attributes value. In hook_nodeapi op=update you're replacing the cart attributes with the attributes from node. However, since the node has no attributes, it's clearing the attributes in my node. I'm not quite sure why you're doing this, but would it be ok to add an isset($node->attributes) check before overwriting the carts attributes. See attached patch.

AttachmentSize
attributes.patch636 bytes

#1

rszrama - July 30, 2009 - 16:28
Status:active» fixed

Works for me. Committed! Thanks, Doug. : )

#2

System Message - August 13, 2009 - 16:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.