I now show 29 "Administration" links for all the forum I have set to moderate. And it is consistently 29.
If I set the forums to not be moderated they disappear. I would set all to not be moderated, but the bots keep posting links to porn, fishing, etc. sites. And this being a business related forum, I'd like to stop these posts before they get seen by the public. I also want to allow anonymous posting as this is a tech support forum as well.
Hmm, sounds like the DB update script might have a problem or to... You may need to "splunck" thru the DB a little. This list of groups should be coming from the query:
ForumModel.getModeratorList = SELECT g.group_id AS id, g.group_name AS name \
FROM jforum_groups g, jforum_roles r, jforum_role_values rv, jforum_roles r2 \
WHERE g.group_id = r.group_id \
AND r.role_id = rv.role_id \
AND r.name = 'perm_moderation_forums' \
AND rv.role_value = ? \
AND r2.name = 'perm_moderation' \
AND r2.group_id = g.group_id
Where the ? is the forum_id number. If this is returning the 29 "Adminstration" entries, you'll need to look at where the duplicate entries are.
Note, this is the generic query... there may be a custom query for this if your DB is not MySQL.. check the sql file in your db config directory to be sure.
There is file postgresql.sql located in WEB-INF/config/database/postgresql, When I search for ForumModel this query does not exist there. however, it does exist in the generic_queries.sql located in WEB-INF/config/database/generic. When I run it I returns 1 row.
Any ideas to where else we can look?
John [originally posted on jforum.net by John4randr]
Hmm, interesting since the code for GenericForumDAO (which Postgres uses) should execute that query once and create the moderator list from it's results.
Are you using the templates that came with the distribution or ones modified from the old version? I seem to remember there was a change a while to only list moderator groups and not the specific users. The old templates might be trying to do this incorrectly.
As to the DB records... it depends on the values in them. The jforum_roles table should have one entry for the each permission and group id. There should not be any duplicates of these two items. E.g., if the admin group id is 1, a select * from jforum_roles where group_id = 1 should return a set of different permission names. There should not be any duplicate names.
In the role_values, there should only be an entry for each moderated forum with the role_id equal to the admin group / 'perm_moderation'. The "role_value" field in this case is the forum_id.
I guess it would be a good thing to check the jforum_groups table to make sure there is only a single Administration entry as well and that the user_groups table has the correct entries for the user_id and group_id. E.g., the user_id and group_id fields should not have multiple entries.
A far reaching check would be to also verify that the jforum_forums table only has a single entry for each forum.
Thats all I can think of right now. [originally posted on jforum.net by monroe]