Home » Archive

Articles in the Drupal Category

Drupal »

[13 May 2011 | No Comment | ]

Ran into a problem on node form add: there is no nid assigned, so when you save the node the restrictions don’t get saved along with it. The node doesn’t exist, so at that point in the form it has no nid — a value of nid=0 was being added to {restricted content}.
What the user would see is the access restriction just not being saved. They’d have to go back in and edit the saved node, and then set the access again before it would “take.”
Here is the solution :
function …