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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| attributes.patch | 636 bytes |

#1
Works for me. Committed! Thanks, Doug. : )
#2
Automatically closed -- issue fixed for 2 weeks with no activity.