[kronolith] CSV import not working

Florin Andrei florin at sgi.com
Tue Jul 8 15:17:36 PDT 2003


I'm having trouble importing data from a CSV file.
I'm running Kronolith-1.1, Horde-2.2.3, PHP-4.2.3, Apache-1.3.27 and
MySQL-3.23.42 on SGI Irix 6.5.
I'm using MySQL as a backend for pretty much everything in Horde and
Kronolith. Only logging is performed via syslog.
Kronolith seems to work well, i can add events, edit them, delete, etc.
However, importing from CSV does not work.

I attached to this message the CSV file that i'm trying to import. It
was generated (i think) on a Windows system, probably using Microsoft
Project.

In Kronolith, i go to Import/Export. Browse and select the file. Click
on the "first row contain field names" checkbox. Click on Import.

On the next page, i select the following matching fields:
System - Title
Owner - Description
Start Date - Start Date
Then click on Import.

On the next page i get this:
"Notice: Undefined index: Start Date in
/data/www/horde/templates/data/datemap.inc on line 20
Imported field:"

I don't change anything on this page, and click on Import. No error
shows up, and i get to the next page, which says "CSV file successfully
imported". But that's not true. No event shows in the calendar at the
expected date.
The logs (turned DEBUG on) show these events when i click the last time
on Import:

###################################################
Jul  8 15:14:06 7F:spartacus HORDE[24552949]: [kronolith] SQL Query by
SessionHandler_mysql::read(): query = "SELECT session_data FROM
horde_sessionhandler WHERE session_id =
'a7084531f3433b1c592dbe0bf6fd4a07' AND session_lastmodified >
1057701006" [on line 111 of
"/data/www/horde/lib/SessionHandler/mysql.php"]
Jul  8 22:14:06 7F:spartacus HORDE[24552949]: [kronolith] SQL event
store by snic: table = kronolith_events; query = "INSERT INTO
kronolith_events (event_id, event_title, event_description,
event_category, event_location, event_keywords, event_exceptions,
event_modified, event_start, event_end, event_alarm, event_recurtype,
calendar_id)values (719,'Build in
red','jm',0,'','','',1057702446,'1970-01-01 00:00:00','1970-01-01
00:00:00',0,0,'snic')" [on line 197 of
"/data/www/horde/kronolith/lib/Driver/sql.php"]
Jul  8 22:14:06 7F:spartacus HORDE[24552949]: [kronolith] SQL event
store by snic: table = kronolith_events; query = "INSERT INTO
kronolith_events (event_id, event_title, event_description,
event_category, event_location, event_keywords, event_exceptions,
event_modified, event_start, event_end, event_alarm, event_recurtype,
calendar_id)values (720,'Default to
Corp','fa',0,'','','',1057702446,'1970-01-01 00:00:00','1970-01-01
00:00:00',0,0,'snic')" [on line 197 of
"/data/www/horde/kronolith/lib/Driver/sql.php"]
Jul  8 22:14:06 7F:spartacus HORDE[24552949]: [kronolith] SQL event
store by snic: table = kronolith_events; query = "INSERT INTO
kronolith_events (event_id, event_title, event_description,
event_category, event_location, event_keywords, event_exceptions,
event_modified, event_start, event_end, event_alarm, event_recurtype,
calendar_id)values (721,'Move
gates','jm',0,'','','',1057702446,'1970-01-01 00:00:00','1970-01-01
00:00:00',0,0,'snic')" [on line 197 of
"/data/www/horde/kronolith/lib/Driver/sql.php"]
Jul  8 22:14:06 7F:spartacus HORDE[24552949]: [kronolith] SQL event
store by snic: table = kronolith_events; query = "INSERT INTO
kronolith_events (event_id, event_title, event_description,
event_category, event_location, event_keywords, event_exceptions,
event_modified, event_start, event_end, event_alarm, event_recurtype,
calendar_id)values (722,'gone','pjb',0,'','','',1057702446,'1970-01-01
00:00:00','1970-01-01 00:00:00',0,0,'snic')" [on line 197 of
"/data/www/horde/kronolith/lib/Driver/sql.php"]
Jul  8 22:14:06 7F:spartacus HORDE[24552949]: [kronolith] SQL event list
by snic: table = kronolith_events; query = "SELECT DISTINCT e.event_id,
e.event_recurtype FROM kronolith_events e WHERE e.calendar_id = 'snic'
AND ((e.event_alarm > 0)) AND ((e.event_end > '2003-07-08 00:00:00' AND
e.event_start < '2003-07-09 00:00:00') OR (e.event_recurenddate >=
'2003-07-08 00:00:00' AND e.event_start <= '2003-07-09 00:00:00' AND
e.event_recurtype != 0))" [on line 103 of
"/data/www/horde/kronolith/lib/Driver/sql.php"]
Jul  8 15:14:07 7F:spartacus HORDE[24552949]: [kronolith] SQL Query by
SessionHandler_mysql::write(): query = "REPLACE INTO
horde_sessionhandler (session_id, session_data, session_lastmodified)
VALUES ('a7084531f3433b1c592dbe0bf6fd4a07',
'prefs_cache|a:5:{s:7:\"_filled\";a:4:{s:9:\"kronolith\";b:1;s:3:\"nag\";b:1;s:5:\"horde\";b:1;s:5:\"mnemo\";b:1;}s:5:\"horde\";a:7:{s:8:\"language\";a:2:{s:3:\"val\";s:0:\"\";s:4:\"mask\";i:10;}s:9:\"menu_view\";a:3:{s:3:\"val\";s:4:\"both\";s:4:\"mask\";i:10;s:7:\"default\";b:0;}s:19:\"initial_application
###################################################

As you can see, the dates get all screwed up (if you compare the dates
in the CSV file to the dates in the INSERT commands).

Any suggestions?

-- 
Florin Andrei

"Never send a human to do a machine's job." - Agent Smith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new.csv
Type: text/x-comma-separated-values
Size: 203 bytes
Desc: not available
Url : http://lists.horde.org/archives/kronolith/attachments/20030708/e1530136/new.bin


More information about the kronolith mailing list