File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Unknown table jforum_role_values error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Unknown table jforum_role_values error" Watch "Unknown table jforum_role_values error" New topic
Author

Unknown table jforum_role_values error

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I get the following error when updating group permissions. Looking at my tables in mysql, the jforum_role_values table does exist, but for some reason jforum doesn't see it. Any ideas?

An error has occurred.

For detailed error information, please see the HTML source code, and contact the forum Administrator.

Unknown table 'jforum_role_values' in MULTI DELETE

Query being executed when exception was thrown:

DELETE jforum_role_values FROM jforum_role_values rv, jforum_roles r WHERE r.role_id = rv.role_id AND r.group_id = 95
[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Nevermind this for now, I'm working through reverse engineering the "roles" tables. I'm sure I'll have some more specific questions soon.

Thanks,
Jeff
[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
OK, so basically, the jforum_roles table defines:

role_id: Foreign key to role_values table
group_id: the group the role pertains to.
role_name: the role

the jforum_role_values defines:
role_id: Foreign key to roles table.
role_value: Usually the ID of a forum (but of a category for rows pertaining to the perm_category role), indicates which forum the specified group (from the roles table) has the role of role_name (from the roles table) on.

If no row exists in the role_values table for a role_id in the roles table, then the group specified in the roles table (role_name) has the specified role for all forums.

The only one I'm not quite clear on is the perm_categories role. I set a group to Allow_All for the Restricted Categories permission, and JForum still entered role_value entries for the group in the role_values table. Is that correct behavior?

Anything else I need to watch out for when programatically updating the roles tables?

Thanks,
jeff
[originally posted on jforum.net by netbracketsJeff]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
This happens because MySQL AB can't maintain backward compatibility between its releases. There is always a piece of MySQL Database / Connector-J that crashes depending the confguration you're using.

Please look for the .sql files in the WEB-INF/config/database/mysql directory. There are a version of the query that should work.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unknown table jforum_role_values error
 
Similar Threads
Help Attachments
Oops. Got in trouble upgration from 2.0 to 2.1.4
Unable to turn on the attachment button
Error saving group permissions
Error setting permission on a group.