[OwnCloud] Losing contacts after sync with DAVdroid 0.8.1+
I’m willing to provide a patch for this particular bug but definetly can’t take over maintainership.
On 25 July 2015 22:39:55 CEST, Bernhard Posselt email@example.com wrote:
To clear up things: The contacts app is not maintained, the maintainer
left the project because of disagreements with how things were decided
and communicated back then. I feel that things got better.
Long story short: this won’t be fixed and the code is quite messy. We
need someone who wants to fix things and is able to write PHP and
ownCloud’s PHP API and would help to review code.
Reply to this email directly or view it on GitHub:
Sent from my phone. Please excuse my brevity.
Here is my workaround using @untitaker’s owncloud/contacts#1003 pull request. To have an OwnCloud 8.1 synchronising correctly and right now, I directly modified the
apps/contacts/lib/carddav/backend.phpfile, on line 192 I replaced
'uri' => urlencode($contact['uri']),
'uri' => $contact['uri'],
This may be kind of bully, but it worked for me.
I’ve added the fix in owncloud contacts
@Raydiation Thanks, so I’ll close this issue here now.
About the bug in UIDs between DAVDroid/OwnCloud, to get rid of the problem on contacts dispappearing in Android, I:
1/ exported the Contacts List file as a .vcf (from Owncloud itseld, from Evolution or from Android, doesn’t matter).
2/ Edited this list with the GNU notepad (any other should also work), removing all "@"in the UIDs. (Find/replaceAll)
3/ Remove all contacts from Owncloud/Contacts web interface, imported back the cleaned .vcf file.
I didn’t really understand from where these “@” in the UIDs came from (I highly suspect contacts created in previous OC versions), tested a new contact creation from Evolution, Android and OwnCloud/Contacts4.0.0. and all the UIDs are clean, so the problem should disappear in the future, thanks to the fix too.
This might be useful to some people who still have “dirty” UIDs in their contacts files. I’m now on OC8.1.1, DAVDroid 0.8.3 and everything is fine.
Exported the contacts, deleted the “@1234…” behind the UIDs and reimported them. Worked like a charm. No more sync errors since then between owncloud and davdroid. Thanks for that great hint!
@Raydiation is your fix mentioned in comment 126705900 included in the Release 0.4.0.0 of the Contacts-App? I have difficulties to figure out wether the fix is already included in the current ownCloud release 8.1.1 or not.
The contacts app is not included in 8.1. The fix was made a month ago, contacts 4.0.0 was released 2 months ago, so you need to use master until a new release is uploaded to the app store
All right. Thanks for your reply.
The workaround worked for me too (owncloud 8.1 and davroid 0.8.4).
Exported the contacts from owncloud, removed with a text editor all the @ part in the UUID and then reimported.