When we go to any node and go to grants tab node/{nid}/grants tp enable permission to particular user doesn't work
Steps to reproduce
1. Go to node/{nid}/grants
2. Enter username to get the user then click search button it gives an error
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42704]: Undefined object: 7 ERROR: type "unsigned" does not exist LINE 3: ...r__roles r ON (na.gid = CAST(r.roles_target_id as unsigned)) ^: SELECT count(*) FROM {node_access} na LEFT JOIN {user__roles} r ON (na.gid = CAST(r.roles_target_id as unsigned)) WHERE na.nid = :nid AND na.realm = :realm AND r.entity_id = :uid AND :grant_type = :one LIMIT 1 OFFSET 0; Array ( [:nid] => 7 [:realm] => nodeaccess_rid [:uid] => 757 [:grant_type] => grant_view [:one] => 1 ) in Drupal\nodeaccess\Form\GrantsForm->buildForm() (line 133 of {web_root}/modules/contrib/nodeaccess/src/Form/GrantsForm.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3185156-2.patch | 893 bytes | jungle |
Comments
Comment #2
jungleMaybe the following are related
Comment #3
jungleI encountered the error above too, but with the patch above, the error was gone.
Comment #4
jungleSetting back to NW to get the root cause.
Comment #5
alisonIs this issue specific to Drupal 9, or also Drupal 8?
Comment #6
jungle@alisonjo315
Both D8 and D9. and I think this is a duplicate of #3061378.
Thanks.
Comment #7
jungleWith the latest code: commit ID 355f010, I could not reproduce this bug. Maybe this was fixed.
Let's postpone it and close it in two or four weeks if no further progress here.
Comment #8
jungleThe bug was gone in the new 2.0.x branch I think.