Closed (fixed)
Project:
Weight
Version:
7.x-2.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2012 at 16:36 UTC
Updated:
8 May 2012 at 19:20 UTC
Jump to comment: Most recent file
This was surprising. Basically when you set the node weight, the shipping weight also changes to that exact same integer value. This in itself is not the end of the world, but if you try to set a negative value, ubercart throws an error because you can't have a negative 'weight'.
It seems like this is a namespace issue. Is it possible to have the node weight form use a different key value to prevent conflicts?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1539766-weight-namespaces-3.patch | 771 bytes | rickmanelius |
Comments
Comment #1
davisbenI changed $node->weight to $node->weight_weight, which should eliminate this problem.
Comment #2
rickmanelius commented@10oclock Thanks!
Comment #3
rickmanelius commentedActually, there were two locations that needed to be fixed. The first is $entity->weight_weight and the second is the form values had to be ['weight']['weight_weight'] because the submit hook ignores the first array key and only uses the second in $form_state['values'].
Attached is a patch.
Comment #4
davisbenThanks for the patch! Applied and committed to 7.x-2.x.