PDA

View Full Version : Bug in build 373


pk4
10-03-2007, 05:28 PM
I updated to 373 last night, now i get this error on the tickets page:

DAO_Group(2566):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 ') ORDER BY t.name ASC' at line 1

The query in question is:
SELECT t.id , t.name, t.signature FROM team t WHERE t.id IN () ORDER BY t.name ASC

the getTeams($ids) function is being called with
$ids = array(0 => "") which breaks the SQL generation on line 2566

Here's a partial backtrace...
Array
(
[0] => Array
(
[file] => C:\wamp\www\cerb4\api\DAO.class.php
[line] => 2541
[function] => getTeams
[class] => DAO_Group
[type] => ::
[args] => Array
(
[0] => Array
(
[0] =>
)

)

)

[1] => Array
(
[file] => C:\wamp\www\cerb4\plugins\cerberusweb.core\classes .php
[line] => 402
[function] => getTeam
[class] => DAO_Group
[type] => ::
[args] => Array
(
[0] =>
)

)

[2] => Array
(
[file] => C:\wamp\www\cerb4\libs\devblocks\tmp\templates_c\% %7A^7AE^7AE2F24B%%border.php.php
[line] => 68
[function] => render
[class] => ChTicketsPage
[object] => ChTicketsPage Object
(
[manifest] => DevblocksExtensionManifest Object
(
[id] => core.page.tickets
[plugin_id] => cerberusweb.core
[point] => cerberusweb.page
[name] => Tickets Page
[file] => classes.php
[class] => ChTicketsPage
[params] => Array
(
[uri] => tickets
[title] => Mail
[menutitle] => mail
)

)

[instance_id] => 1
[id] => core.page.tickets
[params:private] => Array
(
)

[params_loaded:private] =>
)

[type] => ->
[args] => Array
(
)

)

[3] => Array
(
[file] => C:\wamp\www\cerb4\libs\devblocks\libs\smarty\Smart y.class.php
[line] => 1258
[args] => Array
(
[0] => C:\wamp\www\cerb4\libs\devblocks\tmp\templates_c\% %7A^7AE^7AE2F24B%%border.php.php
)

[function] => include
)

jstanden
10-03-2007, 06:12 PM
Hey there!

I'll see if Q/A can reproduce this -- I haven't had any luck. The stacktrace shows /cerb4/tickets/team/0 is being called directly.

If you go into /cerb4/config/workflow manually (by URL), do your Groups show up?

Does your worker still belong to any of them?

You could update from SVN again and run /cerb4/update, which will clear the local caches.

If none of that helps, let me know and we can keep troubleshooting.

Thanks!

jstanden
10-03-2007, 06:16 PM
Alright! A couple more guesses and I managed to get this to happen.

It still doesn't explain why your install was requesting blank teams, but I can make the code handle it more gracefully. I'll get a patch in SVN in a couple minutes.

Thanks!

jstanden
10-03-2007, 06:48 PM
Okay! Build 380:

* Fixed a bug where the 'tickets' menu shortcut of linking back to the last subsection would break on certain subsections (e.g., control panels) because they expected $_REQUEST arguments. Now the shortcut will only be remembered for workspaces and search.

* Locked down the Group control panels.

* API: Added a $worker->isTeamManager($team_id) method to help simplify ACL.


If you manually write your browser URL as:
/cerb4/tickets/workspaces

It should fix your issue. It seems it was trying to auto-remember the last section you used inside 'tickets' -- but when you used the Group Control Panel section there wasn't enough information to redraw the page (no group id). The other sections like search + workspaces persist their last state, so those are the sections which can still be shortcuts from 'tickets'.

Good find!

pk4
10-03-2007, 07:04 PM
That worked fine, thanks for the quick response!