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

gordon’s picture

Status: Active » Fixed

Thanks, Fix in dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 6b6e0e8 on 7.x-2.x, 8.x-3.x by gordon:
    Issue #1990984 by pebbl: Fixed Access Profile not recalling selection on...