I have a redhen_org set up and have added a redhen email field to the org. I created a rule that attempts to email the org when a field on the org's membership is updated. I am getting the following error when the rule tries to send the email:
Fatal error: Call to undefined function redhen_contact_property_email_get() in /xxxx/xxxx/xxxx/sites/all/modules/entity/includes/entity.wrapper.inc on line 444
Here is an export of the rule:
{ "rules_provider_is_out_of_educations" : {
"LABEL" : "Provider is out of educations",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "redhen_membership" ],
"ON" : [ "redhen_membership_update" ],
"IF" : [
{ "entity_has_field" : { "entity" : [ "redhen-membership" ], "field" : "field_remaining" } },
{ "data_is" : {
"data" : [ "redhen-membership-unchanged:field-remaining" ],
"value" : "1"
}
},
{ "data_is" : { "data" : [ "redhen-membership:field-remaining" ], "value" : "0" } }
],
"DO" : [
{ "entity_query" : {
"USING" : {
"type" : "redhen_org",
"property" : "org_id",
"value" : [ "redhen-membership:entity-id" ],
"limit" : "1"
},
"PROVIDE" : { "entity_fetched" : { "org" : "org" } }
}
},
{ "mail" : {
"to" : [ "org:0:primary-contact:email" ],
"subject" : "test",
"message" : "test",
"language" : [ "" ]
}
}
]
}
}
Any help would be great.
Thanks!
Mickey
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | redhen-movefunction-1874512-2.patch | 1.95 KB | micnap |
Comments
Comment #1
micnap commentedFollowing the lead of this Ubercart issue - http://drupal.org/node/1288062 - the function just needs to be moved to the .module file. Here's a patch.
Thanks,
Mickey
Comment #2
levelos commentedThanks Mickey - I went ahead and moved all the metadata functions into the module file in e4500f7.