After installing 7.x.2.0-rc1 it became quickly apparent that the 'Access Profile' option (on the node edit form) wasn't recalling it's previously selected values correctly. Everything was working in terms of access i.e. the permissions were being listened to as expected, the form was just not showing the current status of 'Access Profile'.
The bug was quick to find however — a singular line edit:
--- simple_access.module
+++ (clipboard)
@@ -199,7 +199,7 @@
$nodes[$row['nid']]->simple_access[$row['gid']] = $row;
}
foreach ($profiles as $row) {
- $nodes[$row['nid']]->simple_access_profiles_node[$row['pid']] = $row;
+ $nodes[$row['nid']]->simple_access_profiles[$row['pid']] = $row['pid'];
}
}
The typo happened due to the database table being named `simple_access_profiles_node` but the property on the node being `simple_access_profiles`. In order for the selection to work with checkboxes, the `pid` needed to be the key and the value of the array.
Comments
Comment #1
gordon CreditAttribution: gordon commentedThanks, Fix in dev