Hello,

This seems like a great module idea. Thanks for that. However, I have spent the last few hours trying everything I know of to get this to work...

I started with just trying the "Who's New" block. When I am logged in as admin I can see the block just fine. However, when I log in as a normal authenticated user or as any otgher role (including anon access) the block will not appear. Since there is no permission settings for the module I am not sure what I have to do to make this work for others not admins.

Anyu thoughts on how I can fix this to work?

Thanks much,

Dave

Comments

roopletheme’s picture

My best guess is that you've got an access rights config issue with imagecache. Did you enable access to the imagecache preset that you're applying to the user pictures?

Oddly enough, I can't get it to fail for anon users even if I turn off these rights and flush the cache.

ldway’s picture

I have found the exact permission that is causing this...

Under the "node module" permissions section the permission of "Administer Nodes" is toggling the display on and off for any role. Obviously I would not want to give other users this permission so still cannot figure out what to do.

>> "Did you enable access to the imagecache preset that you're applying to the user pictures?"

I am not sure what you are saying here... I find no individual permission settings for the individual presets defined.

Any ideas?

roopletheme’s picture

Status: Active » Postponed (maintainer needs more info)

I'm stumped. Can you give me some details about what modules (and what versions) you are running?

ldway’s picture

Sent ya a private email

Dave

kingster12’s picture

Error report

This module in my opinion rivals many of the best essential modules drupal developers have to offer. Nothing says community website like operational avatar effects.

I have read the dialog that was written so far on this issue & I am having the same problem. The following message is showing up on the error report at the top of the screen.

user warning: Unknown table 'n' in on clause query: SELECT uid,name,picture FROM slcommunityusers INNER JOIN slcommunitynode_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'ogr_access') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 39 AND na.realm = 'og_admin'))) AND ( uid > 0 AND access > 0 AND picture <> "" ) ORDER BY created DESC LIMIT 0, 5 in /home/content/?/?/?/databasename/siteroot/foldername/drupalfolder/includes/database.mysql.inc on line 172.

When I went to the database there were many errors as simple as mispellings of the word 'error'. I don't know how much this matters. If there aren't any errors I don't know if anyone cares. However on the database.inc file there is a primary table = 'n'. I don't know what this makes reference to but it is the only thing I found that remotely looked like the unknown table that was being referenced.

I actually shut down imagecache and all the modules that came with it and tried to run Avatar Blocks without any of them. It still showed up while I was an administrator. As soon as I logged out, the same error message came up. Once I deactivated the Avatar Blocks module, the error message above ceased.

Hope this helps to start pinpointing the problem.

roopletheme’s picture

Don't know about your situation, but I can tell you what's happened with ldway's site. He was kind enough to contact me directly and work with me to understand his problem.

His site is running OG, OG Access, Secure Pages, and several other modules. In trying to duplicate his issue, I set up a demo site and started installing the modules that he had installed. I ran into problems when I activated the OG Access module. We were both seeing SQL errors along the lines of:

user warning: Unknown column 'n.nid' in 'on clause' query: SELECT uid,name,picture FROM users INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all'))) AND ( uid > 0 AND access > 0 AND picture <> "" ) ORDER BY created DESC LIMIT 0, 10 in /var/bgiggled/includes/database.mysqli.inc on line 154.

and

user warning: Unknown column 'n.nid' in 'on clause' query: SELECT uid,name,picture FROM users INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 19 AND na.realm = 'ogr_access') OR (na.gid = 17 AND na.realm = 'ogr_access') OR (na.gid = 33 AND na.realm = 'ogr_access') OR (na.gid = 18 AND na.realm = 'ogr_access'))) AND ( uid > 0 AND access > 0 AND picture <> "" ) ORDER BY created DESC LIMIT 0, 10 in /var/bgiggled/includes/database.mysqli.inc on line 154.

I did some digging around and found this post:

http://drupal.org/node/51850

The very last comment led me to this post:

http://drupal.org/node/250615

and the very last comment of that post led me to the solution. I was pretty sure that the issue was with the permissions table, but rebuilding the table from admin/content/node-settings did not clear things up. This post suggested that using the Devel module's option to reinstall the system module solved a similar problem. I tried this on my test site (after all, it was only a test site), and it resolved the problem. I forwarded this info to ldway, who tried the same thing on his site and reported that it solved his problem also.

I strongly recommend that you backup your database before attempting this. It had no negative impact on my test site, and to my knowledge, it had no negative impact on ldway's site. But I'd never do something like this without first backing everything up.

roopletheme’s picture

Upon further investigation, I think that this might be related to my use of db_rewrite_sql. After looking into #290760: db_rewrite_sql cases SQL warning, I eliminated the call from the module and released 1.2. Any feedback will be greatly appreciated.

pniraj007’s picture

Assigned: Unassigned » pniraj007

Hi,
I am also facing this Error and block is only displayed on admin part. Users are not able to view it..

""user warning: Unknown table 'n' in on clause query: SELECT uid,name,picture FROM users INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 3563 AND na.realm = 'og_subscriber'))) AND ( uid > 0 AND access > 0 AND uid IN (571) ) ORDER BY created DESC LIMIT 0, 10 in /home/niraj007/public_html/includes/database.mysql.inc on line 172.""

Please do give solution as soon as possible. We need to use this in our site.

Thanks.

roopletheme’s picture

@pniraj007: Have you upgraded to version 1.2?