[Kolab-devel] caldav backend to calender plugin

listsb-kolab-dev at bitrate.net listsb-kolab-dev at bitrate.net
Sat Feb 8 05:50:57 CET 2014


On Feb 6, 2014, at 04.45, Daniel Morlock <daniel.morlock at gmail.com> wrote:

> On 2014-02-05 18:29, btb wrote:
>> On 2014.02.05 04.21, Daniel Morlock wrote:
>>> Hi Ben,
>>> thanks for trying the CalDAV plugin! There were indeed some issues when
>>> using the CalDAV or iCAL driver without the Kolab driver.
>>> These issues should be fixed in the recent version, tagged with
>>> roundcubemail-plugins-kolab-caldav-3.1.11.
>>> You can get this version from our Gitlab as follows:
>>> $ git clone https://gitlab.awesome-it.de/kolab/roundcube-plugins # You
>>> can skip this since you've done this already!
>>> $ cd roundcube-plugins
>>> $ git pull
>>> $ git checkout roundcubemail-plugins-kolab-caldav-3.1.11
>> thanks, 3.1.11 seems to be working a bit better [and thanks very much
>> for this contribution - it's a bit of a cornerstone to the possibility
>> of implementing kolab for us].  one brief note - from calendar.php,
>> $driver = $this->get_drivers()[0]; seems to not work prior to php 5.4.
>> i changed it to $driver = array_shift($this->get_drivers()); which
>> seems to work ok, but i'm quite ignorant of any considerations for
>> style or other implications.
>> a couple of elements that seem to not be working quite right so far:
>> upon adding a new caldav calendar, the interface says "successfully
>> saved", but it doesn't appear to ever contact the caldav server.  no
>> events appear, and i don't see any activity in the caldav server logs.
>> if i try to add an event, it says "failed to save changes".  i don't
>> see any messages in either the roundcube logs or the httpd logs, and i
>> don't see any activity in the logs on the caldav server.
>> if i do $rcmail_config['calendar_driver'] = array('caldav', 'ical',
>> 'database', 'kolab');, php complains "Call to undefined method
>> kolab_storage::folder_hierarchy() in
>> /usr/share/roundcubemail/plugins/calendar-awesome-it.de/drivers/kolab/kolab_driver.php
>> on line 113"
>> if i do $rcmail_config['calendar_driver'] = array('caldav', 'ical',
>> 'database');, then add a new caldav calendar, the interface says
>> "successfully saved", but if i then edit the calendar, it appears to
>> be a non caldav calendar - only name, color, show alarms items appear
>> in properties.  no url, credentials, etc.  if i then remove database
>> from the array and reload the page, the caldav settings return to the
>> properties window.
>> i'm sorry i'm offering only lists of problems and no contributions of
>> solutions - i'm still quite early on in the learning curve, both with
>> kolab as well as with php.  :)
>> -ben
>> _______________________________________________
>> devel mailing list
>> devel at lists.kolab.org
>> https://lists.kolab.org/mailman/listinfo/devel
> 
> Hi Ben,
> 
> I changed the lines in generate_randomdata() to use the driver specified in GPC e.g. http://<roundcubeurl>/?_task=calendar&_action=randomdata&_num=500&_driver=<driver>.
> Please note that we never tested the random data generator!
> 
> Further we also never tested the database driver. It should work, but there could be still some problems with the ical and caldav driver that extend the database driver. What we've tested is caldav+ical+kolab or caldav+ical.
> 
> Next, you might want to add $config['calendar_caldav_debug'] = true; to the calendar config in order to enable verbose debug messages to the console log.
> The error message that complains about undefined kolab_storage::folder_hierarchy() looks like a version problem. Do you use roundcubemail-plugins-kolab-3.1.11? You could replace your Roundcube Kolab plugins with those from our Gitlab so make sure you have the correct version. The kolab_storage::folder_hierarchy() is located in plugins/libkolab/lib/kolab_storage.php.
> 
> Regards,
> Daniel.

hi daniel-

i see the generate_randomdata() change you mention here: https://gitlab.awesome-it.de/kolab/roundcube-plugins/commit/1ccd08934b09dcde73a6aa8e4dcea34602cf16c3 - but when i do a git pull, i still see the old line in calendar.php. what am i doing wrong?

i’ve replaced the matching stock kolab plugins with the ones from your git repo:

[root at kolab plugins]# l
total 164K
drwxr-xr-x 5 root root 4.0K Jan 21 16:28 acl
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 additional_message_headers
drwxr-xr-x 5 root root 4.0K Jan 21 16:28 archive
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 attachment_reminder
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 autologon
lrwxrwxrwx 1 root root   54 Feb  7 22:53 calendar -> ../../awesome-it.de/roundcube-plugins/plugins/calendar
drwxr-xr-x 6 root root 4.0K Jan 21 16:28 calendar-kolab
drwxr-xr-x 4 root root 4.0K Jan 21 16:28 contextmenu
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 database_attachments
drwxr-xr-x 4 root root 4.0K Jan 21 16:28 debug_logger
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 emoticons
drwxr-xr-x 6 root root 4.0K Jan 21 16:28 enigma
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 example_addressbook
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 filesystem_attachments
drwxr-xr-x 6 root root 4.0K Jan 21 16:28 help
drwxr-xr-x 5 root root 4.0K Jan 21 16:28 hide_blockquote
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 http_authentication
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 identity_select
drwxr-xr-x 5 root root 4.0K Jan 21 16:28 jqueryui
lrwxrwxrwx 1 root root   62 Feb  7 23:17 kolab_activesync -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_activesync
lrwxrwxrwx 1 root root   63 Feb  7 23:20 kolab_addressbook -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_addressbook
lrwxrwxrwx 1 root root   56 Feb  7 23:20 kolab_auth -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_auth
lrwxrwxrwx 1 root root   58 Feb  7 23:20 kolab_config -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_config
lrwxrwxrwx 1 root root   62 Feb  7 23:20 kolab_delegation -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_delegation
lrwxrwxrwx 1 root root   57 Feb  7 23:21 kolab_files -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_files
lrwxrwxrwx 1 root root   59 Feb  7 23:21 kolab_folders -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_folders
lrwxrwxrwx 1 root root   57 Feb  7 23:21 kolab_zpush -> ../../awesome-it.de/roundcube-plugins/plugins/kolab_zpush
lrwxrwxrwx 1 root root   65 Feb  7 23:21 ldap_authentication -> ../../awesome-it.de/roundcube-plugins/plugins/ldap_authentication
lrwxrwxrwx 1 root root   60 Feb  7 23:00 libcalendaring -> ../../awesome-it.de/roundcube-plugins/plugins/libcalendaring
lrwxrwxrwx 1 root root   54 Feb  7 23:06 libkolab -> ../../awesome-it.de/roundcube-plugins/plugins/libkolab
lrwxrwxrwx 1 root root   56 Feb  7 23:21 logon_page -> ../../awesome-it.de/roundcube-plugins/plugins/logon_page
drwxr-xr-x 6 root root 4.0K Jan 21 16:28 managesieve
drwxr-xr-x 5 root root 4.0K Jan 21 16:28 markasjunk
drwxr-xr-x 4 root root 4.0K Jan 21 16:28 newmail_notifier
drwxr-xr-x 4 root root 4.0K Jan 21 16:28 new_user_dialog
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 new_user_identity
lrwxrwxrwx 1 root root   55 Feb  7 23:21 odfviewer -> ../../awesome-it.de/roundcube-plugins/plugins/odfviewer
lrwxrwxrwx 1 root root   54 Feb  7 23:21 owncloud -> ../../awesome-it.de/roundcube-plugins/plugins/owncloud
drwxr-xr-x 6 root root 4.0K Jan 21 16:28 password
lrwxrwxrwx 1 root root   55 Feb  7 23:21 pdfviewer -> ../../awesome-it.de/roundcube-plugins/plugins/pdfviewer
lrwxrwxrwx 1 root root   61 Feb  7 23:21 piwik_analytics -> ../../awesome-it.de/roundcube-plugins/plugins/piwik_analytics
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 redundant_attachments
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 show_additional_headers
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 squirrelmail_usercopy
drwxr-xr-x 4 root root 4.0K Jan 21 16:28 subscriptions_option
lrwxrwxrwx 1 root root   54 Feb  7 23:21 tasklist -> ../../awesome-it.de/roundcube-plugins/plugins/tasklist
drwxr-xr-x 2 root root 4.0K Jan 21 16:28 threading_as_default
lrwxrwxrwx 1 root root   60 Feb  7 23:21 tinymce_config -> ../../awesome-it.de/roundcube-plugins/plugins/tinymce_config
drwxr-xr-x 4 root root 4.0K Jan 21 16:28 userinfo
drwxr-xr-x 5 root root 4.0K Jan 21 16:28 vcard_attachments
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 virtuser_file
drwxr-xr-x 3 root root 4.0K Jan 21 16:28 virtuser_query
drwxr-xr-x 5 root root 4.0K Jan 21 16:28 zipdownload

is this what i should be doing?  replacing all of the eligible stock kolab plugins with the counterparts from your git repo?

i don’t see the kolab_storage::folder_hierarchy() message any longer, but i’m still having trouble when adding a caldav calendar, and getting "failed to save changes” when adding a caldav event.

i’ve set $rcmail_config['calendar_caldav_debug'] = true;, and now when adding a calendar, i see this in the console log:

[07-Feb-2014 23:43:34,000000 -0500]: caldav_driver: Resource "http://caldav.groupware.example.com/caldav.php/testuser/" has no collections.
[07-Feb-2014 23:43:34,000000 -0500]: caldav_driver: Initialize sync client for calendar 14
[07-Feb-2014 23:43:34,000000 -0500]: caldav_driver: Syncing calendar id "14".
[07-Feb-2014 23:43:34,000000 -0500]: caldav_driver: Unkown error while fetching calendar ctag for calendar "14"!
[07-Feb-2014 23:43:34,000000 -0500]: caldav_driver: Successfully synced calendar id "14".
[07-Feb-2014 23:43:34,000000 -0500]: caldav_driver: Initialize sync client for calendar 14
[07-Feb-2014 23:43:35,000000 -0500]: caldav_driver: Initialize sync client for calendar 14
[07-Feb-2014 23:43:35,000000 -0500]: caldav_driver: Sync period active: Assuming calendar "14" to be in sync.

when attempting to add an event, i see this:

[07-Feb-2014 23:44:30,000000 -0500]: caldav_driver: Initialize sync client for calendar 14
[07-Feb-2014 23:44:30,000000 -0500]: caldav_driver: Push new event to url /caldav.php/testuser//47A84CD9C7675E60A600B2120264A50D-68B2DA233748E9D1.ics
[07-Feb-2014 23:44:30,000000 -0500]: caldav_driver: Unkown error while creating caldav event, undo creating local event "15”!

one other side note - now that i’ve replaced the stock roundcube plugins with the ones from your git repo, the addressbook doesn’t load, and php logs this:

PHP Fatal error:  Call to protected method rcube_imap::sort_folder_list() from context 'kolab_storage' in /usr/share/awesome-it.de/roundcube-plugins/plugins/libkolab/lib/kolab_storage.php on line 667, referer: http://kolab.kvcc.edu/roundcubemail/?_task=calendar

thanks
-ben


More information about the devel mailing list