Sunday, June 3, 2012

Kloxo Roundcube unable to save to address book

Just faced this issue back 1 week ago, v 6.1.22 seems to face this issue on roundcube email.
upon further investigation into /var/log/httpd/error_log, found this:


PHP Notice:  MDB2 Error: no such field Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO contacts (user_id, changed, del, `vcard`, `name`, `email`, `words`) VALUES (1, now(), 0, 'BEGIN:VCARD\\r\\nVERSION:3.0\\r\\nFN:[name]\\r\\nEMAIL;type=INTERNET:name@example.com\\r\\nEND:VCARD', 'name', 'name@example.com', ' name@example.com name')] [Native code: 1054] [Native message: Unknown column 'words' in 'field list']  in /home/kloxo/httpd/webmail/roundcube/program/include/main.inc on line 2270, referer: ...



So, i went to dig into
/home/kloxo/httpd/webmail/roundcube/update/SQL/mysql.update.sql

And found these line which add the "word" column into the contacts table.

So i went to login as admin user into the kloxo and server > localhost > phpmyadmin,
and ran these script for roundcubemail database:

ALTER TABLE `contacts` ADD `words` TEXT NULL AFTER `vcard`;
ALTER TABLE `contacts` CHANGE `vcard` `vcard` LONGTEXT /*!40101 CHARACTER SET utf8 */ NULL DEFAULT NULL;
ALTER TABLE `contactgroupmembers` ADD INDEX `contactgroupmembers_contact_index` (`contact_id`);

And now it works perfectly.
Please take note not to run the entire file. You might likely to hit already ran sql syntax, and might took the risk to clear of your tables, especially message table.



1 comment:

Anne Thomas said...

Thanks! Just the fix I needed