Address Book Import Fails
AnsweredHello,
I am on cPanel ver 120.0.2 with cpdavd service.
All my previous contacts have disappeared from the Webmail -> Contacts interface.
In order to restore the Contacts, I created a CSV file by exporting the existing Contacts from the older Thunderbird Address Book account and tried to import the same CSV in the cPanel CardDAV Address Book.
The import tool allowed me to select the file, and then complete the field mapping between source and target.
On clicking the final Import button, I receive an error dialog box as below:
On reloading the Address Book in Roundcube, I see a partial list of Imported Contacts.
-
Hey there! It seems like the operation timed out or hit a limit of some sort. I would check the main cPanel error log (/usr/local/cpanel/logs/error_log) or the Roundcube logs (https://support.cpanel.net/hc/en-us/articles/360054983694-Where-can-I-find-the-Roundcube-error-log) to see if any of those provide more details on what may have went wrong with the operation.
1 -
Thanks cPRex for pointing towards the log files.
The CSV file has only 34 entries. Timeout is most likely not an issue.
I found the issue in the file carddav.log found at
/home/$username/logs/roundcube/carddav.log.
The Notes field for one of the entries caused an error as below
<38ccb34d> [5 ERR] save data notes must be stringArray
Tried removing that, but encountered more errors such as:
PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/src/DataConversion.php:576
Gave up and ended up importing the .vcf file. That worked correctly.
Likely Root Cause:
I had converted the vcf to csv using an online tool to allow merging with other csv files and remove duplicate entries. Most likely, the online tool introduced some characters in the Notes fields that caused the import code to break.
Thanks for your support.
0 -
Interesting, but I'm glad that got you pointed in the right direction!
0
Please sign in to leave a comment.
Comments
3 comments