The SQL code in the call to db_rewrite_sql, as of 5.x-1.12, does not include an alias to the node table, which causes a SQL error because of the ambiguity on the nid field. Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| nodereference.patch | 798 bytes | therzog |
Comments
Comment #1
longwaveBug confirmed, patch works for me.
Comment #2
Crell commentedI was bitten by this as well, and the attached fix worked for me.
Comment #3
e5sego commentedThis happend to me too, and the patch works. I believe this bug just appears in combination with i18n module, the failed query looks like:
Comment #4
longwaveThe bug is triggered when using any module that implements hook_db_rewrite_sql() - in my case it was due to Domain Access, not i18n.
Comment #5
jtjones23 commentedThis bug was driving me crazy, patch works for me as well.
Comment #6
abautu commentedI got this problem too. I created a similar patch (which I'm not attaching because therzog beat me to it :P )
Comment #7
greg.harveyMarked #865354: NodeReference and NodeAccess generates "user warning: Column 'nid' in where clause is ambiguous query" as a duplicate.
Comment #8
longwaveMarked #993758: Node reference hidden for anonymus users as a duplicate.
Comment #9
shawn dearmond commentedYup, patch works. Thanks!
Comment #10
karens commentedThe D5 version is no longer being supported. Sorry.