I very recently acquired a Fairphone2 and installed nextcloud on my desktop / server. I cannot -
create contacts on the server (+ New Contact just increment the counts but does not offer an entry form).
*** This was caused by a browser problem. Firefox ist a must …
import vcards***.vcf uploaded from my FP2 (yes, THAT works !).
“Import into Contacts” spins the busy wheel but does nothing else.
have my FP2 use synchronisation to seed contacts on nextcloud.
The redirects recommended by the service discovery instructions have been set.
Watching the internet traffic I see
GET /ocs/v2.php/apps/notifications/api/v2/notifications.HTTP /1.1…Host:…
issued by both nextcloud and FP2, with the attendant 200 OK replies.
Being a newbie in this field, I must have missed something basically stupid. Please advise, thank you for a reply.
Relevant configuration info
Debian testing/instable; “dpkg -l” gives
ii apache2 2.4.29-2 amd64 Apache HTTP Server
ii mysql-server 5.6.30-1 all MySQL database server (metapackag
ii php7.2 7.2.3-1 all server-side, HTML-embedded script
nextcloud : 13.0.1
Fairphone:
Android 7.1.2 Lineageos 14.1-20180410…
Contacts 1.4.22
DAVdroid 1.10.1.1-ose
Nextcloud 3.0.3
The phone is not rooted.
Regards -rg-
Final edit: ---------------------------------------------------------------------
Editing the vcf files and replacing VERSION:2.1 with VERSION:3.0 made the file palatable to the NC import, finally – EXCEPTED any cards with UTF-8 encoded entries. 3 of 179 in my case, so no big deal for me. May not do it for everyone, though.
I got from somewhere - sorry I forgot where and from whom - the hint that just editing the vcard file and replacing ‘VERSION;2.1’ by ‘VERSION:3.0’ on every card within would help.
It does actually allow to import cards whose entries have not been encoded in UTF-8; those are ignored.
For those (I had a half.dozen), the following script helped - I entered the contacts manually.
++++++++++++++++++++++++++++++++++++++++++++++
cat vcard-decode-UTF8
#!/bin/bash
LANG=C
awk ‘
BEGIN {
for (n=48; n<58; n++) { hexT[sprintf("%c",n)] = n - 48; }
for (n=65; n<71; n++) { hexT[sprintf("%c",n)] = n - 55; }
}
function decimalize(hexstr) {
dec = 0;
for (i=1; i <= length(hexstr); i++) {
cc = substr(hexstr,i,1);
dec = (16 * dec) + hexT[cc];
}
return dec;
}
{ gsub(";", “=20”, $0);
instr = toupper($0); str = “”;
nc = split(instr, cT , “=”);
for (j=2; j<=nc; j++) {
num = decimalize(cT[j]);
str = str sprintf("%c", num);
}
print instr,"=>", str;
}’
++++++++++++++++++++++++++++++++++++++++++++++
Seen in action, for an entry like this :
Executing the script lets one enter the whole encoded parts for translation, one entry at a time (the ‘;’ is converted to an encoded space, so all the encoded strings may be input at once). Here is a run showing the :
$ bash vcard-decode-UTF8
=42=6C=C3=A9=63=68=65=72=65=74=74=65;=41=C3=A9=72=6F=70=6F=72=74
=42=6C=C3=A9=63=68=65=72=65=74=74=65=20=41=C3=A9=72=6F=70=6F=72=74 => Blécherette Aéroport
<could enter a next entry right here; CTRL-C or CTRL-D to quit>
++++++++++++++++++++++++++++++++++++++++++++++
I have not tested if NC can accept the contacts with decoded entries - it may be.