[kronolith] kronolith create calendar - throws sql error

Jamie ffolliott systems at inline.net
Sun Apr 24 10:48:33 PDT 2005


Kronolith 2.0.3 RC1 (also with 2.0.2)
I get this error logged in horde.log when I go to My Calendars, and Create
one:

Apr 24 12:37:48 HORDE [error] [kronolith] DB Error: syntax error: SELECT
c.datatree_id, c.datatree_name FROM horde_datatree c LEFT JOIN
horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id WHERE
c.group_uid = 'horde.shares.kronolith' AND ((a1.attribute_name = 'owner' AND
a1.attribute_value = '[user]') OR (a1.attribute_name = 'perm_users' AND
a1.attribute_key = '[user]' AND a1.attribute_value & 2) OR
(a1.attribute_name = 'perm_creator' AND a1.attribute_value & 2) OR
(a1.attribute_name = 'perm_default' AND a1.attribute_value & 2))   GROUP BY
c.datatree_id, c.datatree_name, c.datatree_order ORDER BY c.datatree_order,
c.datatree_name, c.datatree_id [nativecode=170 - Line 1: Incorrect syntax
near ')'.] [on line 987 of
"C:\data\clients\webmail\htdocs\horde\lib\Horde\DataTree\sql.php"]

Apr 24 12:37:48 HORDE [error] [kronolith] DB Error: syntax error: SELECT
c.datatree_id, c.datatree_name FROM horde_datatree c LEFT JOIN
horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id WHERE
c.group_uid = 'horde.shares.kronolith' AND ((a1.attribute_name = 'owner' AND
a1.attribute_value = '[user]') OR (a1.attribute_name = 'perm_users' AND
a1.attribute_key = '[user]' AND a1.attribute_value & 2) OR
(a1.attribute_name = 'perm_creator' AND a1.attribute_value & 2) OR
(a1.attribute_name = 'perm_default' AND a1.attribute_value & 2))   GROUP BY
c.datatree_id, c.datatree_name, c.datatree_order ORDER BY c.datatree_order,
c.datatree_name, c.datatree_id [nativecode=170 - Line 1: Incorrect syntax
near ')'.] [on line 645 of
"C:\data\clients\webmail\htdocs\horde\kronolith\lib\Kronolith.php"]

This shows up as "DB Error: unknown error" to the user.  I've got a DataTree
backend setup using SQL Database (mssql2k server).

The trouble here is invalid sql.  The a1.attribute_value is type text, which
cannot be converted to int to do the above bitwise and expression
(a1.attribute_value & 2).  I changed the type to varchar(7500), the largest
possible varchar for this table, that solves the sql error.

Now my problem is it says the calendar has been created, but doesn't show up
in the list of "my calendars".

I see the rows in the Datatree tables, with lots of duplicates from a single
"create" click, anyone see the trouble here?

horde_datatree:
36 horde.shares.kronolith [user] [user]  NULL NULL 0 0x0000000000000145
37 horde.shares.kronolith [user] [user]  NULL NULL 0 0x0000000000000148
38 horde.shares.kronolith [user] [user]  NULL NULL 0 0x000000000000014B
39 horde.shares.kronolith [user] e17ce6fae232a36fdf75424624c6695a  NULL NULL
0 0x000000000000014E
40 horde.shares.kronolith [user] [user]  NULL NULL 0 0x0000000000000151

horde_datatree_attributes:
36 owner  [user]
36 name  [user]'s Calendar
36 perm_users [user] 30
37 owner  [user]
37 name  [user]'s Calendar
37 perm_users [user] 30
38 owner  [user]
38 name  [user]'s Calendar
38 perm_users [user] 30
39 owner  [user]
39 name  Jamie
39 desc  bizness
39 perm_users [user] 30
40 owner  [user]
40 name  [user]'s Calendar
40 perm_users [user] 30






More information about the kronolith mailing list