Author Topic: Address Book Contacts Disappeared for all accounts  (Read 6225 times)

Offline patnekar

  • Newbie
  • *
  • Posts: 2
Address Book Contacts Disappeared for all accounts
« on: July 11, 2012, 04:13:57 AM »
Hello there,

We're running Roundcube Version 0.3.1-20091031 on Red Hat Enterprise Linux Server release 5.8 (Tikanga) with PHP 5.1.6 & MySQL 5.0.95. The server does not run any control panel sotware.

This setup had been working well. However, we now see that the Address Book contacts for all email accounts shows "no contacts found". Upon investigating further, we can confirm that the contacts do exist when queried the MySQL database of Roundcube( contacts table to be specific ).

We couldn't find specific threads/posts on the internet where someone had faced this problem before. Before submitting a bug, wanted to run this through the forums just in case if we're missing any known bug-solution.

One thing that cropped up was to run a script 'indexcontacts.sh' which should be in the bin directory of the Roundcube installation. This script/file does not reside on the server.

Has anyone faced this problem before or knows of ways we could index the contacts entries so that the contacts start showing up on the respective email accounts ?

Any assistance will be much appreciated.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Address Book Contacts Disappeared for all accounts
« Reply #1 on: July 11, 2012, 04:22:12 AM »
Look in the users table in the RoundCube database what you may fine that there are two of each user in the table with different hostnames or usernames and the contacts are tied to the old user account.

Offline patnekar

  • Newbie
  • *
  • Posts: 2
Re: Address Book Contacts Disappeared for all accounts
« Reply #2 on: July 11, 2012, 04:31:43 AM »
SKaero,

You're correct. We see duplicate entries in the users table, one at localhost & one at the server hostname.

I assume that removing the latter entries from the table alone would fix this problem ? Additionally, how did the new entries get created ? Any bug/problem you can point me to if known to you.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Address Book Contacts Disappeared for all accounts
« Reply #3 on: July 11, 2012, 05:37:29 PM »
The usual reason why this happens when someone changes the $rcmail_config['default_host'] variable in the RoundCube config. You'll need to make sure that $rcmail_config['default_host'] is set to same hostname as the users in the database that have the contacts, otherwise it will just re-create the incorrect users again. Also make sure to backup the database before removing any users in case the wrong users get delated.