Upon creating some code, I noticed that on editing the computed value, the previously computed value is not saved in $node_field[0]['value'] as it should (as I've thought it should). Also, the computed value field inside $node is not exposed. I tried the following codes:

if($node_field[0]['value']){
  $node_field[0]['value'] = 99;
}else{
  $node_field[0]['value'] = 11;
}

and using $node->field_mycomputed[0]['value'] as the computed value:

if($node->field_mycomputed[0]['value']){
  $node_field[0]['value'] = 99;
}else{
  $node_field[0]['value'] = 11;
}

Everything returns 11 as the value. So clearly either I'm missing something fundamental or the code is broken...

Comments

Moonshine’s picture

Assigned: Unassigned » Moonshine
Status: Active » Fixed

Very interesting.. I guess not many people have been doing computations based on previous computed values! 8-O

I just committed an initial patch to the dev branch which should show up here once it's rebuilt:

http://drupal.org/node/299994

Give that a shot and see if it clears things up. If it does then I'll tag a new beta. Thanks.

afox’s picture

New version works, thank you!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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