Open x12a1f opened 12 years ago
After making this change:
--- /root/carddav_backend.php 2012-04-14 16:57:06.000000000 +0200
+++ carddav_backend.php 2012-04-14 16:56:30.000000000 +0200
@@ -291,6 +291,8 @@
{
$vcard = str_replace("\t", null, $vcard);
+ $vcard = str_replace("PHOTO;type=X", "PHOTO;ENCODING=b;TYPE=X", $vcard);
+
return $vcard;
}
the photos saved by roundcube-carddav also work on android and evolution.
I am not sure if this is the right place to fix it. I could not easily find the code responsible for creating the photo.
You are right. But thats not the right place to fix it. The main problem is that my plugin just uses the internal Roundcube addressbook classes and here is where the bug has to be fixed. So this bug is not related to Roundcube CardDAV. It's a bug from Roundcube itself.
I opened a ticket with roundcube : http://trac.roundcube.net/ticket/1488432
okay, thanks!
Sorry but it seems the roundcube address book classes work fine. I tried importing and exporting a vcard created with evolution in the normal (non carddav) roundcube addressbook and it works fine.
According to the roundcube developer it might be a problem on how the addressbook classes are used by the plugin. Could you check and perhaps comment on the roundcube ticket ?
I'll have a look at it. Thanks.
I have a davical server with contacts, these contacts have photos. They work fine with evolution and android (carddav-sync).
The photo also shows in roundcube-carddav but when I edit the contact in roundcube-carddav (not modifying the photo) and then save, the photo is missing from the saved contact (on evolution and android). Although roundcube-carddav still shows the photo.
The photo is still in davical. When I extract the vcard with cadaver I still see the PHOTO: element in there but it seems it is stored in such a way evolution and android can't use it.
The only difference I see is that the photo which does not work in evolution or android contains :
PHOTO;type=X-EVOLUTION-UNKNOWN:iVBORw0KGgoAAAANSUhEUgAAAGAAAABVCAIAAAA5TXZxAAAAA 3NCSVQICAjb4U/gAAAgAElEQVR4nO2caZRkRZmw34i7L7lnVmbW...........
while the working photo contains :
PHOTO;ENCODING=b;TYPE=X-EVOLUTION-UNKNOWN:/9j/4AAQSkZJRgABAQECWAJYAAD//g ATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEh ..............
(they are not the same photos)