SQL Syntax error

anarchman - October 2, 2008 - 23:22
Project:Workflow Owner
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Page full of errors when enabling this module:

* warning: implode() [function.implode]: Invalid arguments passed in C:\web\xampp\htdocs\drupal-5.7\sites\all\modules\workflow_owner\workflow_owner.module on line 136.
* user warning: 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 ') OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('s%') LIMIT 0, 10' at line 1 query: SELECT u.name FROM users u LEFT JOIN users_roles ur ON u.uid = ur.uid WHERE ( ur.rid IN() OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('s%') LIMIT 0, 10 in C:\web\xampp\htdocs\drupal-5.7\includes\database.mysql.inc on line 172.
* user warning: 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 ') OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('sr%') LIMIT 0, 10' at line 1 query: SELECT u.name FROM users u LEFT JOIN users_roles ur ON u.uid = ur.uid WHERE ( ur.rid IN() OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('sr%') LIMIT 0, 10 in C:\web\xampp\htdocs\drupal-5.7\includes\database.mysql.inc on line 172.
* user warning: 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 ') OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('sr5151%') LIMIT 0, 10' at line 1 query: SELECT u.name FROM users u LEFT JOIN users_roles ur ON u.uid = ur.uid WHERE ( ur.rid IN() OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('sr5151%') LIMIT 0, 10 in C:\web\xampp\htdocs\drupal-5.7\includes\database.mysql.inc on line 172.
* user warning: 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 ') OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('1%') LIMIT 0, 10' at line 1 query: SELECT u.name FROM users u LEFT JOIN users_roles ur ON u.uid = ur.uid WHERE ( ur.rid IN() OR u.uid = 1 ) AND LOWER(name) LIKE LOWER('1%') LIMIT 0, 10 in C:\web\xampp\htdocs\drupal-5.7\includes\database.mysql.inc on line 172.

#1

indianroo - December 15, 2008 - 09:58

This is happening because you have created the workflow but not assigned any roles to it.

When you try to set the default owner for the state, the autocompletion looks for users with one of the assigned roles to a workflow, but doesn't check if the set of valid roles is empty.

It looks like the error is harmless, but I will try to work out a fix.

#2

anarchman - December 16, 2008 - 01:29

Just to follow up, Workflow Owner was completely breaking workflow module, so I had to uninstall it: http://drupal.org/node/254355

#3

indianroo - December 16, 2008 - 02:30

Yes, I almost reached that point. But if you look at the last comment in the issue you reference, you will see
a fix for that and then it seems to work ok.

 
 

Drupal is a registered trademark of Dries Buytaert.