From: SourceForge.net <no...@so...> - 2005-11-27 17:21:40
|
Bugs item #1366362, was opened at 2005-11-25 15:53 Message generated for change (Comment added) made by regis_glc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=554338&aid=1366362&group_id=78745 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: workflow Group: 1.2 RC2, no more RC1 please !!! >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Christian Lauinger (hustler77) Assigned to: regis leroy (regis_glc) Summary: Workflow issue: SQL error on empty group membership Initial Comment: Warning: mysqlt error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and gur.wf_account_type='g')) order by wf_procname ASC LIMIT 0 in query: select distinct(gp.wf_p_id), gp.wf_is_active, gp.wf_name as wf_procname, gp.wf_normalized_name as normalized_name, gp.wf_version as wf_version, gp.wf_version as version from egw_wf_processes gp INNER JOIN egw_wf_activities ga ON gp.wf_p_id=ga.wf_p_id INNER JOIN egw_wf_activity_roles gar ON gar.wf_activity_id=ga.wf_activity_id INNER JOIN egw_wf_roles gr ON gr.wf_role_id=gar.wf_role_id INNER JOIN egw_wf_user_roles gur ON gur.wf_role_id=gr.wf_role_id where gp.wf_is_active=?and ((gur.wf_user=? and gur.wf_account_type='u') or (gur.wf_user in () and gur.wf_account_type='g')) in /mnt/platte1/var/www/egroupware/workflow/inc/engine/src/common/Base.php on line 168 Warning: mysqlt error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and gur.wf_account_type='g')) LIMIT 0,1' at line 7 in query: select count(distinct(gp.wf_p_id)) from egw_wf_processes gp INNER JOIN egw_wf_activities ga ON gp.wf_p_id=ga.wf_p_id INNER JOIN egw_wf_activity_roles gar ON gar.wf_activity_id=ga.wf_activity_id INNER JOIN egw_wf_roles gr ON gr.wf_role_id=gar.wf_role_id INNER JOIN egw_wf_user_roles gur ON gur.wf_role_id=gr.wf_role_id where gp.wf_is_active=?and ((gur.wf_user=? and gur.wf_account_type='u') or (gur.wf_user in () and gur.wf_account_type='g')) in /mnt/platte1/var/www/egroupware/workflow/inc/engine/src/common/Base.php on line 168 they were some SQL errors in the database, please warn your sysadmin. ---------------------------------------------------------------------- >Comment By: regis leroy (regis_glc) Date: 2005-11-27 18:21 Message: Logged In: YES user_id=1225655 fixed in version 1.2.00.002 of the workflow app ---------------------------------------------------------------------- Comment By: regis leroy (regis_glc) Date: 2005-11-27 18:21 Message: Logged In: YES user_id=1225655 This bug is fixed in CVS now. You can update via CVS with the following commands: cd /var/www/html/egroupware # replace with your eGW install dir cvs update -dP To check if you have cvs availible (on most *nix system it's installed by default), try: cvs --version If that gives you a version-number, you have it installed. More infos about accessing CVS, see https://sourceforge.net/docman/display_doc.php?docid=14033&group_id=1 Be aware that the public cvs at sourceforge.net needs 24 hours to get synced with the developer cvs. If you can't update via CVS: our next packages will include this bugfix anyway. Thank you for your bug report! ---------------------------------------------------------------------- Comment By: regis leroy (regis_glc) Date: 2005-11-27 15:24 Message: Logged In: YES user_id=1225655 OK. Bug identified. * some more places in the GUI object should support failed SQL without crashing * most of the GUI SQL will fail if the current user has no group membership at all =>"gur.wf_user in ()". That means at least an easy way to workaround this bug is to have all you user in the Default group in egroupware (and one good thing would be all the workflow users in a workflow group, an easy way to manage acl). ---------------------------------------------------------------------- Comment By: Christian Lauinger (hustler77) Date: 2005-11-25 18:57 Message: Logged In: YES user_id=860001 no, doesn't work. if i click on global activities, this appears: Warning: mysqlt error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and gur.wf_account_type='g')) order by wf_procname asc LIMIT 0 in query: select distinct(gp.wf_p_id), gp.wf_is_active, gp.wf_name as wf_procname, gp.wf_normalized_name as normalized_name, gp.wf_version as wf_version, gp.wf_version as version from egw_wf_processes gp INNER JOIN egw_wf_activities ga ON gp.wf_p_id=ga.wf_p_id INNER JOIN egw_wf_activity_roles gar ON gar.wf_activity_id=ga.wf_activity_id INNER JOIN egw_wf_roles gr ON gr.wf_role_id=gar.wf_role_id INNER JOIN egw_wf_user_roles gur ON gur.wf_role_id=gr.wf_role_id where gp.wf_is_active=? and ((gur.wf_user=? and gur.wf_account_type='u') or (gur.wf_user in () and gur.wf_account_type='g') in /mnt/platte1/var/www/egroupware/workflow/inc/engine/src/common/Base.php on line 168 Warning: mysqlt error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and gur.wf_account_type='g')) LIMIT 0,1' at line 7 in query: select count(distinct(gp.wf_p_id)) from egw_wf_processes gp INNER JOIN egw_wf_activities ga ON gp.wf_p_id=ga.wf_p_id INNER JOIN egw_wf_activity_roles gar ON gar.wf_activity_id=ga.wf_activity_id INNER JOIN egw_wf_roles gr ON gr.wf_role_id=gar.wf_role_id INNER JOIN egw_wf_user_roles gur ON gur.wf_role_id=gr.wf_role_id where gp.wf_is_active=? and ((gur.wf_user=? and gur.wf_account_type='u') or (gur.wf_user in () and gur.wf_account_type='g')) in /mnt/platte1/var/www/egroupware/workflow/inc/engine/src/common/Base.php on line 168 Warning: mysqlt error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and gur.wf_account_type='g')) and ( ga.wf_type='standalone') in query: select distinct(ga.wf_name) from egw_wf_processes gp INNER JOIN egw_wf_activities ga ON gp.wf_p_id=ga.wf_p_id INNER JOIN egw_wf_activity_roles gar ON gar.wf_activity_id=ga.wf_activity_id INNER JOIN egw_wf_roles gr ON gr.wf_role_id=gar.wf_role_id INNER JOIN egw_wf_user_roles gur ON gur.wf_role_id=gr.wf_role_id where gp.wf_is_active=? and ((gur.wf_user=? and gur.wf_account_type='u') or (gur.wf_user in () and gur.wf_account_type='g')) and ( ga.wf_type='standalone') order by ga.wf_name asc in /mnt/platte1/var/www/egroupware/workflow/inc/engine/src/common/Base.php on line 168 Warning: mysqlt error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and gur.wf_account_type='g')) and ( ga.wf_type='standalone') in query: select count(distinct(ga.wf_name)) from egw_wf_processes gp INNER JOIN egw_wf_activities ga ON gp.wf_p_id=ga.wf_p_id INNER JOIN egw_wf_activity_roles gar ON gar.wf_activity_id=ga.wf_activity_id INNER JOIN egw_wf_roles gr ON gr.wf_role_id=gar.wf_role_id INNER JOIN egw_wf_user_roles gur ON gur.wf_role_id=gr.wf_role_id where gp.wf_is_active=? and ((gur.wf_user=? and gur.wf_account_type='u') or (gur.wf_user in () and gur.wf_account_type='g')) and ( ga.wf_type='standalone') in /mnt/platte1/var/www/egroupware/workflow/inc/engine/src/common/Base.php on line 168 Fatal error: Call to a member function on a non-object in /mnt/platte1/var/www/egroupware/workflow/inc/engine/src/GUI/GUI.php on line 269 ---------------------------------------------------------------------- Comment By: regis leroy (regis_glc) Date: 2005-11-25 17:13 Message: Logged In: YES user_id=1225655 OK, First thing I see is that we need a space between the 'where gp.wf_is_active=?' and the 'and...' I commited it to CVS. it's in workflow/engine/src/GUI/GUI.php, line 68 : diff -C2 -d -r1.22 -r1.23 *** GUI.php 19 Nov 2005 17:10:46 -0000 1.22 --- GUI.php 25 Nov 2005 16:08:34 -0000 1.23 *************** *** 66,70 **** // add group mapping, warning groups and user can have the same id $groups = galaxia_retrieve_user_groups($user); ! $mid .= "and ((gur.wf_user=? and gur.wf_account_type='u')"; $mid .= " or (gur.wf_user in (".implode(",",$groups).") and gur.wf_account_type='g'))"; $bindvars = array('y',$user); --- 66,70 ---- // add group mapping, warning groups and user can have the same id $groups = galaxia_retrieve_user_groups($user); ! $mid .= " and ((gur.wf_user=? and gur.wf_account_type='u')"; $mid .= " or (gur.wf_user in (".implode(",",$groups).") and gur.wf_account_type='g'))"; $bindvars = array('y',$user); Tell me if it works for you and I'll close the bug (the strange thing is that it does not cause a SQL bug for me, maybe depending on the MySQL version). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=554338&aid=1366362&group_id=78745 |