You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I import a contact without email address in vCard format, an SQL error is thrown. No record is inserted and the following error is reported in error.log.
DB Error: [1364] Field 'email' doesn't have a default value (SQL Query: INSERT INTO `contacts` (`user_id`, `changed`, `del`, `vcard`, `name`, `firstname`, `surname`, `words`) VALUES (1, now(), 0, 'BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Apple Inc.//macOS 11.6//EN\r\nN:Test;Test;;;\r\nFN:Test Test\r\nTEL;TYPE=cell:+491234567890\r\nEND:VCARD', 'Test Test', 'Test', 'Test', ' test 491234567890')) in /shared/roundcube/roundcubemail/program/lib/Roundcube/rcube_db.php on line 566 (POST /?_task=addressbook&_action=import)
I have encountered this issue in Roundcube Webmail 1.5.0 and I used MariaDB/MySQL as the DBMS.
In mysql.initial.sql#L123, the column email is defined as NOT NULL. Since the contact has no email address, the column email is not populated.
Please find attached the vCard that I have tried to import.
In the address book, I am able to create a contact without email address. In this case, the email field in the database contains the empty string. Hence, I assume the vCard parser should set the default value to the empty string. If this is the desired solution, I would be happy to provide a pull request.
The text was updated successfully, but these errors were encountered:
If I import a contact without email address in vCard format, an SQL error is thrown. No record is inserted and the following error is reported in
error.log
.I have encountered this issue in Roundcube Webmail 1.5.0 and I used MariaDB/MySQL as the DBMS.
In mysql.initial.sql#L123, the column
email
is defined asNOT NULL
. Since the contact has no email address, the columnemail
is not populated.Please find attached the vCard that I have tried to import.
Test Test.vcf.txt
In the address book, I am able to create a contact without email address. In this case, the email field in the database contains the empty string. Hence, I assume the vCard parser should set the default value to the empty string. If this is the desired solution, I would be happy to provide a pull request.
The text was updated successfully, but these errors were encountered: