OG ROLES module error on page "configure member roles"
user warning: Unknown table 'n' in on clause query: SELECT COUNT(*) FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid 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 = 0 AND na.realm = 'og_all') OR (na.gid = 18 AND na.realm = 'og_subscriber'))) AND ou.nid = 18 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
user warning: Unknown table 'n' in on clause query: SELECT u.uid, u.name, u.mail, u.picture, ou.* FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid 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 = 0 AND na.realm = 'og_all') OR (na.gid = 18 AND na.realm = 'og_subscriber'))) AND ou.nid = 18 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 ORDER BY u.name ASC LIMIT 0, 100 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
warning: Invalid argument supplied for foreach() in /home/smilodon/public_html/portaal7/modules/og/contrib/og_roles/og_roles.module on line 195.
I have no ide what this means.
Comments
Comment #1
webchickHm. I can't duplicate this here.
And you get this on no other page? And if you disable the og roles module it goes away? If just og and og roles are enabled, and no other contribs, do you still get this error? What version of PHP/MySQL are you using?
og roles doesn't seem to do either of these queries so I'm wondering where it's coming from.
Comment #2
smilodon commentedMySQL is 4 something
PHP Version 4.4.1
I disabled all other modules (not taxonomy, forum, content)and then i enabled og and og.roles...
?q=admin/settings/og_roles is displayng:
warning: Invalid argument supplied for foreach() in /home/smilodon/public_html/portaal7/modules/og/contrib/og_roles/og_roles.module on line 81.
This is a new error, it was not there, so i think i shouldnt have disabled the modules.
The link to page "configure member roles" is not there anymore.
Comment #3
smilodon commentedSorry, my bad, i didnt enable the basic og module...
After doing so, i got rid of the error i last mentioned...
And the first error as well... i enabled other modules 1 by 1... and didnt manage to get the first error again... weird !
Comment #4
webchickSo.. it's fixed...?
Comment #5
webchickK, marking fixed. Please feel free to re-open with more info if you are still experiencing this problem.
Comment #6
smilodon commentedOoo i refreshed all the og module files, i now have all my modules enabled and i got this:
user warning: Unknown table 'n' in on clause query: SELECT COUNT(*) FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = -1 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 0 AND na.realm = 'og_all') OR (na.gid = 18 AND na.realm = 'og_subscriber') OR (na.gid = 26 AND na.realm = 'og_subscriber') OR (na.gid = 0 AND na.realm = 'tac_lite'))) AND ou.nid = 26 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
user warning: Unknown table 'n' in on clause query: SELECT u.uid, u.name, u.mail, u.picture, ou.* FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = -1 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 0 AND na.realm = 'og_all') OR (na.gid = 18 AND na.realm = 'og_subscriber') OR (na.gid = 26 AND na.realm = 'og_subscriber') OR (na.gid = 0 AND na.realm = 'tac_lite'))) AND ou.nid = 26 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 ORDER BY u.name ASC LIMIT 0, 100 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
warning: Invalid argument supplied for foreach() in /home/smilodon/public_html/portaal7/modules/og/contrib/og_roles/og_roles.module on line 148.
user warning: Unknown table 'n' in on clause query: SELECT COUNT(*) FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = -1 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 0 AND na.realm = 'og_all') OR (na.gid = 18 AND na.realm = 'og_subscriber') OR (na.gid = 26 AND na.realm = 'og_subscriber') OR (na.gid = 0 AND na.realm = 'tac_lite'))) AND ou.nid = 26 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
user warning: Unknown table 'n' in on clause query: SELECT u.uid, u.name, u.mail, u.picture, ou.* FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = -1 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 0 AND na.realm = 'og_all') OR (na.gid = 18 AND na.realm = 'og_subscriber') OR (na.gid = 26 AND na.realm = 'og_subscriber') OR (na.gid = 0 AND na.realm = 'tac_lite'))) AND ou.nid = 26 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 ORDER BY u.name ASC LIMIT 0, 100 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
warning: Invalid argument supplied for foreach() in /home/smilodon/public_html/portaal7/modules/og/contrib/og_roles/og_roles.module on line 195.
So wtf is it ? I discovered, that it does not happen to the OG admin... the one who can administer groups etc. It happens to the group owner, the user who created the group and wants to access "configure member roles". Eaeven after disabling all the other modules i have, the group owner still had this error.
Comment #7
smilodon commentedOk going to test it meanly. I droped all drupal 4.7 tables. Created new ones, made admin account. Ok now enabled og, og_basic, og_block, og_block_visibility, og_roles. At settings enabling the og access thingy. Created 2 roles. And under roles settings i put them to "assignable roles".
Creating a new test account (not admin) and giving "create groups" permission to authenticated users. Enabling all the group related blocks. And logging in with test account. Ok now creating one group and going to look "1 subscriber" subscribers.
Now pressing button "configure member roles" and what do i see ?
user warning: Unknown table 'n' in on clause query: SELECT COUNT(*) FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid 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 = 0 AND na.realm = 'og_all') OR (na.gid = 1 AND na.realm = 'og_subscriber'))) AND ou.nid = 1 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
user warning: Unknown table 'n' in on clause query: SELECT u.uid, u.name, u.mail, u.picture, ou.* FROM og_uid ou INNER JOIN users u ON ou.uid = u.uid 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 = 0 AND na.realm = 'og_all') OR (na.gid = 1 AND na.realm = 'og_subscriber'))) AND ou.nid = 1 AND u.status > 0 AND is_active >= 0 AND is_admin >= 0 ORDER BY u.name ASC LIMIT 0, 100 in /home/smilodon/public_html/portaal7/includes/database.mysql.inc on line 120.
warning: Invalid argument supplied for foreach() in /home/smilodon/public_html/portaal7/modules/og/contrib/og_roles/og_roles.module on line 195.
This should be fixed, i have no idea where this error might have come.
Comment #8
webchickAwesome, thanks for the detailed bug report. This has now been fixed in both HEAD and 4.7.
Comment #9
smilodon commentedGood to hear that i could be helpful :)
Comment #10
webchickComment #11
webchickComment #12
(not verified) commented