This may be related to this issue: #2066205: "Error: Unknown condition" in Rule for custom inline condition
I have defined a new inline condition, order_owner_has_role, on the commerce_line_item entity and it checks to see if the owner of the order in which the line item is contained has a given role. This is to allow user-defined product discounts based on role.
Per the issue referenced above, I was initially having some trouble getting Rules to recognize the conditions parameters and callback function, but that appeared to be resolved.
Now what I am seeing is that when I clear all caches, the order_owner_has_role_build callback is identified by Rules and executed. The page loads with the applicable discount calculated into the sell price. But every page load after that fails, with this message:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'order_owner_has_role_build' not found or invalid function name in FacesExtendable->__call() (line 123 of /var/www/projects/kcm/sites/d7.kcm.org/sites/all/modules/rules/includes/faces.inc).
This is the statement on that line:
return call_user_func_array($method[0], $arguments);
where $method[0] contains order_owner_has_role_build
So it seems like the callback function is not getting cached after it is found and executed the first time.
I'm stumped! Appreciate your help. Please let me know what additional information I can provide to help.
Comments
Comment #1
jkuma commentedduplicated issue with #2066205: "Error: Unknown condition" in Rule for custom inline condition
Comment #2
jkuma commented