[Owncloud] CalDAV interoperability
Laurent Duchesne
l at urent.org
Fri Mar 23 11:03:08 UTC 2012
Hi,
Thanks for posting this information. As you mentioned, the Playbook cannot find the calendar by itself. I succeeded by patching the code like this:
/3rdparty/Sabre/CalDAV/XMLUtil.php line 77
Change:
if (!is_null($start) && !is_null($end) && $end <= $start) {
to:
if (!is_null($start) && !is_null($end) && $end < $start) {
Reference:
http://supportforums.blackberry.com/t5/BlackBerry-PlayBook/OwnCloud-Carddav-amp-Caldav/m-p/1590131#M28070
That post hints that this may only be necessary at validation time, when you create the account on the Playbook, but I have not tried reverting the code yet after setting up the account.
The Playbook then needs the entire URL to the calendar (including it's name). In my case:
cloud.domain.tld/apps/calendar/caldav.php/calendars/<username>/<calendarname>
It will use https by default. For one account, I had the "default calendar", which I entered as "default%20calendar" and the application was able to load it.
Hope this is useful to someone!
Laurent
Le 2012-03-10 à 04:35, Nicolas a écrit :
> Hi,
>
> I try to synchronize my PlayBook with OwnCloud addressbook & calendar
> services.
>
> For the playbook, and I think others embedded devices, it's easier to
> use short URL. So I have patched my owncloud to do :
>
> diff --git a/.htaccess b/.htaccess
> index ebb28b0..f314e9f 100644
> --- a/.htaccess
> +++ b/.htaccess
> @@ -9,6 +9,17 @@ php_value memory_limit 512M
> </IfModule>
> <IfModule mod_rewrite.c>
> RewriteEngine on
> -RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
> +RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
> +
> +#RewriteCond %{REQUEST_METHOD} ^PROPFIND$
> +
> +RewriteCond %{HTTP_HOST} ^carddav
> +RewriteCond %{REQUEST_URI} !^/apps
> +RewriteRule .* /apps/contacts/carddav.php/$1 [L]
> +
> +RewriteCond %{HTTP_HOST} ^caldav
> +RewriteCond %{REQUEST_URI} !^/apps
> +RewriteRule .* /apps/calendar/caldav.php/$1 [L]
> </IfModule>
> Options -Indexes
> +#MultiviewsMatch Any
>
>
> and
>
>
> diff --git a/apps/calendar/caldav.php b/apps/calendar/caldav.php
> index b710b99..c389188 100644
> --- a/apps/calendar/caldav.php
> +++ b/apps/calendar/caldav.php
> @@ -25,7 +25,8 @@ $nodes = array(
>
> // Fire up server
> $server = new Sabre_DAV_Server($nodes);
> -$server->setBaseUri(OC::$APPSWEBROOT.'/apps/calendar/caldav.php');
> +//$server->setBaseUri(OC::$APPSWEBROOT.'/apps/calendar/caldav.php');
> +$server->setBaseUri(OC::$APPSWEBROOT.'/');
> // Add plugins
> $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
> $server->addPlugin(new Sabre_CalDAV_Plugin());
>
>
> and
>
>
> diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php
> index 654aeb6..0792d62 100644
> --- a/apps/contacts/carddav.php
> +++ b/apps/contacts/carddav.php
> @@ -39,7 +49,8 @@ $nodes = array(
>
> // Fire up server
> $server = new Sabre_DAV_Server($nodes);
> -$server->setBaseUri(OC::$APPSWEBROOT.'/apps/contacts/carddav.php');
> +//$server->setBaseUri(OC::$APPSWEBROOT.'/apps/contacts/carddav.php');
> +$server->setBaseUri(OC::$APPSWEBROOT.'/');
> // Add plugins
> $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
> $server->addPlugin(new Sabre_CardDAV_Plugin());
>
>
> So now, I can use the url :
> carddav.domain.tld
> or
> caldav.domain.tld
>
>
> I do better later...
>
>
> For CardDAV, it works well with PlayBook device (and Gnome Evolution
> 3.2.2)
>
>
> For CalDAV, it works well with Evolution ; but not at all with PlayBook.
>
>
> I don't really how to debug and dump stream. I have patched owncloud to
> dump the stream between the client & the server into a file. But maybe,
> there is a better way ?
>
>
> For PlayBook, it missing info in DAV communication :
>
> Indeed, in the ressourceType into the XML answer, there is no the
> "calendar" information. If I add "dirty"... :
> case '{DAV:}resourcetype' :
> $newProperties[200]['{DAV:}resourcetype']->add('{urn:ietf:params:xml:ns:caldav}calendar');
> in the getPropertiesForPath (3rdparty/Sabre/DAV/Server.php)
> the information.
> it works better.
>
>
> I seek to add this field, I don't think that we have to modify SabreDAV
> itself, but the owncloud sabre connector.
>
>
> Regards,
>
> Nicolas
>
>
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20120323/be5e101f/attachment.html>
More information about the Owncloud
mailing list