Mysql 5.0.12 and up has changed the join semantics slightly. This patch fixes 4 places where the use of db_rewrite_sql is generating the errors: "Unknown column 'n.nid' in 'on clause'" and "Column 'nid' in from clause is ambiguous".

For more info see: http://drupal.org/node/43735#comment-92865

CommentFileSizeAuthor
event.module_24.patch3.44 KBstarbow

Comments

starbow’s picture

I should have mentioned that the errors are only thrown when event is used in conjunction with the node_access_by_role module (and possibily other node access control modules).

dnagirl’s picture

this bug also affects the simple_access module. Since drupal's search engine is a bit arcane, I ended up asking for help over at Dev Shed. Their solution is here.

Cheers,
Jennifer

dww’s picture

the solution they describe at Dev Shed is exactly what starbow's patch already does. ;) and yes, as his original comment indicated, this bug effects any node access modules. my site is using simple_access. i applied his patch, and everything is now working fine. there are similar bugs in the image, taxonomy and project modules, and either starbow or i have submitted patches to each of them.

enjoy,
-derek

killes@www.drop.org’s picture

Status: Needs review » Fixed

Thanks, I've applied the patch to the 4.6 and HEAD. 4.7 will get in when I do a merge from head.

Anonymous’s picture

Status: Fixed » Closed (fixed)