Issue Details (XML | Word | Printable)

Key: GWMON-31
Type: Bug Bug
Status: Resolved
Resolution: Fixed
Priority: Standard Standard
Assignee: Richard Barry-Smith
Reporter: Bas Couwenberg
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
GroundWork Monitor Open Source

Deleting a user throws an error because the table guava.roles_defaultdashboards doesn't exist

Created: 15/Apr/08 08:01 AM   Updated: 21/May/08 12:46 PM
Component/s: Guava
Affects Version/s: None
Fix Version/s: None

Environment:
OS: CentOS 5
MySQL: 5.0.22-2.2.el5_1.1
GWMCE: 5.2.0


 Description  « Hide
Deleting a user in GWMCE is impossible, an error is thrown when you try to delete a user:

An Error Has Occurred
The attempted response is below
<br />
<b>Fatal error</b>: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1146: Table 'guava.roles_defaultdashboards' doesn't exist] in EXECUTE("SELECT name FROM guava_roles WHERE role_id IN (select role_id from roles_defaultdashboards where dashboard_id IN (select id from dashboard where uid=11))")
' in /usr/local/groundwork/guava/adodb/adodb-exceptions.inc.php:78
Stack trace:
#0 /usr/local/groundwork/guava/adodb/adodb.inc.php(886): adodb_throw('mysql', 'EXECUTE', 1146, 'Table 'guava.ro...', 'SELECT name FRO...', false, Object(ADODB_mysql))
#1 /usr/local/groundwork/guava/adodb/adodb.inc.php(861): ADOConnection->_Execute('SELECT name FRO...', false)
#2 /usr/local/groundwork/guava/packages/guava/support/usermanagement.inc.php(313): ADOConnection->Execute('SELECT name FRO...')
#3 /usr/local/groundwork/guava/includes/button.inc.php(154): GuavaUserManagement->deleteUserHandler(Object(Button))
#4 /usr/local/groundwork/guava/includes/button.inc.php(128): Button->Invoke()
#5 /usr/local/groundwork/guava/includes/guava.inc.php in <b>/usr/local/groundwork/guava/adodb/adodb-exceptions.inc.php</b> on line <b>78</b><br />


Tables in database guava:

mysql> use guava
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-------------------------+
| Tables_in_guava |
+-------------------------+
| guava_group_assignments |
| guava_groups |
| guava_packages |
| guava_preferences |
| guava_qolt |
| guava_role_assignments |
| guava_roles |
| guava_roleviews |
| guava_schema |
| guava_sysmodules |
| guava_theme_modules |
| guava_themes |
| guava_users |
| guava_views |
+-------------------------+
14 rows in set (0.00 sec)




 All   Comments   Change History      Sort Order:
Richard Barry-Smith added a comment - 15/Apr/08 05:26 PM
Another good find!

I will forward this information on to the developer;

Thanks for your help

Richard

Bas Couwenberg added a comment - 16/Apr/08 02:18 AM
I fixed this issue by commenting out the code in question in /usr/local/groundwork/guava/packages/guava/support/usermanagement.inc.php:

    309 #$query = "SELECT name " .
    310 # "FROM guava_roles " .
    311 # "WHERE role_id IN (select role_id from roles_defaultdashboards where dashboard_id IN (select id from dashboard where uid=" . $this->user_id . "))";
    312 #
    313 #$result = $guava->dbConnection->Execute($query);
    314 #
    315 #$warningMessage = "The ownership of the default dashboards for the following Roles has been reassig ned to the user 'admin': ";
    316 #
    317 #$showError=false;
    318 #
    319 #while(!$result->EOF){
    320 # $showError=true;
    321 # $warningMessage = $warningMessage . "--" . $result->fields['name'];
    322 # $result->MoveNext();
    323 #
    324 #}
    325 #$err = new ErrorDialog($warningMessage);
    326 #if($showError == true){
    327 # $err->show();
    328 #}

I can now delete users again in GWMCE which doesn't have the dashboard functionality of the Professional and Enterprise Editions.

Richard Barry-Smith added a comment - 21/May/08 12:46 PM
This issue has been resolved-fixed in the latest release 5.2.1. This release was posted on to SourceForge today.