my vCard forgets values (preferred email format and jabber id)

VERIFIED FIXED in Thunderbird 24.0

Status

MailNews Core
Address Book
--
minor
VERIFIED FIXED
4 years ago
11 months ago

People

(Reporter: Justus Seifert, Assigned: aceman)

Tracking

Thunderbird 24.0
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

4 years ago
Created attachment 758121 [details]
screenshot_bug_vcard_thunderbird.png

User Agent: Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130514164240

Steps to reproduce:

I opened my vCard in the Accounts settings and changed the value of "Prefers to receive messages fomated as:" and "Jabber ID:". I clicked ok and after that opened the vcard editor again. 


Actual results:

My settings were not present. In fact the drop down for the format did not show any viable option but instead was resized to a very flat slab without text.  the Jabber ID


Expected results:

The drop down menu should have showed text with my selection from earlier and the field for the jabber id should have contained the jabber id I entered.
(Reporter)

Updated

4 years ago
Severity: normal → minor

Updated

4 years ago
Component: Preferences → Account Manager
(Assignee)

Comment 1

4 years ago
Confirming and taking.
Assignee: nobody → acelists
Status: UNCONFIRMED → NEW
Component: Account Manager → Account Manager
Ever confirmed: true
Product: Thunderbird → MailNews Core
"Prefers to receive messages fomated as:" shouldn't actually be displayed on the Vcard - that's a Thunderbird address book specific thing and there's nothing in vcard that would let that be recorded (or even interpreted at the other end).

Jabber id & other instant messaging ids there might be, but we'd need to check the vcard 2.1 spec (which we vaguely implement), and then see if we can implement support for those fields.
(Assignee)

Comment 3

4 years ago
Thanks for the hints.
I have not found any mention of IM/chat nicks in the spec at http://www.imc.org/pdi/vcard-21.txt .

So I try to hide the mentioned unsupported fields.
Component: Account Manager → Address Book
(Reporter)

Comment 4

4 years ago
@aceman: thank you.  one thing to note: thunderbird supports the preferred mail format in .vcf files through an extension.  i dont know if this is legit in vcf but it might work.  the string in the file looks like this: 
x-mozilla-html:FALSE
(Assignee)

Comment 5

4 years ago
Yes, that is true. And the bug is that we need to convert from FALSE/TRUE to values of 1 or 2 for the dropdown.

Justus, have you tried that other Thunderbird can receive this setting from a sent vCard and use it properly? If yes, we could keep it in.

Standard8, could we keep the field in as it is clearly marked as an extension? I have tested that the field (x-mozilla-html) is stored in the vcard in prefs.js. we just fail to show it in the dialog at later read attempt.
Flags: needinfo?(mbanner)

Comment 6

4 years ago
> Product/Component: MailNews Core :: Address Book

Hmm, I thought that vCard is kept in nsIMsgIdentity, hence Account Management?
(Reporter)

Comment 7

4 years ago
before i test weather thunderbird can receive proper data from this extension in vcards i would like to request that a similar extension for xmpp is added.  something like this:
x-mozilla-xmppid:example@example.com
(Reporter)

Comment 8

4 years ago
Ok thunderbird seems to understand its own vcf extension:  when i opened the vcard i was shown the same messed up drop down menu.
it appears all that is missing is indeed the conversion to the correct values for display.
Flags: needinfo?(mbanner)
(Assignee)

Comment 9

4 years ago
(In reply to Justus Seifert from comment #7)
> before i test weather thunderbird can receive proper data from this
> extension in vcards i would like to request that a similar extension for
> xmpp is added.  something like this:
> x-mozilla-xmppid:example@example.com

Please file this as a new enhancement request bug.

In this bug I hide the chat fields so that it does not look like we support them already.
(Assignee)

Comment 10

4 years ago
Created attachment 758778 [details] [diff] [review]
patch

So I hide the Chat fields but preserve the "prefers HTML" dropdown, just decode it properly. I also added Seamonkey version but as I could not test it I don't know whether it is needed.
Attachment #758778 - Flags: review?(mbanner)
Attachment #758778 - Flags: review?(iann_bugzilla)
(Assignee)

Updated

4 years ago
Status: NEW → ASSIGNED
Comment on attachment 758778 [details] [diff] [review]
patch

Review of attachment 758778 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/addrbook/content/abCardOverlay.js
@@ +499,5 @@
>    var popup = document.getElementById("PreferMailFormatPopup");
> +  if (popup) {
> +    let format = cardproperty.getProperty("PreferMailFormat", "");
> +    popup.value =
> +      (format == "TRUE") ? Components.interfaces.nsIAbPreferMailFormat.html : (

This is the wrong place to do this conversion, as it means that we'll potentially have nsAbCardProperty objects in the system with two types of value for the nsIAbPreferMailFormat.

I think this conversion should be done somewhere around http://hg.mozilla.org/comm-central/annotate/0c54a5703d29/mailnews/addrbook/src/nsAbManager.cpp#l1120 in the AB itself.

@@ +537,5 @@
>  // by vCard so the user does not try to edit them.
>  function HideNonVcardFields()
>  {
>    document.getElementById("homeTabButton").hidden = true;
> +  document.getElementById("chatTabButton").hidden = true;

Just to note, this is fine. As you mentioned, handling the other extensions for the ids should be done in a different bug.
Attachment #758778 - Flags: review?(mbanner) → review-
(Assignee)

Comment 12

4 years ago
Thanks. So invert the logic from http://hg.mozilla.org/comm-central/file/3c7cb0989fef/mailnews/addrbook/src/nsAbCardProperty.cpp#l512, where only kPreferMailFormatProperty is handled as Uint32, others are String.
convertNameValue() is missing this special casing of kPreferMailFormatProperty.
(Assignee)

Comment 13

4 years ago
Created attachment 760591 [details] [diff] [review]
patch v2

OK, seems to work.
Attachment #758778 - Attachment is obsolete: true
Attachment #758778 - Flags: review?(iann_bugzilla)
Attachment #760591 - Flags: review?(mbanner)
Comment on attachment 760591 [details] [diff] [review]
patch v2

Review of attachment 760591 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great.
Attachment #760591 - Flags: review?(mbanner) → review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/cfb9aed1790d
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
(Reporter)

Updated

11 months ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.