Author Topic: SQL error in Task Module  (Read 1178 times)

HDready

  • Freshman
  • *
  • Posts: 40
    • View Profile
SQL error in Task Module
« on: September 03, 2016, 09:01:41 AM »
Hi,
I just upgraded from 2.7 to 3.4, and the task module seems broken.
I have an SQL error :

Error (DBQueryError)
Query failed with message 'Undeclared variable: R3918436251'
Error params:
File:    /home/hdreadyg/www/projets/environment/library/database/adapters/AbstractDBAdapter.class.php
Line:    395
Sql:    SELECT e.*,o.* FROM fo_objects o INNER JOIN fo_project_tasks e ON e.object_id = o.id LEFT JOIN `fo_object_members` `jt` ON `e`.`object_id` = `jt`.`object_id` LEFT JOIN `fo_members` `jtm` ON `jt`.`member_id` = `jtm`.`id` AND `jtm`.`dimension_id` = 1 AND `jt`.`is_optimization` = 0 WHERE true AND (EXISTS (SELECT om.object_id FROM fo_object_members om WHERE om.member_id IN (387) AND o.id = om.object_id GROUP BY object_id HAVING count(member_id) = 1 )) AND o.object_type_id = 5 AND `o`.`trashed_on` = '0000-00-00 00:00:00' AND `o`.`archived_on` = '0000-00-00 00:00:00' AND `e`.`is_template` = 0 GROUP BY `e`.`object_id` HAVING SUM(`jtm`.`dimension_id`) is null ORDER BY priority DESC LIMIT R3918436251 , 15
Error number:    1327
Error message:    Undeclared variable: R3918436251
Backtrace:
#0 /home/hdreadyg/www/projets/environment/library/database/adapters/AbstractDBAdapter.class.php(313): AbstractDBAdapter->prepareAndExecute('\n\t\t\t\tSELECT e....', NULL)
#1 /home/hdreadyg/www/projets/environment/library/database/DB.class.php(213): AbstractDBAdapter->executeAll('\n\t\t\t\tSELECT e....', NULL)
#2 /home/hdreadyg/www/projets/application/models/ContentDataObjects.class.php(646): DB::executeAll('\n\t\t\t\tSELECT e....')
#3 /home/hdreadyg/www/projets/application/controllers/TaskController.class.php(1836): ContentDataObjects->listing(Array)
#4 /home/hdreadyg/www/projets/application/controllers/TaskController.class.php(1728): TaskController->getTasksInGroup('AND `e`.`is_tem...', 'R3918436251', '15', Array, ' `e`.`object_id...')
#5 /home/hdreadyg/www/projets/application/controllers/TaskController.class.php(1921): TaskController->getDimensionGroups(1, 'AND `e`.`is_tem...', Array, '')
#6 /home/hdreadyg/www/projets/application/controllers/TaskController.class.php(1969): TaskController->getGroups('dimension_1', 'AND `e`.`is_tem...', Array)
#7 /home/hdreadyg/www/projets/environment/classes/controller/Controller.class.php(76): TaskController->get_tasks_groups_list()
#8 /home/hdreadyg/www/projets/environment/classes/controller/PageController.class.php(62): Controller->execute('get_tasks_group...')
#9 /home/hdreadyg/www/projets/environment/classes/Env.class.php(133): PageController->execute('get_tasks_group...')
#10 /home/hdreadyg/www/projets/init.php(177): Env::executeAction('task', 'get_tasks_group...')
#11 /home/hdreadyg/www/projets/index.php(7): require('/home/hdreadyg/...')
#12 {main}
Autoglobal varibles:
$_GET:    Array (
  ['context'] => (string) '{"1":[0,387],"2":[0]}'
  ['currentdimension'] => (string) '1'
  ['ajax'] => (string) 'true'
  ['c'] => (string) 'task'
  ['a'] => (string) 'get_tasks_groups_list'
  ['current'] => (string) 'tasks-panel'
)
$_POST:    Array (
  ['status'] => (string) '2'
  ['filter'] => (string) 'no_filter'
  ['fval'] => (string) ''
  ['tasksGroupBy'] => (string) 'dimension_1'
  ['tasksOrderBy'] => (string) 'priority'
)
$_COOKIE:    Array (
  ['startBAK'] => (string) 'R3415748110'
  ['start'] => (string) 'R3918436251'
  ['PHPSESSID'] => (string) 'emo4ng9ps0j6sbnbain2prj017'
  ['http___projets_hdready_graphic_frid'] => (string) '1'
  ['http___projets_hdready_graphic_frtoken'] => (string) 'f825971b3a5c7958754812120ec89f58838e8769'
)
$_SESSION:    Array (
  ['last_activity_mod_timestamp'] => (int)1472903362
)

So I am not able to use Feng Office at this time, the problem is pretty urgent :/
The variable is in the global $_COOKIE, I tried toi delete cookies without success :(

Thanks for your help.
Greg

HDready

  • Freshman
  • *
  • Posts: 40
    • View Profile
Re: SQL error in Task Module
« Reply #1 on: September 04, 2016, 04:02:46 PM »
Ok, after some tests I managed to make it work like this :
in application/controllers/TaskController.class.php
At line 1693 and 1728, I have change the variable $start with 0. The variable is returning a session variable, seems like a bug :/
I don't know if my change could have side effect, but it seems pretty safe.

natalia.martinez

  • Administrator
  • Jr. Member
  • *****
  • Posts: 69
    • View Profile
Re: SQL error in Task Module
« Reply #2 on: September 13, 2016, 11:54:01 AM »
Hi HDready,

This seems to be an issue with the browser cache, apparently with the session variables.
You can try refreshing your browser or opening Feng Office in another browser when this occurs.

Regards,
Natalia

 

anything