Notes field not accepting line breaks
Describe the bug
selecting the notes field of a contact and adding text does not allow me to add line breaks. Instead line breaks are just ignored.
Steps to reproduce
when making changes to a contact and add text to the notes filed.
Expected behavior
I would expect line breaks to be accepted so that my note for a contact can be structured.
Actual behavior
Line breaks in text added to notes files are ignored.
Contact version
7.2.6
Operating system
No response
PHP engine version
None
Web server
Apache (supported)
Database
MariaDB
Additional info
No response
Is a duplicate of #4605
Hello! Could you please check whether this is still an issue? We implemented https://github.com/nextcloud/contacts/pull/4679 in the meantime
Hello! Could you please check whether this is still an issue? We implemented https://github.com/nextcloud/contacts/pull/4679 in the meantime
Works perfectly in V7.3.1. For me it's done. Many thanks.
For me it is still broken in v7.3.3
Edit Mode:
View-Mode:
View-Mode (after clicking the text to expand):
Edit: Screenshot from Thunderbird
Btw: IMHO it would be good to display the full text directly without having to click on it.
Hello, i have same error since V6. Updated now my NC to 31 and some minutes aga contacts to 8.04. But from 995 contacts there are only 2 with correct field: note. Als other are a normal text input with one. Is it possible (** even paid **) getting the web App looking like this. (Without beeing changed with updates?) Tried it with ChatGPT with no results
Thanks guys for your observations, @nimishavijay What do you think about @SchorschKloni's proposal?
My observation is that in NC 32.0.9 and Web Contacts App 7.3.3. are
- fine for newly added notes, however
- odd for some older entries (i.e. address entries including notes) that were imported
From this observation I take that earlier imports might have handled the notes filed different from what it appears t be today.
IMO the notes text field should preserve and present (hard) newline char when they were given. If there shall be (soft) line breaks when the text field window isn't wide enough is a matter of taste. If this (or any other defined) policy is followed then there must be a strategy how to handle existing notes in all contact entries so that the result is homogenously presented.
edit: important -> imports
Yes, newly added contacts are fine. But for me its hard to handle the contacts because they are important to my company. I would like to work only with the NC Client. But the space waste on the right and the not working "Notes field" keepig us awaxý from that. I can tell again we would be happy to pay to be able to use it in the long term as a full replacement for Outlook
@SchorschKloni I agree that the whole note should be shown without having to click on the field! :) however it seems like a specific use case to have such a long note that it requires the entire right side column to be used. The right column also houses some metadata like items shared between you and the contact, etc so there is a distinction between the left column (editable) and the right column (non-editable). When you share/sync your contacts the note will also be shared, but if we move that to the right then it would look like a personal note field which may confuse people.
@SchorschKloni I agree ...... / ....which may confuse people.
Hello @nimishavijay , greetings from Munich to Berlin. Are you able/allowed building me an own version which is persisting Nextcloud updates? ChatGPT told me it would be easy with some rows of code. But the examples from GPT where all outdated
@SchorschKloni I agree ...... / ....which may confuse people.
Hello @nimishavijay , greetings from Munich to Berlin. Are you able/allowed building me an own version which is persisting Nextcloud updates? ChatGPT told me it would be easy with some rows of code. But the examples from GPT where all outdated
You can try creating a fork of the contacts app and modifying it however you like, however we won't be able to include your changes in our official releases if they aren't approved by design.
@ppsoo Unfortunately I am not able to reproduce this issue with line breaks not rendering. Could you possibly send a small sample of these "old" entries that you are talking about? Thanks!
Could you possibly send a small sample of these "old" entries that you are talking about? Thanks!
sure, this is a screenshot from NC 32.0.0. and Contacts App 8.0.4.
This entry in my contacts comes from an older import. Other, more recent imports render well, i.e. break longer lines.
Could you possibly send a small sample of these "old" entries that you are talking about? Thanks!
sure, this is a screenshot from NC 32.0.0. and Contacts App 8.0.4.
This entry in my contacts comes from an older import. Other, more recent imports render well, i.e. break longer lines.
Thanks! Would it be possible to ask you to export a VCF file with a contact which has a note field that doesn't render correctly?
sure, this is the full content of the anonymised VCF that goes with above entry.
BEGIN:VCARD VERSION:3.0 PRODID;VALUE=TEXT:-//Apple Inc.//macOS 13.7.2//EN N:XXX;ZZZ;;; FN:ZZZ XXX ORG:YYY;NES EMAIL;TYPE=INTERNET,WORK,pref:[email protected] EMAIL;TYPE=INTERNET,HOME:[email protected] TEL;TYPE=CELL,VOICE,pref;VALUE=UNKNOWN:+49 170 12345678 ITEM1.ADR;TYPE=HOME,pref:;;Str 9\, App 123;München;;85822; ITEM1.X-ABADR:de NOTE:• member in NES from March 2013 on\, was our student before that BDAY;VALUE=DATE:19860513 UID:ad4f4a40-ab6a-4781-8b0d-b231560e5a87 REV;VALUE=DATE-TIME:20250215T164129Z END:VCARD
well, I guess this contact lurks around on my address book for some 15 yrs and follows me since then.
Just another example, also not displaying a textarea but one line (The data is anonymized, the note is 6 lines long as block):
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.4.2//EN
UID:5ad63fa5-8f7e-4979-b26c-32bf8ef81f86
FN:Judy Someone
N:Someone;Judy;;;
CATEGORIES:Cat1,Cat2,Cat3
TEL;TYPE=home;VALUE=UNKNOWN:+49 12 1234567
TEL;TYPE=cell;VALUE=UNKNOWN:+49 1234 1234567
EMAIL;TYPE=PREF:[email protected]
ITEM1.X-ABLABEL:Internet
ITEM1.URL;VALUE=URI:Address;
BDAY;VALUE=DATE:20091203
RELATED;TYPE=other;VALUE=TEXT:Just A Name
RELATED;TYPE=other;VALUE=TEXT:Just another name
NOTE:line1\nline2\n
line3\nline4\n--\nline5\n\
nline6
CLOUD;TYPE=HOME:[email protected]
RELATIONSHIP:CHILD
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUA
AQEAAAIYAAAAAAIQAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAA
REV:20240603T074938Z...
END:VCARD
Here is the VCF related to my comment above:
Export from Nextcloud:
BEGIN:VCARD
VERSION:3.0
ADR;TYPE=work,pref:;;Kuftenstraße 17/1;Langenau;;89129;
FN:Dr. med. Knoop\, Corinna
NOTE:Öffnungszeiten\nMo 8-12\, 16-18\nDi 8-12\, 16-18\nMi 8-12\nDo 8-12\,
16-20\nFr 8-12
PRODID:-//Open-Xchange//7.10.6-Rev73//EN
REV:20210201T070910Z
N:Knoop;Corinna;;Dr. med.;
TEL;TYPE=voice,work:+49 7345 928555
UID:9d06e70f-ccdd-4a7f-9685-4928a8dfa64d
END:VCARD
Note that I recently migrated from Open Xchange. Please find here the original VCF of OX that I imported to Nextcloud. There isn't really a difference but maybe it helps ...
BEGIN:VCARD
VERSION:3.0
ADR;TYPE=work,pref:;;Kuftenstraße 17/1;Langenau;;89129
FN:Dr. med. Knoop\, Corinna
NOTE:Öffnungszeiten\nMo 8-12\, 16-18\nDi 8-12\, 16-18\nMi 8-12\nDo 8-12\, 1
6-20\nFr 8-12
PRODID:-//Open-Xchange//7.10.6-Rev73//EN
REV:2021-02-01T07:09:10Z
N:Knoop;Corinna;;Dr. med.
TEL;TYPE=voice,work:+49 7345 928555
END:VCARD
Edit: I am in the meantime on Contacts 7.3.5 and Nextcloud 31.0.10 (Community Docker version) and still face the issue.
Thanks a lot for your examples everyone! We''l take a look.
The hole problem is how its stored in the database.
If its stored like this:
BEGIN:VCARD
VERSION:3.0
UID:pas-id-b5471dc44a5392255cd8403d65eb81236d8c9d27
FN:?
X-EVOLUTION-FILE-AS:?
X-MOZILLA-HTML:FALSE
REV:20251105T054619Z
NOTE:Notes test.\nTesting exports from Evolution to Nextcloud.\n===============
=================\n
END:VCARD
It ends op as a one liner, but if its stored as:
BEGIN:VCARD
VERSION:4.0
PRODID:-//Nextcloud Contacts v8.0.6
UID:586d93e4-3f2e-43aa-a259-e34df683c18d
REV;VALUE=DATE-TIME:20251105T054608Z
FN:?
NOTE:Notes test.\nTesting exports from Evolution to Nextcloud.\n===========
=====================\n
END:VCARD
All is ok.
Seems there is an import/export problem because exporting the V4.0 version and back creates an V3.0 version with a one liner.
So V4.0 ends up reimporting as:
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
UID:586d93e4-3f2e-43aa-a259-e34df683c18d
REV;VALUE=DATE-TIME:20251105T054608Z
FN:?
NOTE:Notes test.\nTesting exports from Evolution to Nextcloud.\n===========
=====================\n
END:VCARD
And becomes a one liner.
If you change VERSION to 4.0 before importing it will accept line-breaks again....
BEGIN:VCARD
VERSION:4.0
PRODID:-//Sabre//Sabre VObject 4.5.6//EN
UID:586d93e4-3f2e-43aa-a259-e34df683c18d
REV;VALUE=DATE-TIME:20251105T054608Z
FN:?
NOTE:Notes test.\nTesting exports from Evolution to Nextcloud.\n===========
=====================\n
END:VCARD
The only problem with this is that it wont accept pictures/avatars any more. It will error out and never gets imported.
So, if I do a SQL query above the Database with change from 3 to 4 and ending up with a /n > The contacts App will be useable again?
Already tried that for a test note see comment https://github.com/nextcloud/contacts/issues/4605#issuecomment-3193080698
