Closed Bug 327872 Opened 18 years ago Closed 16 years ago

mozillaAbPersonAlpha.schema vs openldap == problems with "fax" field

Categories

(MailNews Core :: Address Book, defect, P4)

x86
All
defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b2

People

(Reporter: don, Assigned: standard8)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

I initally reported this on irc://irc.mozilla.org/maildev to dmose, who asked that I report it here.

Some background: I'm a developer on a project called jabook (http://jabook.sf.net), an LDAP addressbook front-end.  My home LDAP server runs openldap with the mozillaAbPersonAlpha schema loaded, which is on display at http://wiki.mozilla.org/MailNews:LDAP_Address_Books.  This schema uses the "fax" field, as opposed to the more commonly used "facsimileTelephoneNumber" that mozillaOrgPerson uses and which is defined in openldap's core.schema.

This core.schema also happens to list "fax" as an alias for "facsimileTelephoneNumber".  Now when my client creates a new contact with a "fax" field, the server is saving it as "facsimileTelephoneNumber".  Then when I try to save changes to that contact, I get this error:

LDAPException: Inappropriate Matching (18) Inappropriate Matching
LDAPException: Server Message: modify/add: facsimileTelephoneNumber: no equality matching rule

The more I think about it, the more it seems like openldap is incorrectly handling (or ignoring) the "fax" alias during edits.  However I want to get this down now that I've tracked it.

Reproducible: Always

Steps to Reproduce:
1. create entry in LDAP of type mozillaAbPersonAlpha with 'fax' data
2. try to edit that entry
3. boom.

Actual Results:  
LDAPException: Inappropriate Matching (18) Inappropriate Matching
LDAPException: Server Message: modify/add: facsimileTelephoneNumber: no equality matching rule

Expected Results:  
The fax data should save.

As I said, this bug may actually be on OpenLDAP's end, but wanted to get your thoughts on it.  Perhaps it would have been easier if mozillaAbPersonAlpha just used the "facsimileTelephoneNumber" field.

Note that Mozilla Thunderbird's addressbook reads the "facsimileTelephoneNumber" field from my LDAP server into it's fax field, so obviously that alias is working.
I edited jabook's map file to use "facsimileTelephoneNumber" instead of "fax", leaving your mozillaAbPersonAlpha.schema file as-is in my LDAP server.  That seemed to fix the editing bug, so that I can now add and edit fax numbers in contacts.  However I still get that "no equality matching rule" bug when trying to delete the fax number from the contact.

*shrug*
Product: Core → MailNews Core
Reporter, Can you confirm whether this problem is gone, or still exists on a current version of thunderbird?  

We are working to help old bugs move along, so your comment will be helpful.
Whiteboard: revisit 2008-12-18
I can't confirm or deny, I've stopped work on jabook a few years ago.
Now I've seen this bug again, I did a quick bit of investigation of the current schemas. As comment 0 says, fax is only mentioned as an alias in core.schema. In all other places I saw, it is either facsimileTelephoneNumber or something completely different.

Therefore I think we should make facsimileTelephoneNumber primary, and have fax as secondary. This should then work with the core.schema better.

Dan, as I expect you can work out, this patch is just affecting the search order/which field we return first. If you think this is right, then I'll update the schema on the wiki page as well when I check this in.
Assignee: nobody → bugzilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #351865 - Flags: superreview?(dmose)
Attachment #351865 - Flags: review?(dmose)
Priority: -- → P4
Whiteboard: revisit 2008-12-18
Target Milestone: --- → Thunderbird 3.0b2
Attachment #351865 - Flags: superreview?(dmose)
Attachment #351865 - Flags: superreview+
Attachment #351865 - Flags: review?(dmose)
Attachment #351865 - Flags: review+
Comment on attachment 351865 [details] [diff] [review]
Make facsimileTelephoneNumber the primary field

r+sr=dmose
Patch checked in: http://hg.mozilla.org/comm-central/rev/78d257dd2d18

I've also updated the wiki page here: https://wiki.mozilla.org/MailNews:Mozilla_LDAP_Address_Book_Schema
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.