Hi! Im using acl and forum access. It works fine for accessing forum but when i visit book page(url/content/rehber-kitap) as user i get this error
Error message
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'nid' in where clause is ambiguous: SELECT DISTINCT n.title AS title FROM {node} n INNER JOIN {node_access} na ON na.nid = n.nid WHERE (nid = :db_condition_placeholder_0) AND(( (na.gid = :db_condition_placeholder_1) AND (na.realm = :db_condition_placeholder_2) ))AND (na.grant_view >= :db_condition_placeholder_3) ; Array ( [:db_condition_placeholder_0] => 58 [:db_condition_placeholder_1] => 0 [:db_condition_placeholder_2] => all [:db_condition_placeholder_3] => 1 ) in book_block_view() (line 286 of C:\site\drupal7\modules\book\book.module).

CommentFileSizeAuthor
#1 Ekran Alıntısı.PNG43.61 KBacarcan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acarcan’s picture

FileSize
43.61 KB

sorry, forgot that

bblancha’s picture

Had a working Drupal 7.4 with only Content_access, ACL, Wysiwig and Admin menu modules added. Admin has all permissions. Reg users has view edit access to all book pages. Then I installed an recommended update of content_access module (and Wysiwig I think). Now when admin account clicks on book page link it goes there as expected. When reg user with same access privilidges clicks the same link he gets:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'nid' in where clause is ambiguous: SELECT DISTINCT n.title AS title FROM {node} n INNER JOIN {node_access} na ON na.nid = n.nid WHERE (nid = :db_condition_placeholder_0) AND(( (na.gid = :db_condition_placeholder_1) AND (na.realm = :db_condition_placeholder_2) )OR( (na.gid = :db_condition_placeholder_3) AND (na.realm = :db_condition_placeholder_4) )OR( (na.gid = :db_condition_placeholder_5) AND (na.realm = :db_condition_placeholder_6) )OR( (na.gid = :db_condition_placeholder_7) AND (na.realm = :db_condition_placeholder_8) ))AND (na.grant_view >= :db_condition_placeholder_9) ; Array ( [:db_condition_placeholder_0] => 12 [:db_condition_placeholder_1] => 0 [:db_condition_placeholder_2] => all [:db_condition_placeholder_3] => 21 [:db_condition_placeholder_4] => content_access_author [:db_condition_placeholder_5] => 2 [:db_condition_placeholder_6] => content_access_rid [:db_condition_placeholder_7] => 5 [:db_condition_placeholder_8] => content_access_rid [:db_condition_placeholder_9] => 1 ) in book_block_view() (line 286 of /homepages/7/d98348259/htdocs/WebBase/modules/book/book.module).

I am new to Drupal so forgive if this is not helpful or posted in the wrong place. I just wanted to pass on some results that might be related.

bblancha’s picture

OK I reverted the modules (undid the update to content_access and wysiwig) My site is small about 24 content items.
Drupal 7.4 w/ Admin_menu, ACL, Content_access and Wysiwig.

I created a new book page, a new article and a new basic page all with the same view and edit access permissions (admin and reg user). At this point Registered user access is OK and admin access is OK. (Even when typing /?q=Url_alias in path or clicking on a menu link).

Now as soon as I create a book from the new book page, Registered users can no longer access the book page and get the error mentioned in my previous post (#2). Does this narrow the problem down?

It seems to my naive mind that either something is corrupted in the book_block_view data or there is a problem in the book_block_view module itself.

BTW should this be posted elsewhere?

bblancha’s picture

Ok one last tidbit. If I disable the Book navigation Block (which I had display in the left sidebar on book pages only) Everything works as expected. Both admin and reg users can navigate through book pages. For now I created my own block in the sidebar and entered links to the respective start pages of each book.

acarcan’s picture

I disabled book navigation too. it's same now i can visit book pages as reg user

salvis’s picture

Title: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 » PDOException: Integrity constraint violation: ambiguous nid in book.module with node_access
Project: ACL » Drupal core
Version: 7.x-1.x-dev » 8.x-dev
Component: Miscellaneous » book.module
Status: Active » Closed (duplicate)

I'm not sure why you think this is an ACL bug.

It's a duplicate of #766382-16: Column 'nid' is ambiguous when using node access modules, a core issue, and applying that patch will fix the problem.

Please help that patch in the other issue to make it into core.

acarcan’s picture

When i disable forum access, the problem still exists but after disable acl module problem goes. so i thought that it might be because of acl. but it isn't. thanks a lot, patch fix problem.