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

CommentFileSizeAuthor
#1 redhen-movefunction-1874512-2.patch1.95 KBmicnap

Comments

micnap’s picture

Status: Active » Needs review
StatusFileSize
new1.95 KB

Following 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

levelos’s picture

Status: Needs review » Fixed

Thanks Mickey - I went ahead and moved all the metadata functions into the module file in e4500f7.

Status: Fixed » Closed (fixed)

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

  • Commit e4500f7 on 7.x-1.x, tests, redhen-donation by levelos:
    #1874512: Move metadata property functions into module file rather than...

  • Commit e4500f7 on 7.x-1.x, tests, redhen-donation, relation-roles by levelos:
    #1874512: Move metadata property functions into module file rather than...