Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITEM1 property not displayed #1842

Closed
paolosg opened this issue Oct 10, 2020 · 32 comments · Fixed by #2064
Closed

ITEM1 property not displayed #1842

paolosg opened this issue Oct 10, 2020 · 32 comments · Fixed by #2064
Labels
3. to review Waiting for reviews bug Something isn't working high High priority regression Regression of a previous working feature

Comments

@paolosg
Copy link

paolosg commented Oct 10, 2020

I saw there have been similar issues (#42 #942) but they're all closed now and I'm still experiencing the issue.

Steps to reproduce

Add a ITEM1 prefix on any line (as done by an iOS14 device for example for addresses and websites)

Expected behaviour

Property is shown correctly

Actual behaviour

Properties with an ITEM1 prefix are not shown completely in the contacts app. Data is still present in the underlying vcf card though.

Example:
Item ADR;type=WORK;type=pref:;;;Rome;RM;;IT is correctly shown, while item1.ADR;type=WORK;type=pref:;;;Rome;RM;;IT isn't completely.

Server configuration

Nextcloud version:
18.0.10

Contacts version:
3.4.0

Updated from an older Nextcloud or fresh install:
Updated

@skjnldsv
Copy link
Member

Hi, care to share your contact here plase?

@skjnldsv skjnldsv added 0. Needs triage bug Something isn't working needs info Not enough information provided labels Oct 12, 2020
@jivanpal
Copy link

jivanpal commented Oct 13, 2020

Same issue here, Nextcloud 20.0.0, Contacts 3.4.0.

For example, create a contact called "Test Contact", and attempt to add a phone number, setting a custom label. Upon hitting ENTER, the phone field disappears from view. However, the underlying data is still there, as revealed when exporting VCF file.

The following VCF file is the result of the following steps:

  1. Delete all contacts
  2. Create a contact called "Test Contact"
  3. Set a custom label for the visible phone field, "custom1". Press ENTER, the phone field disappears.
  4. Add new property: Phone. Set a custom label, "old". Press ENTER, the phone field disappears.
  5. Refresh page, neither user-entered phone entry is visible.
  6. Enter a phone number, then set the label to "test". Press ENTER, the phone field disappears.
  7. Refresh page, then export contacts.
BEGIN:VCARD
VERSION:4.0
PRODID:-//Nextcloud Contacts v3.4.0
UID:b5d7bc27-b87f-4e87-8adc-c9934c4f7e6a
FN:Test Contact
ADR;TYPE=HOME:;;;;;;
EMAIL;TYPE=HOME:
NEXTCLOUD1.TEL;TYPE="HOME,VOICE":
NEXTCLOUD2.TEL;TYPE="HOME,VOICE":
NEXTCLOUD3.TEL;TYPE="HOME,VOICE":02079460111
NEXTCLOUD1.X-ABLABEL:custom1
NEXTCLOUD2.X-ABLABEL:old
NEXTCLOUD3.X-ABLABEL:test
REV;VALUE=DATE-AND-OR-TIME:20201013T010015Z
END:VCARD

Importing a VCF file with similar item labels (e.g. a Google Contacts export) also keeps the data in the underlying data store, but the data is not visible in the Contacts app. It is visible to DAV clients that sync with the server. For example, here is a single-contact Google Contacts export which exhibits this behaviour:

BEGIN:VCARD
VERSION:3.0
FN:Alice Jones
N:Jones;Alice;;;
EMAIL;TYPE=INTERNET;TYPE=WORK:[email protected]
item1.EMAIL;TYPE=INTERNET:[email protected]
item1.X-ABLabel:University
item2.ORG:University of Stuff
item2.X-ABLabel:Other
item3.TITLE:Lecturer in Things
item3.X-ABLabel:Other
TEL;TYPE=CELL:+44 7700 900456
item4.TEL:+44 7700 900123
item4.X-ABLabel:Mobile (old)
ADR;TYPE=HOME:;;10 Some Road;London;;;United Kingdom;10 Some Road\nLo
 ndon\nUnited Kingdom
item5.ADR:;;University of Stuff;London;;;United Kingdom;University of Stuff
 \nLondon\nUnited Kingdom
item5.X-ABLabel:University
CATEGORIES:Colleagues,myContacts
END:VCARD

After importing, in the Contacts web app, only the following are visible:

  • name
  • detailed name
  • phone "+44 7700 900456" (with label "Mobile" in locale en_GB)
  • email "[email protected]" (with label "Work")
  • address "10 Some Road" etc.
  • groups "Colleagues" and "myContacts"

The other phone, email, and address are not visible, but are visible elsewhere, such as in the Google Contacts app for Android after syncing with DAVx⁵.


Exporting contacts after importing the file above gives the following:

BEGIN:VCARD
VERSION:3.0
FN:Alice Jones
N:Jones;Alice;;;
EMAIL;TYPE="INTERNET,WORK":[email protected]
ITEM1.EMAIL;TYPE=INTERNET:[email protected]
ITEM1.X-ABLABEL:University
ITEM2.X-ABLABEL:Other
ITEM3.X-ABLABEL:Other
ITEM4.X-ABLABEL:Mobile (old)
ITEM5.X-ABLABEL:University
ITEM2.ORG:University of Stuff
ITEM3.TITLE:Lecturer in Things
TEL;TYPE=CELL;VALUE=UNKNOWN:+44 7700 900456
ITEM4.TEL;VALUE=UNKNOWN:+44 7700 900123
ADR;TYPE=HOME:;;10 Some Road;London;;;United Kingdom;10 Some Road\nLondon\n
 United Kingdom
ITEM5.ADR;VALUE=UNKNOWN:;;University of Stuff;London;;;United Kingdom;Unive
 rsity of Stuff\nLondon\nUnited Kingdom
CATEGORIES:Colleagues,myContacts
UID:d3c3aa0d-6e8b-4e5c-8710-596d3b58ddbb
REV;VALUE=DATE-TIME:20201013T013319Z
END:VCARD

@r4taw2mg
Copy link

@paolosg It's not just you.

I am taking first steps using nextcloud and was playing with importing my contacts from g**gle. As I mainly use custom names for phone numbers, I was surprised those number didn't make it into nextcloud. But actually they are there, they are just not shown. It seem, the web interface only shows the pre-defined types. I can change the label by typing. As long as I use a pre-defined name, it shows. If I use something else, it vanishes from site.

@paolosg
Copy link
Author

paolosg commented Oct 18, 2020

@skjnldsv are the examples from @jivanpal sufficient?
I could provide more if needed, but the issue is definitely the same.

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of high High priority regression Regression of a previous working feature and removed 0. Needs triage needs info Not enough information provided labels Oct 25, 2020
@skjnldsv skjnldsv modified the milestones: maybe one day, next Oct 25, 2020
@sciurius
Copy link

sciurius commented Nov 5, 2020

Showing contacts without addresses is just like showing file names in the file browser, but not being allowed to actually use (see, download) the file contents.

Nextcloud Groupware offers easy-to-use web mail, calendaring and contacts that helps your team get things done quicker and easier, integrated with Nextcloud Files.

Apparently, more money is being spent on advertising than on trying to deliver what is advertised.

@skjnldsv
Copy link
Member

skjnldsv commented Nov 5, 2020

Apparently, more money is being spent on advertising than on trying to deliver what is advertised.

Always a pleasure reading comments like those! Very motivating!👌✨

@sciurius
Copy link

Nextcloud stable upgrade to 20.0.4. Problem still there.

@skjnldsv
Copy link
Member

Nextcloud stable upgrade to 20.0.4. Problem still there.

This is related to the contacts app, not nextcloud core

@sciurius
Copy link

Technically speaking, yes. Maybe.

From customer perspective, Files, Contacts and Calendar is core functionality.

@jivanpal
Copy link

jivanpal commented Dec 24, 2020

@sciurius, then take up your grievance with the Nextcloud maintainers, not core app maintainers — they decide when to release new point releases of Nextcloud, and what version of apps are included therein. You can't expect every minor point release to have the specific bugfix that you care most about. Monitor the changelogs if you really care about a specific bugfix, or help out with a pull request.

@LeKangouroo
Copy link

Hi ! Is there anything we can do to help you fix this issue ?

Apart from opening a pull request, do you have any suggestion or useful information to communicate regarding this issue ?

Cheers

@LittleAlf
Copy link

X-ABLabel was working fine in a previous version before. This regression is quite unfortunate. I have now several contacts which have duplicates of telephone numbers: One set of phone numbers I created on my Android phone. And the other set of the same phone numbers I created again in the contacts web interface, because I did not see the originally created numbers.

@skjnldsv :
I would like to support @LeKangouroo in his question: If we can do anything to help to fix this issue, please, let us know.

@LeKangouroo
Copy link

Up

@Chi2Co
Copy link

Chi2Co commented Feb 10, 2021

Same problem here.
I did input a new contact on my phone... Sync to nextcloud was fine... Problem: the address is not shown (type: "other") and the mail (type: "other") is also not shown.

The downloaded vCard-file from nextcloud has all the data in it...

@j-maas
Copy link
Contributor

j-maas commented Feb 17, 2021

After an intense session of reading through the code, I can make an educated guess of what the bug is:

Instead of this

if (!this.canDisplay(property)) {
    return list
}

it should probably be

if (!this.canDisplay(property.split(".").pop())) {
    return list
}

The canDisplay filtering was introduced almost a year ago. It checks whether the property name is "registered" in rfcProps.js, and if not, it does not pass it along.

The problem is that custom labels are implemented by using two vCard fields with the same, e.g., group1.X-ABLabel and group1.TEL, where the . separates the prefix from the field types. The sorting function sorts by what is after the ., since we are not interested in the prefix. By the same logic, we should only check what is after the . for whether it is a property we can display.

I have not tested this change, though, so this is only a conjecture.

@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Feb 18, 2021
@jzdm
Copy link

jzdm commented Mar 5, 2021

Could you please publish a hotfix release containing this solution? Working with the web version of the contacts app while also using e.g. the iOS address book is really really painful!
Or do you have an estimate when the next version of the contacts app will be released?

@sciurius
Copy link

sciurius commented Mar 5, 2021

I can send you the (fixed) version I built myself.

@jzdm
Copy link

jzdm commented Mar 6, 2021

I can send you the (fixed) version I built myself.

Thanks for the kind offer, but I actually managed to build the app myself from the source.

@mneiger
Copy link

mneiger commented Mar 6, 2021

I can send you the (fixed) version I built myself.

I'm not as proficient as jzdm and would welcome a prebuilt version, thanks

@Chi2Co
Copy link

Chi2Co commented Mar 6, 2021

Me too :)

@sciurius
Copy link

sciurius commented Mar 6, 2021

https://www.squirrel.nl/pub/xfer/uploads/3C17Tlabb5mLTs7YQLqZk0aA.tar.gz

Go to your apps page and disable and remove the contacts app.

cd /var/web/nextcloud/apps (may be different)
rm -fr contacts (if needed)
tar zxf contacts.tar.gz

Go to your apps page and enable the contacts app.

HTH

@skjnldsv
Copy link
Member

Releasing right now! Sorry about the delay everyone! 😖

@LittleAlf
Copy link

We thank you for all the work you are doing!

@mattenklicker
Copy link

Should this be fixed in 3.5.0? Still had to run sed -i 's/this.canDisplay(property)/this.canDisplay(property.split(".").pop()/' js/contacts-main.js.map to get this fixed.

@sciurius
Copy link

sciurius commented Mar 17, 2021

The definition of the canDisplay function has been changed to:

canDisplay(property) {
	// Make sure we have some model for the property and check for ITEM.PROP custom label format
	const propModel = rfcProps.properties[property.name.split('.').pop()]

If you made local changes, make sure to disable and delete the old contacts app completely before installing the new version.

@skjnldsv
Copy link
Member

And clear your cache :)

  1. clear your browser's cache
  2. run an occ maintenance:repair on your server

Thanks 😉

@sciurius
Copy link

sciurius commented Mar 18, 2021

There may still be an issue...
In a fresh browser, when I open nextcloud and click the contacts icon, the contacts are loaded and the first contact is displayed with address ;;Cxxlaan 1;Xxloo;;1111 AA;Netherlands displayed in a single address field, instead of the individual parts in the individual fields.

scrot20210318192416

When I select someone else it displays correctly. When I select the first contact again, it also displays correctly.

scrot20210318192447

@bert-willekens
Copy link

Should this be closed while people are still reporting the issue?

@jivanpal
Copy link

@bert-willekens The issue in question was fixed in v3.5.1, and the subsequent address display issue mentioned by @sciurius appears to be resolved as of v4.2.2 (current latest), if not earlier.

@charlescurley
Copy link

It's baaack! I'm seeing this on Contacts 5.3.1, Nextcloud Hub 3 (25.0.7), both of which are up to date. Several days ago, I entered a new contact. I now cannot see several fields. Exporting the contact and examining the vcard file, I see that three of the missing fields are labeled "itemX.…"., e.g.:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iOS 16.5//EN
N:;;;;
FN:Rocky Mountain Oncology
ORG:Rocky Mountain Oncology;
TEL;type=WORK;type=VOICE;type=pref:307-235-5433
TEL;type=WORK;type=VOICE:307-332-0324
item1.TEL:+13072334783
item2.ADR;type=WORK;type=pref:;;15 Shrine Club Road;Lander;Wyoming;82520;
item3.ADR;type=WORK:;;6501 E. 2nd Street;Casper;Wyoming;82609;
NOTE:307-332-0324 is Lander\n\nJohn Purviance\, MD\n\nKelly\, scheduler\n\nSam\, 4783
REV:2023-06-14T23:22:56Z
UID:77b3ac81-5559-477e-9624-25f9245d6c6f
X-IMAGETYPE:PHOTO
END:VCARD

I also use an iPhone, and may have edited the contact there. All fields show up on the iPhone.

@tomasz-lasko
Copy link

tomasz-lasko commented Jun 24, 2023

I have the same effect: custom phone types when added on the phone, after sync do not show on nextcloud in contacts 5.3.2 but they do work OK on nextcloud in contacts 4.2.5

@charlescurley
Copy link

I have the same effect: custom phone types when added on the phone, after sync do not show on nextcloud in contacts 5.3.2 but they do work OK on nextcloud in contacts 4.2.5

This bug is closed. Please add a comment to bug 3447. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working high High priority regression Regression of a previous working feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.