I just added a workaround for DAViCal with Apple’s Address Book application. Since my update to 10.7.4, I was no longer able to add a contact to the server and the card stopped the whole server communication to fail completely.
Looking at the apache logs showed me the following error:
[Mon Jul 23 11:54:16 2012] [error] [client 184.108.40.206] davical: LOG: :Response status 500 for POST /caldav.php/username/contacts/1101e8b5-071b-4b40-8293-b74d35264665.vcf
After some additional research, I found this thread on the DAViCal list/forum - beware of the ﬂame war side eﬀects. Fortunately, Andrew himself answered and gave a neat patch - even though spread over diﬀerent posts. So I’d like to sum up the solution here.
First, I opened the ﬁle
/usr/share/davical/inc/DAVResource.php, jumped to line
1641 and added the following line
case 'DAV::add-member': if ( ! $this->_is_collection ) return false; if ( isset($c->post_add_member) && $c->post_add_member === false ) return false; $reply->DAVElement( $prop, 'add-member', $reply->href(ConstructURL(DeconstructURL($this->url())).'?add-member') ); break;
Then, you should add the following line to your
// post member work around for Mac 10.7.4 - patch is in /usr/share/davical/inc/DAVResource.php:1641 $c->post_add_member = false;
And that’s it.