Author Topic: [0.6] Roundcube CardDAV Plugin  (Read 61099 times)

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« on: October 02, 2011, 04:23:32 PM »
Hi there,
I've developed a CardDAV-Plugin for roundcube 0.6 with fully vCard support!
I know that there allready exists a CardDAV-Plugin for roundcube but this plugin didn't made me happy. So I decided to develop my own CardDAV-Plugin.

A Davical Server should work because thats the server I've used to develop the plugin.


Features
--------
* add multiple CardDAV-Server for each user
* CardDAV-Contacts are stored in the local database which provides great performance
* read / add / delete / edit CardDAV-Contacts (partly implemented - read only)
* search for contacts in the addressbook

Planned features
----------------
* automaticly synchronized CardDAV-Contacts
* 2-way synchronization
* edit / add / delete CardDAV-Contacts


The Plugin is hosted on github: https://github.com/graviox/Roundcube-CardDAV
Please report feature requests and bugs here: https://github.com/graviox/Roundcube-CardDAV/issues

It would be great if someone provide some feedback :)


Greetings,
EdMolf
« Last Edit: October 30, 2011, 12:57:40 PM by EdMolf »

Offline hosenhans

  • Jr. Member
  • **
  • Posts: 30
[0.6] Roundcube CardDAV Plugin
« Reply #1 on: October 04, 2011, 04:50:46 AM »
Just when I thought about playing with carddav and roundcube you are releasing a promising plugin :-)
Installation went fine, as did issuing the SQL statements. However I am getting the following errors while searching for a contact in the message compose dialog. The searches table seems to be missing somehow...

Code: [Select]
[Tue Oct 04 10:39:00 2011] [warn]  mod_fcgid: stderr: MDB2 Error: no such table (-18): _doQuery: [Error message: Could not execute statement], referer: https://mail/?_task=settings
[Tue Oct 04 10:39:00 2011] [warn]  mod_fcgid: stderr: [Last executed query: PREPARE mdb2_statement_mysql_68dff2d5c8f783d6858af6b040e86cd0b34e3ea3d FROM 'SELECT search_id AS id, `name` FROM searches WHERE user_id = ? AND `type` = ? ORDER BY `name`'], referer: https://mail/?_task=settings
[Tue Oct 04 10:39:00 2011] [warn]  mod_fcgid: stderr: [Native code: 1146], referer: https://mail/?_task=settings
[Tue Oct 04 10:39:00 2011] [warn]  mod_fcgid: stderr: [Native message: Table 'XXXXXX.searches' doesn't exist], referer: https://mail/?_task=settings

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #2 on: October 04, 2011, 04:58:46 AM »
Hmm, thats strange because my CardDAV-Plugin just adds two tables "carddav_contacts" and "carddav_server". The described query does not exists in the program code so it seems that your error isn't connected with the CardDAV-Plugin.

Offline hosenhans

  • Jr. Member
  • **
  • Posts: 30
[0.6] Roundcube CardDAV Plugin
« Reply #3 on: October 04, 2011, 05:43:06 AM »
Maybe it's because I am using roundcube trunk and the changes there aren't compatible with your plugin. Other address book plugins like the google contacts plugin still work though.

Another possible issue: the carddav server isn't a davical one (I think). You could try connecting to the carddav server I am using yourself. It's a free service from memotoo: Synchronize all you want: phone, computer, ...

Offline hosenhans

  • Jr. Member
  • **
  • Posts: 30
[0.6] Roundcube CardDAV Plugin
« Reply #4 on: October 04, 2011, 05:57:57 AM »
I am sorry for the noise. Running through the roundcube installer again it seems some more tables are missing. The issue is indeed not related to your plugin. But thanks to it I found some problems with my installation. That's at least something for now ;-)

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #5 on: October 04, 2011, 06:08:05 AM »
Great to hear that my plugin isn't responsible for your problems ;)
Please let me know if the plugin works with memotoo.

Offline hosenhans

  • Jr. Member
  • **
  • Posts: 30
[0.6] Roundcube CardDAV Plugin
« Reply #6 on: October 05, 2011, 05:00:06 AM »
Quote from: EdMolf;36831
Please let me know if the plugin works with memotoo.

I'm afraid it does not :( No contacts are shown, although the status bar at the bottom says "Contacts 1 to 1 of 1" (should be 3 contacts in my test case anyway). In the address filed of the compose windows auto-completion always shows "memotoo (1)", no matter what I type in there.

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #7 on: October 05, 2011, 05:08:45 AM »
I'll create and an account on memotoo and test it myself.
I think there is a problem while synchronize your contacts. Thats because I just had davical to test the synchronization so far.

The auto-completion thing seems to be a bug. It shows just the label of your CardDAV-Groups. I can confirm that error and will have a look at it.

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #8 on: October 05, 2011, 11:10:48 AM »
I've released an update with some bugfixes so that the autocomplete and some other bugs are fixed.
I'll try to figure out whats the problem with memotoo and create an account there so that more services / servers are supported by my plugin ;)

Offline hosenhans

  • Jr. Member
  • **
  • Posts: 30
[0.6] Roundcube CardDAV Plugin
« Reply #9 on: October 05, 2011, 11:36:21 AM »
Considering Apple's icloud will feature carddav synchronisation I am eager to test both icloud and your plugin once both are ready ;)

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #10 on: October 30, 2011, 05:10:01 AM »
I've updated the Plugin so that now apple addressbook servers are supported!

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #11 on: October 30, 2011, 01:08:49 PM »
Yay, next update finished! The CardDAV-Addressbooks are now searchable as well and Meetoo is suported from now ;)
The full changelog can be viewed here: https://raw.github.com/graviox/Roundcube-CardDAV/master/CHANGELOG

Offline hosenhans

  • Jr. Member
  • **
  • Posts: 30
[0.6] Roundcube CardDAV Plugin
« Reply #12 on: October 31, 2011, 07:23:33 AM »
That's great news! I tested the memotoo synchronisation and got an error at setup. However when I left the settings page and came back again, the entry was there, and the synchronisation is working. Here's the error log:

Code: [Select]
[31-Oct-2011 11:46:14 +0100]: DB Error: MDB2 Error: null value violates not-null constraint Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_mysql_69ad4324cf7e523a923431ebc4dc7c558f4a72be6 USING @0, @1, @2, @3, @4, @5, @6, @7] [Native code: 1048] [Native message: Column 'name' cannot be null]  in /var/www/web0815/html/mail.mydomain.org/trunk/program/include/rcube_mdb2.php on line 713 (POST /?_task=settings&_action=plugin.carddav-server-save?_task=&_action=)
[31-Oct-2011 11:47:33] PHP Warning:  SimpleXMLElement::__construct(): Entity: line 2: parser warning : xmlns:D: 'DAV:' is not a valid URI in /var/www/web0815/html/mail.mydomain.org/trunk/plugins/carddav/carddav_backend.php on line 243
[31-Oct-2011 11:47:33] PHP Warning:  SimpleXMLElement::__construct(): <multistatus xmlns:D=&quot;DAV:&quot; xmlns:ns1=&quot;http://calendarserver.org/ns/&quot;> in /var/www/web0815/html/mail.mydomain.org/trunk/plugins/carddav/carddav_backend.php on line 243
[31-Oct-2011 11:47:33] PHP Warning:  SimpleXMLElement::__construct():                            ^ in /var/www/web0815/html/mail.mydomain.org/trunk/plugins/carddav/carddav_backend.php on line 243
[31-Oct-2011 11:56:29] PHP Warning:  SimpleXMLElement::__construct(): Entity: line 2: parser warning : xmlns:D: 'DAV:' is not a valid URI in /var/www/web0815/html/mail.mydomain.org/trunk/plugins/carddav/carddav_backend.php on line 243
[31-Oct-2011 11:56:29] PHP Warning:  SimpleXMLElement::__construct(): <multistatus xmlns:D=&quot;DAV:&quot; xmlns:ns1=&quot;http://calendarserver.org/ns/&quot;> in /var/www/web0815/html/mail.mydomain.org/trunk/plugins/carddav/carddav_backend.php on line 243
[31-Oct-2011 11:56:29] PHP Warning:  SimpleXMLElement::__construct():                            ^ in /var/www/web0815/html/mail.mydomain.org/trunk/plugins/carddav/carddav_backend.php on line 243


Another issue I noticed while testing icloud synchronization a few days back: special characters in the username weren't escaped properly. It wasn't possible to use a username like "some+thing@domain.com". The + sign seems to be the issue there.

Thank you very much for your plugin. I am really close to get rid of my google contacts synchronisation :)

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #13 on: November 01, 2011, 01:42:43 AM »
Hi, thanks for the response. I'll have a look at it!

Offline EdMolf

  • Jr. Member
  • **
  • Posts: 26
[0.6] Roundcube CardDAV Plugin
« Reply #14 on: November 02, 2011, 03:43:34 PM »
Hi, I've developed an update that fixes the "+" sign bug and the bug that was responseible for that error:

Code: [Select]
[31-Oct-2011 11:46:14 +0100]: DB Error: MDB2 Error: null value violates not-null constraint Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_mysql_69ad4324cf7e523a923431ebc4dc7c558f4a72be6 USING @0, @1, @2, @3, @4, @5, @6, @7] [Native code: 1048] [Native message: Column 'name' cannot be null]  in /var/www/web0815/html/mail.mydomain.org/trunk/program/include/rcube_mdb2.php on line 713 (POST /?_task=settings&_action=plugin.carddav-server-save?_task=&_action=)

Now you can insert a memotoo account and get a success message as it should be.


I can't reproduce the warnings that you get. It seems that this is a bug of your libxml2 version. Which environment and libxml2 version do you use?

It would be great if you can add bugs or feature requests here please: https://github.com/graviox/Roundcube-cardDAV/issues


Thanks for the feedback and best regards,
EdMolf