UR NA module tries to transform its form data array using nodeapi hook. But the hook is invoked outside of form processing too, when the data doesn't require transformation.
This leads to the logics not working in such cases and to NA user settings for the node resetting.

CommentFileSizeAuthor
#1 ur_na_nodeapi_reset_bugfix_1630064_1.patch2.47 KBcrea
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

crea’s picture

Status: Active » Needs review
FileSize
2.47 KB

Attached patch moves transformation logics to submit hook, which fixes the problem.

P.S. In my opinion the transformation only makes the code complicated without any significant gains. But to reduce my work in this patch I've chosen to keep the transformation logics.

Status: Needs review » Needs work

The last submitted patch, ur_na_nodeapi_reset_bugfix_1630064_1.patch, failed testing.

crea’s picture

Issue summary: View changes

The patch above is missing global $user declaration in the user_relationship_node_access_node_form_submit() function, but its working anyway because access checks are done for the current user by default.
It can be changed simply to

- $allowed_grants = _user_relationship_node_access_get_allowed_grants($user);
+ $allowed_grants = _user_relationship_node_access_get_allowed_grants();