nextcloud / contacts

📇 Contacts app for Nextcloud
https://apps.nextcloud.com/apps/contacts
GNU Affero General Public License v3.0
563 stars 168 forks source link

Support X-ANNIVERSARY and apple _$!<Anniversary>!$_ properties #1298

Open GRaptor opened 4 years ago

GRaptor commented 4 years ago

Having a contact with a birthday and an anniversery day, both get exported when creating a .vcf However, on importing this .vcf back to NextCloud, the anniversary entry is gone

......

To Reproduce: create a new contacts entry enter a birthday and an anniversary day export to .vcf open the exported .vcf and delete the UID identifier line; save it import it into contacts the anniversary entry is not showing up

Expected behavior: reimport shows anniversary as well

Operating system: RaspBerry Buster

Nextcloud version: NextCloudPi 16.0.5

Contacts version: 3.16

Updated from an older Nextcloud or fresh install: Updated

skjnldsv commented 4 years ago

Hello! :) Thanks for your report! Can you post the vcard here (please change sensitive data, but do not touch special characters)

Also, I will need your browser console log to investigate this issue. 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) # Chrome - Press either CTRL + SHIFT + J to open the “console” tab of the Developer Tools. - Alternative method: 1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools. 2. Click the “console” tab. # Safari - Press CMD + ALT + I to open the Web Inspector. - See Chrome’s step 2. (Chrome and Safari have pretty much identical dev tools.) # IE9 1. Press F12 to open the developer tools. 2. Click the “console” tab. # Firefox - Press CTRL + SHIFT + K to open the Web console (COMMAND + SHIFT + K on Macs). - or, if Firebug is installed (recommended): 1. Press F12 to open Firebug. 2. Click on the “console” tab. # Opera 1. Press CTRL + SHIFT + I to open Dragonfly. 2. Click on the “console” tab.
GRaptor commented 4 years ago

Same vCard as in the other thread: 869A4D62-20BB-4031-9C87-C4DFFD8B48B1.zip

Same console output:

_The following contact needed a correction that failed: duplicate types 
Object { jCal: (3) […], addressbook: {…}, vCard: {…}, conflict: false, dav: {…} }
validate.js:38:14
Locale used de 2 PropertyDateTime.vue:171
TypeError: "this.$slots.default is undefined"
    initActions ncvuecomponents.js:154
    beforeMount ncvuecomponents.js:154
    VueJS 53
vue.runtime.esm.js:1888:12
The escapeHTML library is deprecated! It will be removed in nextcloud 19. globals.js:30:10
TypeError: "t is undefined"
    u ncvuecomponents.js:154
    beforeUpdate ncvuecomponents.js:154
    VueJS 6
vue.runtime.esm.js:1888:12
This contact did not have a proper uid. Setting a new one for  
Object { jCal: (3) […], addressbook: {…}, vCard: {…}, conflict: false }
contact.js:107:11
TypeError: "t is undefined"
    u ncvuecomponents.js:154
    beforeUpdate ncvuecomponents.js:154
    VueJS 6
vue.runtime.esm.js:1888:12
The escapeHTML library is deprecated! It will be removed in nextcloud 19. globals.js:30:10
The following contact needed a correction that failed: duplicate types 
Object { jCal: (3) […], addressbook: {…}, vCard: {…}, conflict: false, dav: {…} }
validate.js:38:14
TypeError: "t is undefined"
    u ncvuecomponents.js:154
    beforeUpdate ncvuecomponents.js:154
    VueJS 6
vue.runtime.esm.js:1888:12
The escapeHTML library is deprecated! It will be removed in nextcloud 19. globals.js:30:10
TypeError: "t is undefined"
    u ncvuecomponents.js:154
    beforeUpdate ncvuecomponents.js:154
    VueJS 6
vue.runtime.esm.js:1888:12
The following contact needed a correction that failed: duplicate types 
Object { jCal: (3) […], addressbook: {…}, vCard: {…}, conflict: false, dav: {…} }
validate.js:38:14
TypeError: "t is undefined"
    u ncvuecomponents.js:154
    beforeUpdate ncvuecomponents.js:154
    VueJS 6
vue.runtime.esm.js:1888:12
The escapeHTML library is deprecated! It will be removed in nextcloud 19. globals.js:30:10
Locale used de 2 PropertyDateTime.vue:171
TypeError: "t is undefined"
    u ncvuecomponents.js:154
    beforeUpdate ncvuecomponents.js:154
    VueJS 6
vue.runtime.esm.js:1888:12
    VueJS 9_
skjnldsv commented 4 years ago

t is undefined"

duplicate of https://github.com/nextcloud/contacts/issues/942

GRaptor commented 4 years ago

Hm, not sure.

https://github.com/nextcloud/contacts/issues/942 refers to different options how you can define/declare the different types of a property. And that's apperently handeled different by different software.

However, in this case here, the app can't import what was exported by the same app. Of course I expect the app being capable to understand it's own data ;-) Right?

skjnldsv commented 4 years ago

Of course I expect the app being capable to understand it's own data ;-) Right?

Eheh, your vcard is not originating from the nextcloud contacts app, as the PRODID field is stating.

942 refers to different options how you can define/declare the different types of a property. And that's apperently handeled different by different software.

Yeah, this is the reason of the t is undefined error (usually). :)

skjnldsv commented 4 years ago

Hum, strangely I can import your contact just fine Capture d’écran_2019-10-30_17-15-55

GRaptor commented 4 years ago

Hm, maybe I need new glasses again but on your snip I can't see the anniversary date?! (just the birthday) So, it did not import correct. :-)

skjnldsv commented 4 years ago

Aaaah, I completely misread your issue. Sorry I'm a bit lost here. ^^

ITEM1.X-ABDATE;VALUE=DATE-AND-OR-TIME:20190220T000035
ITEM1.X-ABLABEL:_$!<Anniversary>!$_
X-ANNIVERSARY;VALUE=DATE-AND-OR-TIME:20190220T000035

Yes, we don't support those properties. I think there is an opened issue somewhere

skjnldsv commented 4 years ago

Two options:

  1. force migrate to vcard4
  2. add aliases for those properties
GRaptor commented 4 years ago

Ok, great. So I understand anniversary is part of the Nexcloud contacts app but not of the contacts app export module?!

skjnldsv commented 4 years ago

I do't understand your question :)

GRaptor commented 4 years ago

Sorry. You said this feature is currently not supported. However, in Nextcloud contacts GUI I can add an anniversary date. And I can export it from there into a .vcf But I can't import it w/o loosing the anniversary. I'm just curious where the issue comes from. But I may not have the full picture how the contcact app works.

skjnldsv commented 4 years ago

Anniverssary is supported in vcard4, you have a vcard 3 and nextcloud is applying a weird compatibility layer for microsoft and apple https://github.com/nextcloud/3rdparty/blob/a5036f09aca6d817f55e36c101684ac95120bdea/sabre/vobject/lib/VCardConverter.php#L121

GRaptor commented 4 years ago

fyi, same with new 3.3.0

skjnldsv commented 4 years ago

@GRaptor if the labels on the right and the status of the issues still says "to develop" it means it is not fixed, no matter what version you're trying :)