Loading

[FIXED] Help! Accordion lost in dashboard

Get help with problems, or report & discuss bugs in Collabtive

Re: Help! Accordion lost in dashboard

Postby gwolf » 17.10.2014, 21:33

Sorry for disappearing from the thread for so long!

I tried to apply Remiguel's patch, and yes, the tasks and calendar tabs appeared... But they were empty. So, I tried to dig in a bit deeper. Looked at my Apache log messages, and...

... Frankly, I cannot understand what does this mean :-| Or rather, how come this works for all of you and fails for me!

When I load index.php, I get the following errors:

Code: Select all
[Fri Oct 17 14:16:56 2014] [error] [client 132.248.72.141] PHP Warning:  PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1463 Non-grouping field 'user' is used in HAVING clause in /usr/share/collabtive/www/include/class.task.php on line 380
[Fri Oct 17 14:16:56 2014] [error] [client 132.248.72.141] PHP Warning:  PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1463 Non-grouping field 'user' is used in HAVING clause in /usr/share/collabtive/www/include/class.task.php on line 380
[Fri Oct 17 14:16:57 2014] [error] [client 132.248.72.141] File does not exist: /usr/share/collabtive/www/include/js/tiny_mce/langs/es.js, referer: http://proyectos.iiec.unam.mx/collabtive/index.php
[Fri Oct 17 14:16:57 2014] [error] [client 132.248.72.141] File does not exist: /usr/share/collabtive/www/include/js/tiny_mce/themes/advanced/langs/es.js, referer: http://proyectos.iiec.unam.mx/collabtive/index.php


If I do the workaround Remiguel suggested (or your variation), I get lines similar to those, but tens of times. OK, time to dig in a bit further. Please note that my lines' numbering are a bit off, as I have applied this pending pull request: https://github.com/philippK-de/Collabtive/pull/44

Now, according to MySQL documentation (and to the error messages I'm seeing), HAVING can only occur in queries where there is a GROUP BY — And that's not the case in any of the queries currently used!

I tried blindly replacing all of the HAVING by AND in www/include/class.*.php, and the tabs appeared — The "tasks" tab shows the information correctly, but the "calendar" is still empty. And new error messages show up in my log — Several repetitions of:

Code: Select all
[Fri Oct 17 14:23:39 2014] [error] [client 132.248.72.141] PHP Warning:  PDO::query(): SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous in /usr/share/collabtive/www/include/class.milestone.php on line 542, referer: http://proyectos.iiec.unam.mx/collabtive/
[Fri Oct 17 14:23:39 2014] [error] [client 132.248.72.141] PHP Warning:  PDO::query(): SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous in /usr/share/collabtive/www/include/class.task.php on line 518, referer: http://proyectos.iiec.unam.mx/collabtive/


Again, I'm patching here almost-blindly, but I edited the milestone and task classes, qualifying the mentioned columns with their table name (as well as some other columns, mentioned later on in the same file)

So... Well, this post ended up being too long already. I did many changes blindly; I frankly don't understand the reason for using "HAVING", and am probably messing something up somewhere. I can give you the diff I have, but it smells not right.

But then again, the dashboard works!

What should I do?
gwolf
 
Posts: 43
Joined: 17.08.2010, 20:09

Re: Help! Accordion lost in dashboard

Postby Philipp » 18.10.2014, 01:19

This sounds like mysql changed the behaviour/constraints of HAVING in one of their newer releases.
This code (the calendar) was written a long time ago. Probably needs some refactoring.

I will look into it deeper.
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: Help! Accordion lost in dashboard

Postby gwolf » 22.10.2014, 03:47

FWIW, and just to keep all information coherent: I have created a pull request for this issue on Github: https://github.com/philippK-de/Collabtive/pull/57
gwolf
 
Posts: 43
Joined: 17.08.2010, 20:09

Re: Help! Accordion lost in dashboard

Postby Philipp » 23.10.2014, 12:14

I fixed both of these issues...
the ambigous field comes from specifyng end and not tasks.end for example.

also i fixed the missing group by clause

see
https://github.com/philippK-de/Collabti ... 6f1e48f5a7

also this will enable sqlite support :)
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Previous

Return to Problems and Bugs

Who is online

Users browsing this forum: No registered users