I just wasted several hours trying to get the image gallery to work with node_privacy_byrole installed. I decided to report my experience so others don't have to go through the same process.

If you're getting "Unknown column 'n.nid' in 'on clause'" errors when you try to go to www.mysite.com/image (i.e., the image galleries), here are two patches that can help you out:

First get http://drupal.org/files/issues/taxonomy.module_16.patch (discussed http://drupal.org/node/49430).

Then get http://drupal.org/files/issues/image.module_13.patch (discussed in http://drupal.org/node/49433).

place these files in your module directory.

Then patch them:

patch -p0 taxonomy.module < taxonomy.module_16.patch

patch -p0 < image.module_13.patch

Thanks go to starbow (http://drupal.org/user/33290) for both of these patches, by the way.

The problem is that mysql 5 changed the syntax for database rewrites. I know that that developers are in the process of fixing it. I also know that there are other modules effected by this problem (e.g., event). So if you know of any other patches that work for 4.6.6., please pass on links to those patches here.

charles