I got this error when I updated Drupal and CCK.

When I went to line 254 in content.rules.inc, it had this:
return !empty($field) && $node1->$settings['field_name'] != $node2->$settings['field_name'];

So I changed it to
return !empty($field) && $node1->settings['field_name'] != $node2->settings['field_name'];

And that resolved the problem. I don't know how to do the patch work, but for anyone who does, there's the solution.

I set it as critical because you cannot add new content when this bug is active.

Comments

fago’s picture

Status: Active » Postponed (maintainer needs more info)

hm, I cannot reproduce this. So please help me and give me more information.

Which rule have you you used to trigger the bug?
Is the bug only triggered on node creation?
Are you using php4?

@your fix: hm, the "fix" breaks the condition.

ifoundthetao’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

You know, I updated to the newest versions of everything and I reverted my change, and it works fine now.

chicagotech’s picture

I have this exact same problem. The rule I am running is to send an e-mail to an arbitrary address after updating an existing content type. I cloned the rule for two additional content types and ended up with the same fatal error after the form submits: "Fatal error: Cannot access empty property in C:\Drupal Local\modules\cck\includes\content.rules.inc on line 254"

BTW, the changes on the edit forms do save, but then Drupal crashes with the above error.

chicagotech’s picture

Regarding the above posts, I did update everything to current as of 10-23-08, and still had the same problem as outlined in my #3 above. I made the change that ifoundthetao recommended and the problem goes away. This is a bug that should be fixed going forward.

fago’s picture

Priority: Critical » Normal
Status: Closed (fixed) » Postponed (maintainer needs more info)

hm. Your rule must be somehow broken. Please export it and attach it to this issue.

I suppose you are using the Field has changed condition. Does editing this condition work properly?

chicagotech’s picture

Maybe it was broken. I've gone so many steps down the road since posting this in changing Rules and Workflow settings. I put the content.rules.inc file back to its original state this morning and the error is not showing now! Funny how that happens. If it comes up again, I'll export the rule in question and repost. Thanks.

fago’s picture

Status: Postponed (maintainer needs more info) » Fixed

ok, then I'll set the issue to fixed for now. Please reopen if you stumble over it again.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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