Author Topic: adressbook failure - don't find what appens.  (Read 3378 times)

Offline francoisp31

  • Newbie
  • *
  • Posts: 4
adressbook failure - don't find what appens.
« on: October 02, 2014, 11:04:48 AM »
 :) hello.

I have a problem with a roundcube 1.0.1 & postgresql.

The roundcube session works but, when my users, (any one), try to add an adress to an adressbook  this just answered "An error occured while saving”.
So I tried to check database structure was ok (PGSQL) and it seems to.

Now the error message doesn't occur anymore but no entry is saved, in roundcube web-interface neither inside the database. other functions are OK, only adressbook edition fails.
(creation of a group works/rename works) Adding a conact fails.
I didn't find any help elsewere whith the same problem... I hope you can help about that.  ;)




PS: PSQL side all tables, index, grants etc... seem OK if I refer to the http://trac.roundcube.net/wiki/Dev_Docs page.


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: adressbook failure - don't find what appens.
« Reply #1 on: October 02, 2014, 11:16:51 AM »
Whats in the error log?

Offline francoisp31

  • Newbie
  • *
  • Posts: 4
Re: adressbook failure - don't find what appens.
« Reply #2 on: October 02, 2014, 11:29:33 AM »
Thanks for the answer, where can I find the error log ?

I didn't find any in ...../roundcubemail/logs or ..../roundcubemail/tmp
 

I need something like :
Code: [Select]
$config['debug_level'] = 1;
$config['sql_debug'] = true;
$config['smtp_debug'] = true;
to activate logging of errors I guess ?
I'm going to check syntax in the wiki and try to generate errors to find them in log files




Offline francoisp31

  • Newbie
  • *
  • Posts: 4
Re: adressbook failure - don't find what appens.
« Reply #3 on: October 02, 2014, 12:02:47 PM »
OK so I found :
the error is a user_id error that conflicts with SQL constraints....... not a structural problem....
Code: [Select]
Oct  2 17:54:13 sd173 roundcube: DB Error: [7] ERROR:  duplicate key violates unique constraint "contacts_pkey" (SQL Query: INSERT INTO contacts (user_id, changed, del, "vcard", "name", "email", "firstname", "surname", "words") VALUES (1001, now(), 0, 'BEGIN:VCARD^M VERSION:3.0^M N:qsd;qsd;;;^M FN:qsd qsd^M EMAIL;TYPE=INTERNET;TYPE=HOME:qsd@qsd.fr^M END:VCARD', 'qsd qsd', 'qsd@qsd.fr', 'qsd', 'qsd', ' qsd qsd@qsd.fr')) in /home/roundcubemail-1.0.1/program/lib/Roundcube/rcube_db.php on line 467 (POST /webmail/?_task=addressbook&_orig_source=0?_task=addressbook&_action=save)

I don't know yet how to correct that ... but here is the problem.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: adressbook failure - don't find what appens.
« Reply #4 on: October 02, 2014, 01:11:11 PM »
Try SELECT setval('contacts_seq', SELECT max(contact_id) FROM contacts);

Offline francoisp31

  • Newbie
  • *
  • Posts: 4
Re: adressbook failure - don't find what appens.
« Reply #5 on: October 03, 2014, 02:45:05 AM »
Thanks,

but there is then a "stuip" value ... 61... I reset seuquences to 1000 so .. it cannot conflict with unique constraint.
I made a test without constraints.. then it works ...  but as soon as I put it back ... problem apears again.

 :D  I guess I m looking to good direction to find how to correct that...I will try ton analyze it again.