This issue is in follow up to a IRC conversation between me and Berdir. Basically, if you create a new node using the "Create an entity" action and the content type is using Userpoints Node Access functionality, then the following error message is displayed:
Notice: Undefined property: stdClass::$userpoints_nodeaccess_points_price in userpoints_nodeaccess_update_node() (line 208 of /Users/benkaplan/git/drupal/sites/all/modules/userpoints_nodeaccess/userpoints_nodeaccess.module).
So apparently, Userpoints Node Access doesn't like nodes created by Rules.
According to Berdir, the problem is most probably that rules does not call the prepare hook for new nodes. UP-NA uses that to define a default value for that property. Maybe rules should do that, but we should add a check in UP-NA anyway (since it doesn't cost much to do it).
--Ben
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fix_notice.patch | 1.21 KB | berdir |
Comments
Comment #1
berdirThis should fix the error.
Comment #2
BenK commentedTested the patch and everything is working great. Not only is notice gone, but now a node created with Rules will inherit the number of points to access the content from the default content type settings. This is RTBC.
Thanks!
--Ben
Comment #3
BenK commentedHave you had a chance to commit this yet? :-)
--Ben
Comment #4
berdirFinally commited, sorry about the delay ;)