I found a bug below with nodeaccess_userreference of rc2 :
(1) It works only when grant all permission to user referred . Once less grant, an error comes out when rebuild permission

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /d7test/batch?render=overlay&id=23&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'grant_delete' cannot be null: INSERT INTO {node_access} (nid, realm, gid, grant_view, grant_update, grant_delete) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5), (:db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11); Array ( [:db_insert_placeholder_0] => 18 [:db_insert_placeholder_1] => nodeaccess_userreference [:db_insert_placeholder_2] => 22 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => 18 [:db_insert_placeholder_7] => nodeaccess_userreference_author [:db_insert_placeholder_8] => 1 [:db_insert_placeholder_9] => 1 [:db_insert_placeholder_10] => 1 [:db_insert_placeholder_11] => 1 ) in node_access_write_grants() (line 3334 of /var/www/html/d7test/modules/node/node.module).

Comments

danielb’s picture

Status: Active » Fixed

yup, cheers

gorillaz.f’s picture

Title: Bug with newest rc2 » Bug with newest rc4
Version: 7.x-3.0-rc2 » 7.x-3.0-rc4

hi danielb,
Glad to see new release comes out。
and I got this exception when I created a node with 2 user reference field attached, using rc4.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'uid' in where clause is ambiguous: SELECT u.uid AS uid, u.name AS name, u.status AS status, r.rid AS rid FROM {users} u INNER JOIN {users_roles} r ON u.uid = r.uid WHERE (u.status IN (:db_condition_placeholder_0, :db_condition_placeholder_1)) AND (r.rid IN (:db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4)) AND (uid IN (:db_condition_placeholder_5)) ORDER BY name ASC; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 0 [:db_condition_placeholder_2] => 4 [:db_condition_placeholder_3] => 0 [:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => 5 ) in _user_reference_potential_references_standard() (line 491 of F:\wamp\www\d7lab\sites\all\modules\references\user_reference\user_reference.module).

Even I set one user ref field not to grant any permissions and the other one set to grant , it still failed with this exception.
Seems that it will be necessary to have more than one user ref field attached in one content type for some cases .
Would you take a look at it ?

danielb’s picture

Title: Bug with newest rc4 » Bug with newest rc2
Version: 7.x-3.0-rc4 » 7.x-3.0-rc2

totally unrelated

gorillaz.f’s picture

OIC
sorry for my mistake, danielb

Status: Fixed » Closed (fixed)

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