Bug 39279 - Search for Thunderbird address books uses first ones found
Summary: Search for Thunderbird address books uses first ones found
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.4.2 RC2
Hardware: Other Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:4.4.3 target:5.0.0
Keywords:
Depends on:
Blocks: Address-Source
  Show dependency treegraph
 
Reported: 2011-07-16 06:52 UTC by Joseph Sylvester
Modified: 2017-12-06 20:45 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Sylvester 2011-07-16 06:52:06 UTC
When creating an address data source for Thunderbird by connecting to an existing database under Linux (specifically Ubuntu 11.04), LO 3.4.2 RC (and probably earlier verrsions ) apparently searches for the first *.mab (address books) files it finds and uses those address books as the basis for the database source. In my system, I have (had) address books for Seamonkey that are located under ~/.mozilla/seamonkey. LO finds the Seamonkey address books before it sees the Thunderbird address books located under ~/.thunderbird . I removed the seamonkey directory, and LO found the correct Thunderbird address books. I do not know if this is a general OS problem or just under Linux.
Comment 1 Björn Michaelsen 2011-12-23 12:21:44 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 2 Jochen 2012-07-27 15:00:09 UTC
Hi Joseph,

are you using 3.5? The last stable version is 3.5.5. Is bug still in 3.5.5?
Comment 3 Joseph Sylvester 2012-07-27 15:33:25 UTC
This bug was there in LO 3.4. This was a Linux bug only. I have abandoned Linux and so I cannot test whether bug still exists. But if there hasn't been a fix submitted, it must still be there.
Comment 4 Jochen 2012-07-27 15:43:34 UTC
@ Lunixer,

what is your opinion: bug in Lunix?
Comment 5 Joseph Sylvester 2012-07-27 15:59:23 UTC
My opinion is that this is a bug in the Linux version of LO.
Comment 6 NoOp 2012-12-13 00:26:16 UTC
It's not just a linux issue. I have the exact same issue with LO 3.4.6.3 linux and Windows (WinXP SP3 & Win7):
Version 3.6.4.3 (Build ID: 2ef5aff)
Comment 7 Julien Nabet 2014-06-18 12:01:23 UTC
Any update with more recent LO version? (last stable one is 4.2.4)
Comment 8 Joseph Sylvester 2014-06-18 20:49:49 UTC
I am sorry, but I no longer use LibreOffice (LO). From what I can recall, the program searches for various address books when creating data files for labels. At the time I reported this, I was running both Linux and Windows. I used Thunderbird on both platforms. The Linux LO found my Thunderbird address book, but the Windows LO version did not. It seemed like LO performed the same linear search for both platforms, not different cases of each supported address book.
Thunderbird obviously cannot maintain the same file structure on both Linux and Windows platforms.
Comment 9 Alex Thurgood 2015-01-03 17:06:52 UTC
Adding David to CC, as I believe he knows more about the mozab code than anyone else
Comment 10 Julien Nabet 2015-01-03 17:30:50 UTC
It seems we could change order here:
     66     static const char* DefaultProductDir[NB_PRODUCTS][NB_CANDIDATES] =
     67     {
     68     #if defined(XP_WIN)
     69         { "Mozilla/SeaMonkey/", NULL, NULL, NULL },
     70         { "Mozilla/Firefox/", NULL, NULL, NULL },
     71         { "Thunderbird/", "Mozilla/Thunderbird/", NULL, NULL }
     72     #elif defined(MACOSX)
     73         { "../Mozilla/SeaMonkey/", NULL, NULL, NULL },
     74         { "Firefox/", NULL, NULL, NULL },
     75         { "../Thunderbird/", NULL, NULL, NULL }
     76     #else
     77         { ".mozilla/seamonkey/", NULL, NULL, NULL },
     78         { ".mozilla/firefox/", NULL, NULL, NULL },
     79         { ".thunderbird/", ".mozilla-thunderbird/", ".mozilla/thunderbird/", ".icedove/" }
     80     #endif
     81     };
see http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/mork/MNSFolders.cxx#69
I thought about just take the reverse order:
Thunderbird, then Firefox, then Seamonkey

This part is a copy paste of mozab part.
BTW, do we still need mozab part now there's mork driver?

David: any thoughts?
Comment 11 Alex Thurgood 2015-01-03 17:38:30 UTC
Adding self to CC if not already on
Comment 12 Julien Nabet 2015-03-07 18:59:54 UTC
Lionel: I just noticed you weren't on cc. Thought you might have an opinion about this tracker and also about my comment here:
https://bugs.documentfoundation.org/show_bug.cgi?id=39279#c10
Comment 13 Lionel Elie Mamane 2015-03-07 19:22:19 UTC
(In reply to Julien Nabet from comment #10)
> It seems we could change order here:
>      66     static const char* DefaultProductDir[NB_PRODUCTS][NB_CANDIDATES]
> =

Yes, that's adequate. Even better would be to let the user choose,
through specifying it in the SDBC URL :)

> I thought about just take the reverse order:
> Thunderbird, then Firefox, then Seamonkey

Firefox has an address book? I'm surprised. Based on the absence
of an address book in Firefox, I would do:

  Thunderbird
  Firefox
  Seamonkey

> This part is a copy paste of mozab part.
> BTW, do we still need mozab part now there's mork driver?

Does Windows use mork now, not mozab? I'm not sure anymore.
Comment 14 Lionel Elie Mamane 2015-03-07 19:25:07 UTC
(In reply to Lionel Elie Mamane from comment #13)

>> I thought about just take the reverse order:
>> Thunderbird, then Firefox, then Seamonkey

> Firefox has an address book? I'm surprised. Based on the absence
> of an address book in Firefox, I would do:
 
>   Thunderbird
>   Firefox
>   Seamonkey


Raah, I meant:

   Thunderbird
   Seamonkey
   Firefox
Comment 15 Julien Nabet 2015-03-07 20:14:26 UTC
Lionel: what about changing the order to fix this one and create an enhancement bugtracker about the order?

About Mork and Windows, I think Mork isn't used for Windows since there's still lacking Outlook and Outlook Express support, see tdf#56903 and tdf#56905 put in See Also.
Comment 16 DavidO 2015-03-07 23:05:22 UTC
(In reply to Julien Nabet from comment #15)
> Lionel: what about changing the order to fix this one and create an
> enhancement bugtracker about the order?
> 
> About Mork and Windows, I think Mork isn't used for Windows since there's
> still lacking Outlook and Outlook Express support, see tdf#56903 and
> tdf#56905 put in See Also.

Since 64 bit LO Windows port is available, that's not correct. See my comment here: [1]. I am suggesting to do the same for 32 bit Windows build: stop linking against ancient seamonkey library and switch to our mork driver.

Yes, Outlook Express and Outlook address books wouldn't be supported any more, but who cares?

[1] https://wiki.documentfoundation.org/Development/msvc-x86_64#Connectivity:_discontinue_ancient_seamonkey_based_drivers_and_enable_mork_driver_.28FIXED.29
Comment 17 Lionel Elie Mamane 2015-03-08 02:29:34 UTC
(In reply to Julien Nabet from comment #15)
> Lionel: what about changing the order to fix this one and create an
> enhancement bugtracker about the order?

Changing the order enhances the situation, since most people would expect Thunderbird to take precedence over Seamonkey, which is much less used these days. But I don't take it as fully satisfying, since then for the few users that have both, they really are locked out of one of their address books. If I have to choose between "no patch" and "patch that only changes the order of precedence", obviously I choose the latter ;)

As to "enhancement bugtracker" see bug 57873
Comment 18 Commit Notification 2015-03-08 19:46:35 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9b92d8afbabe564de703f8bc083723d97e765011

tdf#39279: Prioritise Thunderbird address books in first-match search

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2015-04-05 09:51:58 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d30ac3f4ec7af078b1c96ab1b4dd5d9b2089d47b

Revert "tdf#39279: Prioritise Thunderbird address books in first-match search"

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Julien Nabet 2015-04-05 20:42:34 UTC
My patch was wrong, see https://gerrit.libreoffice.org/#/c/15164/ for details.

Another patch is in review, see https://gerrit.libreoffice.org/#/c/15163/
Comment 21 Commit Notification 2015-04-07 12:38:33 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6b275af6e00fd5b1ff96eb271ad09f7bf75e9865&h=libreoffice-4-4

tdf#90446 Revert "tdf#39279: Prioritise Thunderbird address books..."

It will be available in 4.4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2015-04-07 12:39:45 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=21a8671e24fe19a3ba5ef14c991bae302234b229

tdf#39279: Search for Thunderbird address books uses first ones found

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2015-04-09 08:14:55 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8484671379cacd4d1541c2e0629b99f7fbcbd4dc&h=libreoffice-4-4

tdf#39279: Search for Thunderbird address books uses first ones found

It will be available in 4.4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 Julien Nabet 2015-04-09 08:21:59 UTC
To explain a bit what happened:

When I thought fixing this one, I created a regression (see tdf#90446, thank you Robert for having noticed it!).
So I had to revert the patch and I pushed the right fix suggested by Lionel (thank you to him!).

In brief, it should work on 4.4.3 and 5.0.0 as indicated in Target field.

Really sorry for this mess.