Closed (outdated)
Project:
Private
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2010 at 20:19 UTC
Updated:
18 Feb 2017 at 12:59 UTC
Jump to comment: Most recent
When i'm trying to update some nodes private status from content management (/admin/content/node) only {private} table in database is updated but not the 'realm' column in {node_access}. So, the result is non working as expected...
A small patch (just a copy of some lines of code from node_access_rebuild() function) is down here - i think it can be done in a cleaner way...
--- private.module.orig 2010-07-01 00:03:01.000000000 +0400
+++ private.module 2010-07-01 00:09:30.000000000 +0400
@@ -304,6 +304,12 @@
if (!db_affected_rows()) {
db_query('INSERT INTO {private} (nid, private) VALUES (%d, %d)', $nid, 1);
}
+ $loaded_node = node_load($nid);
+ // To preserve database integrity, only aquire grants if the node
+ // loads successfully.
+ if (!empty($loaded_node)) {
+ node_access_acquire_grants($loaded_node);
+ }
}
}
@@ -316,6 +322,12 @@
if (!db_affected_rows()) {
db_query('INSERT INTO {private} (nid, private) VALUES (%d, %d)', $nid, 0);
}
+ $loaded_node = node_load($nid);
+ // To preserve database integrity, only aquire grants if the node
+ // loads successfully.
+ if (!empty($loaded_node)) {
+ node_access_acquire_grants($loaded_node);
+ }
}
}
Comments
Comment #1
toemaz commentedHit against this problem as well. Subscribe. Will report later on the patch.
Comment #2
adamps commentedClosing ancient D6 issue. There is a D7 issue #2502929: Views bulk operations doesn't work