I am testing the nodeperm_role.module and I experienced an SQL error when node permissions are changed.
The problem is that the query in question uses "INNER JOIN {term_node} USING (tid)" but the db_rewrite_sql() function adds another inner join in front of this one so the USING clause breaks. My patch changes all the USING statements to ON to prevent this.
Perhaps the documentation for db_rewrite_sql() should be updated to warn against the use of the USING clause. I don't see any other instances of it in core but many contrib modules use it.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | nodeaccess_0.patch | 1.21 KB | chx |
| nodeaccess.patch | 1.21 KB | tangent |
Comments
Comment #1
chx commentedHandbook updated, thanks for warning. +1 on this.
Comment #2
tangent commentedCan we get this commited? It's a pretty critical error.
Comment #3
dries commentedThis block is no more.
Comment #4
(not verified) commented