Built a simple content type with two number fields and a computed field that just adds the two. Unfortunately, it returns a sizable error:
•Notice: Undefined variable: node in eval() (line 1 of D:\inetpub\wwwroot\sevendevel\sites\all\modules\computed_field\computed_field.module(401) : eval()'d code).
•Notice: Trying to get property of non-object in eval() (line 1 of D:\inetpub\wwwroot\sevendevel\sites\all\modules\computed_field\computed_field.module(401) : eval()'d code).
•Notice: Undefined variable: node in eval() (line 2 of D:\inetpub\wwwroot\sevendevel\sites\all\modules\computed_field\computed_field.module(401) : eval()'d code).
•Notice: Trying to get property of non-object in eval() (line 2 of D:\inetpub\wwwroot\sevendevel\sites\all\modules\computed_field\computed_field.module(401) : eval()'d code).
For test purposes, I recreated same in D6 and no error.
Comments
Comment #1
drupalnesia commentedWhat codes are inside your computed-field? Since this computed-field based on user entry code then hard to solve a problem w/o know the exactly code filled by you.
Comment #2
Moonshine commentedYou'll notice in D7 that fields can work on entities other then just $node, so computed field work on $entity now (so it can work with a node, user, etc). My guess you'll need to adjust your computed code for this. Look at the example below the computed code field for an example. Moving to support where you'll likely get more eyeballs.
Thanks.
Comment #3
colanAssuming this is fixed by now. If not, reopen with your code sample.