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

davical : not syncing contact without '.vcf" extension #37

Open
nerbrume opened this issue Oct 3, 2012 · 1 comment
Open

davical : not syncing contact without '.vcf" extension #37

nerbrume opened this issue Oct 3, 2012 · 1 comment

Comments

@nerbrume
Copy link

nerbrume commented Oct 3, 2012

I'm running roundcube 0.8.1 on debian stable, with roundcube-Carddav 5.1, patched following issue 29 (#29)

When syncing my adressbook, contacts which don't have a ".vcf" extension in the davical server are not seen by roundcube-carddav : they do not appear in roundcube (please note that they do not get deleted from the server either : roundcube-carddav just don't "see" them).

roundcube log is clean, roundcube carddav saying that everything was synced correctly.

I would guess this is due to roundcube-carddav pruning elements whithout extension.
Any help indicating what to change in the code would be welcome. All I could find are lines which strip the vcf extension in carddav_backend.php.

I can try to provide two example of "synced" and "not synced" contacts if needed, althought the trick here is that it's only a matter of how davical "represent" them in its DB.

@tobyX
Copy link

tobyX commented Oct 18, 2013

Hi, I have the same problem and fixed it with the added patch:

--- carddav_backend.php.bak     2013-10-18 09:16:06.000000000 +0200
+++ carddav_backend.php 2013-10-18 09:07:25.000000000 +0200
@@ -267,7 +267,11 @@
        public function get_vcard($vcard_id)
        {
                $vcard_id = str_replace($this->ext, null, $vcard_id);
-               return $this->query($this->url . $vcard_id . $this->ext, 'GET');
+               $vCard = $this->query($this->url . $vcard_id . $this->ext, 'GET');
+               if (empty($vCard))
+                       $vCard = $this->query($this->url . $vcard_id, 'GET');
+               return $vCard;
        }

        /**

It's a bit crude, but it does the job.

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

2 participants