View Issue Details

IDProjectCategoryView StatusLast Update
0002870SOGo Connectorpublic2014-09-25 17:02
Reporteresco Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platform[Client] MicrosoftOSWindowsOS Version7
Product Version31.0.0 
Target Version31.0.0Fixed in Version31.0.0 
Summary0002870: Thunderbird 31: address auto complete not working
Description

Hello,

with Thunderbird 31 the auto complete of addresses doesn't work anymore.

esco

Additional Information

Thuderbird error console:

Zeitstempel: 23.07.2014 16:02:53
Fehler: this._parser.makeFullAddress is not a function
Quelldatei: jar:file:///C:/Users/<user>/AppData/Roaming/Thunderbird/Profiles/saswfx13.default/extensions/sogo-connector@inverse.ca.xpi!/components/SOGoConnectorAutocompleteSearch.js
Zeile: 326

Zeitstempel: 23.07.2014 16:02:53
Fehler: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIAbDirectoryQuery.doQuery]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "JS frame :: resource://gre/components/nsAbLDAPAutoCompleteSearch.js :: startSearch :: line 262" data: no]
Quelldatei: resource://gre/components/nsAbLDAPAutoCompleteSearch.js
Zeile: 262

TagsNo tags attached.

Activities

sysadmin@vrvis.at

sysadmin@vrvis.at

2014-08-01 16:28

reporter   ~0007377

Last edited: 2014-08-01 16:29

Hi,

We have written a patch (see attached files) for the connector which fixes the autocomplete issue.

The sorting of the entries may still be a bit wonky, but at least the names are being displayed and tab-completion is working again.

regards,

schorsch

sysadmin@vrvis.at

sysadmin@vrvis.at

2014-08-01 16:28

reporter  

sogo-connector-fix-autocompletion_v1.diff (3,011 bytes)   
--- components/SOGoConnectorAutocompleteSearch.js	2014-08-01 11:56:36.944375179 +0200
+++ components/FIXED-SOGoConnectorAutocompleteSearch.js	2014-08-01 18:13:53.225403961 +0200
@@ -41,6 +41,7 @@
  */
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+Components.utils.import("resource:///modules/mailServices.js");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 let commentColumn = null;
@@ -71,6 +72,10 @@
         return this._searchResults[aIndex].value;
     },
 
+    getLabelAt: function getLabelAt(aIndex) {
+        return this.getValueAt(aIndex);
+    },
+
     getCommentAt: function getCommentAt(aIndex) {
         return this._searchResults[aIndex].comment;
     },
@@ -83,6 +88,10 @@
         return "";
     },
 
+    getFinalCompleteValueAt: function(aIndex) {
+        return this.getValueAt(aIndex);
+    },
+
     removeValueAt: function removeValueAt(aRowIndex, aRemoveFromDB) {
     },
 
@@ -98,13 +107,7 @@
 
     /* nsISupports */
 
-    QueryInterface: function(aIID) {
-        if (!aIID.equals(ACR)
-            && !aIID.equals(Components.interfaces.nsIAbAutoCompleteResult)
-            && !aIID.equals(Components.interfaces.nsISupports))
-            throw Components.results.NS_ERROR_NO_INTERFACE;
-        return this;
-    }
+    QueryInterface: XPCOMUtils.generateQI([ACR, nsIAbAutoCompleteResult])
 };
 
 function SOGoConnectorAutocompleteSearch() {}
@@ -113,10 +116,9 @@
     // This is set from a preference,
     // 0 = no comment column, 1 = name of address book this card came from
     // Other numbers currently unused (hence default to zero)
-    _parser: Components.classes["@mozilla.org/messenger/headerparser;1"]
-                       .getService(Components.interfaces.nsIMsgHeaderParser),
-    _abManager: Components.classes["@mozilla.org/abmanager;1"]
-                          .getService(Components.interfaces.nsIAbManager),
+    _parser: MailServices.headerParser,
+    _abManager: MailServices.ab,
+    applicableHeaders: Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
 
     // Private methods
 
@@ -320,10 +322,10 @@
     _addToResult: function _addToResult(directory, card, emailToUse,
                                         isPrimaryEmail, result) {
         let emailAddress =
-            this._parser.makeFullAddress(card.displayName,
-                                         card.isMailList ?
-                                         card.getProperty("Notes", "") || card.displayName :
-                                         emailToUse);
+            this._parser.makeMailboxObject(card.displayName,
+                                           card.isMailList ?
+                                           card.getProperty("Notes", "") || card.displayName :
+                                           emailToUse).toString();
 
         // The old code used to try it manually. I think if the parser can't work
         // out the address from what we've supplied, then its busted and we're not
esco

esco

2014-08-06 12:19

reporter   ~0007397

Thanks schorsch! Works for me.

ludovic

ludovic

2014-09-25 17:02

administrator   ~0007548

Fix pushed, thanks!

https://github.com/inverse-inc/sogo-connector.tb31/commit/c39e4178a4183bcd30bd88cfb86f7f7f99cb221a

Issue History

Date Modified Username Field Change
2014-07-23 14:04 esco New Issue
2014-08-01 16:28 sysadmin@vrvis.at Note Added: 0007377
2014-08-01 16:28 sysadmin@vrvis.at File Added: sogo-connector-fix-autocompletion_v1.diff
2014-08-01 16:29 sysadmin@vrvis.at Note Edited: 0007377
2014-08-06 12:19 esco Note Added: 0007397
2014-09-25 17:02 ludovic Product Version 24.0.4 => 31.0.0
2014-09-25 17:02 ludovic Target Version => 31.0.0
2014-09-25 17:02 ludovic Note Added: 0007548
2014-09-25 17:02 ludovic Status new => resolved
2014-09-25 17:02 ludovic Fixed in Version => 31.0.0
2014-09-25 17:02 ludovic Resolution open => fixed
2014-09-25 17:02 ludovic Assigned To => ludovic