I cannot add the "Date of death" to any of my contacts.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I see Date of Death
Actual behavior
It's not there.
Screenshots
Operating system: Linux
Web server: Apache
Database: MySQL
PHP version: 7.2
Nextcloud version: 15.0.0
Contacts version: 3.0.1
Updated from an older Nextcloud or fresh install: Updated from 14
Signing status:
No errors have been found.
List of activated apps:
Enabled:
- accessibility: 1.1.0
- activity: 2.8.2
- calendar: 1.6.4
- cloud_federation_api: 0.1.0
- comments: 1.5.0
- contacts: 3.0.1
- dav: 1.8.0
- encryption: 2.3.0
- federatedfilesharing: 1.5.0
- federation: 1.5.0
- files: 1.10.0
- files_pdfviewer: 1.4.0
- files_sharing: 1.7.0
- files_texteditor: 2.7.0
- files_trashbin: 1.5.0
- files_versions: 1.8.0
- files_videoplayer: 1.4.0
- firstrunwizard: 2.4.0
- gallery: 18.2.0
- logreader: 2.0.0
- lookup_server_connector: 1.3.0
- nextcloud_announcements: 1.4.0
- notifications: 2.3.0
- oauth2: 1.3.0
- password_policy: 1.5.0
- provisioning_api: 1.5.0
- serverinfo: 1.5.0
- sharebymail: 1.5.0
- support: 1.0.0
- survey_client: 1.3.0
- systemtags: 1.5.0
- theming: 1.6.0
- twofactor_backupcodes: 1.4.1
- twofactor_totp: 2.1.0
- updatenotification: 1.5.0
- workflowengine: 1.5.0
Disabled:
- admin_audit
- files_external
- user_external
- user_ldap
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
GitMate.io thinks possibly related issues are https://github.com/nextcloud/contacts/issues/781 (Can not add "Date of Death" to contacts), https://github.com/nextcloud/contacts/issues/452 (Can't add new contact), https://github.com/nextcloud/contacts/issues/580 (Unable to add, remove or change contact entries), https://github.com/nextcloud/contacts/issues/507 (Contact could not be saved if both birthday and date of birth given), and https://github.com/nextcloud/contacts/issues/794 (Birthday, Date of Death, Anniversary save wrong date).
For my bug #814 I can add the date of death property but not the Cloud ID
@JC5 Thanks for your report!
Unfortunately I cannot reproduce your bug. I can add the date of death properly here.
Any error in your browser's console? (Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.)
How to access your browser console (Click to expand)
I can add the field to a contact who hasn't yet has the DoD. But a contact that has the DoD already, I get this:
TypeError: "t.localValue.toJSDate is not a function"
Full logs:
JQMIGRATE: Migrate is installed, version 1.4.0 core.js:7:542
New search handler registered search.js:67:4
Connected to dav!
Object { rootUrl: "https://cloud.example.com/remote.php/dav/", advertisedFeatures: (17) […], currentUserPrincipal: {…}, principalCollections: (4) […], calendarHomes: [], addressBookHomes: (1) […], parser: {…}, _isConnected: true, _request: {…} }
contacts.js:84:29413
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0
Source Map URL: contacts.js.map[Learn More]
TypeError: "t.localValue.toJSDate is not a function"
Ve https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:84:7224
_render https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:33038
r https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61459
get https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16189
Le https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16114
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61475
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61337
init https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:22739
f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49595
f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49484
Qr https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:54008
_update https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:32123
r https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61449
get https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16189
Le https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16114
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61475
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61337
init https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:22739
f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49595
f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49484
b https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:51074
O https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:52970
O https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:52441
O https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:52291
Qr https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:54055
_update https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:32106
r https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61449
get https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16189
run https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:17080
ke https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:15191
Jt https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:11476
Wt https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:10982
contacts.js:7:10862
The DoD is not visible and I can't add it.
Thanks, I will investigate!
Hello @JC5
Can you still reproduce the issue on 3.0.3?
If so I'll need to provide you a better debug release so I can get more detailed informations :)
I'll check at home, but have to upgrade first as well. :+1:
OK, I am still getting this problem. For contacts that have a birthday, I cannot add a Date of Death.
Screenshots: https://imgur.com/a/p9iBbcZ
Error in console:
TypeError: "t.localValue.toJSDate is not a function" (contacts.js:7:10964)
Bn https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:177:7559
_render https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:32915
r https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61336
get https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16291
Pe https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16216
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61352
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61214
init https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:22841
p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49472
p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49361
Kr https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:53885
_update https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:32000
r https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61326
get https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16291
Pe https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16216
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61352
mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61214
init https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:22841
p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49472
p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49361
A https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:50951
C https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:52847
C https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:52318
C https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:52168
Kr https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:53932
_update https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:31983
r https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61326
get https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16291
run https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:17182
Ee https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:15293
Jt https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:11578
Wt https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:11084
I am not sure what you would like to know from the installation itself, and I find the bug template to be a pain in the butt. So just the basics: PHP 7.2, Nextcloud 15.0.2, Contacts 3.0.3, Firefox 65.0 on macOS Mojave. Let me know how I can help!
@JC5 Thanks! I'm guessing one of your contact have an improper value. :)
I'll create a custom contacts release so you can have better debug on the console. Do you have access to your apps folder?
Yes, I do. Just let me know what I need to do.
With the help of #912 I can now see the issue.
@JC5 can you paste the vcf file here? (you can edit the sensitive values)
@j-ed the DEATHDATE on your contact have a colon instead of a semi-colon:
https://tools.ietf.org/html/rfc6350#section-6.2.5
https://tools.ietf.org/html/rfc6474#section-2.3
DEATHDATE;19531015T231000Z vs DEATHDATE:19900615T000000
EDIT: the library we're using seems to be misbehaving. Issue reported here: https://github.com/mozilla-comm/ical.js/issues/379
This is the full card, as I've downloaded it from Nextcloud.
BEGIN:VCARD
VERSION:3.0
FN:James Cole
N:Cole;James;;;
BDAY;VALUE=DATE:19511101
ITEM1.X-ABDATE:20120413
ITEM1.X-ABLABEL:Overlijden
UID:bla-bla-bla
DEATHDATE:20120413
REV:20181118T172308Z
CATEGORIES:Overigen
END:VCARD
This is the original from Google. As you can see, I fixed the date of birth in the meantime.
BEGIN:VCARD
VERSION:3.0
FN:James Cole
N:Cole;James;;;
BDAY:--1101
item1.X-ABDATE:20120413
item1.X-ABLabel:Overlijden
END:VCARD
The Google format seems to be the same as on an iPhone, except that the date stamp is formatted differently. I wouldn't have been thought that standards could be interpreted in so many different ways.
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.1//EN
N:Death; Dean;;;
FN:Dean Death
BDAY:1980-01-01
item1.X-ABDATE;type=pref:2000-04-30
item1.X-ABLabel:Todestag
END:VCARD
@JC5 this confirm that this is the same bug!
Thanks for your help!
@j-ed the contact you paste properly display the deathdate on your iOS device? :thinking:
Oh no, sorry for the confusion. I added that layout only because I want to show the similarity of the Google and iPhone format in this case, so that you can cover both in one go. If I create a contact record in Nextcloud and sync it to an iPhone 12.x, none of the two fields birth and death date are shown.
This how the record looks like after it has been created in Nextcloud:

This is what is being displayed on the iPhone if I access the contact (both dates are missing):

Whereas both date fields are correctly displayed on an Android device.
@j-ed okay, what does an iOS created vcf file looks like on nextcloud?
Can you past one here?
Here is the card generated by my phone for the contact I shared. I sync with nextcloud only.
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.1.3//EN
N:Cole;James;;;
FN: James Cole
BDAY:1951-11-01
item1.X-ABDATE;type=pref:2012-04-13
item1.X-ABLabel:Overlijden
END:VCARD
@skjnldsv Here we go. This is a contact I've created on the iOS device:

This is the vcf-file of the contact created on the iOS device:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.1//EN
N:Death-IOS;Dirk;;;
FN: Dirk Death-IOS
BDAY:1973-01-01
item1.X-ABDATE;type=pref:2018-05-05
item1.X-ABLabel:Todestag
END:VCARD
This is how the sync'ed contact in Nextcloud looks like (death date is missing)

This is the vcf-file of the sync'ed contact exported from Nextcloud:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iOS 12.1//EN
N:Death-IOS;Dirk;;;
FN:Death-IOS Dirk
BDAY;value=date:1973-01-01
item1.X-ABDATE;type=pref:2018-05-05
item1.X-ABLabel:Todestag
REV:2019-02-04T13:41:51Z
UID:F439C9CE-A43D-4BDD-89D1-4438ECB074FC
END:VCARD
I'm seeing similar things. The Totestag you have is some kind of a custom event. I was able to create cards with a multiple of those using Google Contacts:
item1.X-ABDATE:20130311
item1.X-ABLabel:Overlijden
item2.X-ABDATE:20170312
item2.X-ABLabel:Some event
I am getting the impression that the date format (xxxx-xx-xx or xxxxxxxx) does not matter much. In either case, this card will give the "t.localValue.toJSDate is not a function" error:
VERSION:3.0
REV:2019-02-10T08:19:09Z
N;CHARSET=utf-8:Cole;James;;;
FN;CHARSET=utf-8:James Cole
CATEGORIES;CHARSET=utf-8:Overigen
BDAY:19000101
DEATHDATE:20130101
ITEM1.X-ABDATE:20130101
ITEM1.X-ABLABEL:Overlijden
NOTE;CHARSET=utf-8:
UID:e22d13db-db8e-44d7-ad71-2b42bf5e1980
END:VCARD
Note that the date formats can be both 2013-01-01 and 20130101. The error occurs in both instances.
Creating a NEW card with a birthday and a death day can be downloaded from nextcloud in this format:

BEGIN:VCARD
VERSION:3.0
REV:20190210T063921Z
N;CHARSET=utf-8:Test;Test;;;
FN;CHARSET=utf-8:Test Test
NOTE;CHARSET=utf-8:
UID:b0feecee-3932-4b24-bdb2-7fb639022d74
BDAY;VALUE=DATE-AND-OR-TIME:2014-01-01T09:26:45
DEATHDATE;VALUE=DATE-AND-OR-TIME:2019-02-14T00:00:00
END:VCARD
So first I tried pushing this:
BDAY;VALUE=DATE-AND-OR-TIME:19001111
DEATHDATE;VALUE=DATE-AND-OR-TIME:20130311
That gives interesting results:

Adding dashes seems to help!
BDAY;VALUE=DATE-AND-OR-TIME:1900-11-11
DEATHDATE;VALUE=DATE-AND-OR-TIME:2013-03-11

The best way to satisfy both iOS and Nextcloud is this format:
BDAY;VALUE=DATE-AND-OR-TIME:1900-11-11
DEATHDATE;VALUE=DATE-AND-OR-TIME:2013-03-11
ITEM1.X-ABDATE:2013-03-11
ITEM1.X-ABLABEL:Overlijden
This fixes the problem in Nextcloud, and allows iPhone to show the custom event "Overlijden".
Okay, i'm very confused now.
What is the issue in the end?
Is it just a compatibility issue because iOS uses ABDATE properties?
Or is it a formatting issue because nextcloud doesn't write the date with dashes?
Or ware we still only on the DEATHDATE;19531015T231000Z vs DEATHDATE:19900615T000000 issue?
After updating the Contacts app to v3.0.4 the situation has slightly changed. The birthday is now displayed in the web gui, but not the death date anymore. On an iPhone the death date is now displayed as a normal date. In my test account the following details are listed. Surprisingly the date field has been stored twice:
ybcu9b.X-ABDATE;TYPE=pref:2013-07-26
ybcu9b.X-ABLabel:
PRODID:-//NTBAB//Android//ContactSync//9.0//166
DEATHDATE:2013-07-26
Okay, so to recap a bit, because this is confusing now :stuck_out_tongue_closed_eyes:
Adding a death date to a contact dioes not change anything in your ui,, correct? Is this the only issue left?
Surprisingly the date field has been stored twice
What do you mean by that?
Originally the contact record only contained a birth and a death date field. Due to the fact that the death date field seems not to be used on all environments and the date format is different on an iPhone (ybcu9b.X-...), the date record has now been duplicated and exists twice.
Nevertheless both fields are not displayed in the web gui. Eventually it would be a good idea to add a default date field which can be used to display these kind of abandoned entries?! This would allow to change their type/label afterwards. Currently it is not possible to add e.g. a death date because the app seems the existing entry but doesn't display it.
Currently it is not possible to add e.g. a death date because the app seems the existing entry but doesn't display it.
that's what I don't get. If I add a date of death it properly appear on mine! :woman_shrugging:

@skjnldsv Yes, that's what you get if you add the field to a new record and what is still working.
Unfortunately I'm now having contacts in my database which contain the following entries and
although the death date field exists, it is not displayed anymore.
ybcu9b.X-ABDATE;TYPE=pref:2013-07-26
ybcu9b.X-ABLabel:
PRODID:-//NTBAB//Android//ContactSync//9.0//166
DEATHDATE:2013-07-26
I can confirm that I can fix the problem by deleting and manually recreating the record, but
importing a vcf card with a death date didn't work as expected. It is imported but the death date
field is not displayed in the gui. I have just tested it with the following vcf file:
BEGIN:VCARD
VERSION:3.0
FN:Frau Thea Test
CATEGORIES:Privat
BDAY:1935-07-21
DEATHDATE:2014-04-26
N:Test;Thea;;Frau;
END:VCARD
Now I get it! Sorry for that! :)
The ICAL library does not understand the date format. I tried to go around it :thinking: Let's see!
Fix is in #988
Can I download the modified package somewhere or do I have to wait for the nightly build?
Oups sorry! Here:
contacts.tar.gz
I can confirm that the death date is correctly displayed again after installing the new version.
After importing the mentioned vcf file the death date is also displayed again.
@j-ed awesome! Thanks :)
I had the same issue. The contacts.tar.gz you provided above worked.
Problematic VCF DEATHDATE property:
DEATHDATE:20170321
New DEATHDATE property as inserted by the new contacts app.
DEATHDATE;VALUE=DATE:20100321
Would there be any way to auto-correct such dates?
@raoulbhatia I think a check could fix the invalid data. Something like this:
export default {
name: 'deathdate without value property',
run: contact => {
return contact.vCard.hasProperty('deathdate')
&& !contact.vCard.getFirstProperty('deathdate').hasProperty('value');
},
fix: contact => {
contact.vCard.addPropertyWithValue('value', 'date');
return true;
}
}
Well, the value is not forced according to the rfc and might works on others vcard utilities. So I'm not sure we want to _fix_ them if they're not really incompatible nor invalid! :thinking:
@caugner any thoughts?