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

drupalnesia’s picture

What 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.

Moonshine’s picture

Category: bug » support
Priority: Major » Normal

You'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.

colan’s picture

Status: Active » Fixed

Assuming this is fixed by now. If not, reopen with your code sample.

Status: Fixed » Closed (fixed)

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