Roundcube Community Forum

Release Support => Release Discussion => Topic started by: mario on December 10, 2013, 10:03:48 AM

Title: Cannot save contacts to addressbook, stable 0.95
Post by: mario on December 10, 2013, 10:03:48 AM
Hello,

I upgraded from very old 0.52 beta to 0.95 stable.
Everything else works-so far- except when I select Addressbook and go to my error logs, then it already shows an error (it isnt displayed on screen).

DB Error: [1] no such table: searches (SQL Query: SELECT search_id AS id, "name" FROM searches WHERE user_id = '1' AND "type" = '1' ORDER BY "name") in /var/www/testingmeil_changed.com/program/lib/Roundcube/rcube_db.php on line 416 (GET /?_task=addressbook)

And when I actually click to add new contact and trying to save, then it gives error on screen as well. Saying: "An error occurred while saving".
And in error log this error appeared.

DB Error: [1] table contacts has no column named words (SQL Query: INSERT INTO contacts (user_id, changed, del, "vcard", "name", "email", "firstname", "surname", "words") VALUES (1, now(), 0, 'BEGIN:VCARD
VERSION:3.0
N:;Sten;;;
FN:Sten
EMAIL;TYPE=INTERNET;TYPE=HOME:[email protected]
END:VCARD', 'Sten', '[email protected]', 'Sten', '', ' sten [email protected]')) in /var/www/testingmeil_changed.com/program/lib/Roundcube/rcube_db.php on line 416 (POST /?_orig_source=0?_task=addressbook&_action=save)



As I used an upgrade route to install this stable Rouncube and didn't use blank DB, instead used  sqlite to sqlite3 DB conversion that was described in README Upgrade file, now I am facing this problem because of that upgrade?

So some brand new tables are missing that are actually needed?
The easiest way to fix this? :P

My contacts table schema right now (no column named "words" in it...):
CREATE TABLE contacts (
  contact_id integer NOT NULL PRIMARY KEY,
  user_id integer NOT NULL default '0',
  changed datetime NOT NULL default '0000-00-00 00:00:00',
  del tinyint NOT NULL default '0',
  name varchar(128) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  firstname varchar(128) NOT NULL default '',
  surname varchar(128) NOT NULL default '',
  vcard text NOT NULL default ''

This "searches" is entirely separete TABLE?

In a hurry for quick answer- fix-possibly? :)

Cheers!
Title: Re: Cannot save contacts to addressbook, stable 0.95
Post by: SKaero on December 10, 2013, 04:45:34 PM
Did you run the update sql files when you upgraded?
Title: Re: Cannot save contacts to addressbook, stable 0.95
Post by: mario on December 11, 2013, 07:27:11 AM
Nope  :-[

That should have fixed it?
I already managed to make clean install, but for future references - this thread hopefully helps somebody else as well  ;)

Thank You, SKaero!
Title: Re: Cannot save contacts to addressbook, stable 0.95
Post by: SKaero on December 11, 2013, 05:21:16 PM
Yes that should fix the problem and keep the database compatible with the current version.