When on the create user page as an admin we are getting an error from the rules module - this looks to be the same issue as here #1311310: No method getElementName for this instance of the class RulesOr.
It looks like the problem is in the function uc_coupon_workflow_suspend_element
foreach ($rule->conditions() as $condition) {
if ($condition->getElementName() == 'uc_coupon_workflow_suspended' && (!$events || count(array_intersect($rule->events(), $events)))) {
$found[] = $rule->label;
}
}
Not all the rule conditions have the method getElementName - a nasty fix would be something like
foreach ($rule->conditions() as $condition) {
if ($condition instanceof RulesAbstractPlugin){
if ($condition->getElementName() == 'uc_coupon_workflow_suspended' && (!$events || count(array_intersect($rule->events(), $events)))) {
$found[] = $rule->label;
}
}
}
Comments
Comment #1
wodenx commentedSlightly modified fix (see attached patch) has been committed. Thanks for tracking down.
Comment #2
wodenx commentedComment #3
scottrouse commentedNot sure if RTBC makes sense here or not since the patch has already been committed to dev, but I've tested the latest dev release and this issue is resolved.
Thanks.
Comment #4
wodenx commentedComment #5.0
heddnUpdated issue summary.