Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] Davical no CardDAV XML-Element found! #29

Open
fmbiete opened this issue Aug 8, 2012 · 5 comments
Open

[SOLVED] Davical no CardDAV XML-Element found! #29

fmbiete opened this issue Aug 8, 2012 · 5 comments

Comments

@fmbiete
Copy link

fmbiete commented Aug 8, 2012

I'm trying to get working this plugin with a Davical server (already working with thunderbird & sogo extension). But when I synchronize an existing addressbook I get the following message:
v0.5.1 | carddav_server_id: 8 | No CardDAV XML-Element found! The CardDAV-Server seems to have no contacts

And the addressbook has 5 contacts

The response:

    <?xml version="1.0" encoding="UTF-8"?>
    <response>
     <addressbook_element>
      <display_name>NAME addressbook</display_name>
      <url>https://davical.domain.com/caldav.php/nameuser/addresses/</url>
      <last_modified>mar, 07 Aug 2012 18:52:11 GMT</last_modified>
     </addressbook_element>
    </response>

the PROPFIND method doesn't seem to return any contact, and only the collection info.

Any ideas??

Roundcube 0.7.2
PHP 5.3.10
Davical 1.1.1 in other server (Nginx 1.2, PHP 5.4)

@fmbiete
Copy link
Author

fmbiete commented Aug 8, 2012

I modified the get method of carddav_backend and now it's working. It downloads all the contacts from the collection.

carddav_backend.php

212c212,214
<               $response = $this->query($this->url, 'PROPFIND');
---
>               $content = '<?xml version="1.0" encoding="utf-8" ?><D:sync-collection xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav"><D:sync-token></D:sync-token><D:prop><D:getcontenttype/><D:getetag/><D:allprop/><C:address-data><C:allprop/></C:address-data></D:prop><C:filter/></D:sync-collection>';
>               $content_type = 'application/xml';
>               $response = $this->query($this->url, 'REPORT', $content, $content_type);

@ghost
Copy link

ghost commented Aug 13, 2012

Great! I had the same problem. This fixes it.

@hscissors
Copy link

question: do the three lines with the ">" replace the line with "$response = $this->query($this->url, 'PROPFIND');" in carddav_backend.php?

@fmbiete
Copy link
Author

fmbiete commented Oct 20, 2012

Yes, the 3 lines with ">" replace the line with "<"

@tuxick
Copy link

tuxick commented Jun 9, 2015

Yes, this fixes it for me, how come this hasn't been fixed after all this time? Could this be a Davical specific fix/issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants