Bug 121337 - kmail don't show my addressbook
Summary: kmail don't show my addressbook
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.9.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 120532 121139 122167 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-04 02:06 UTC by Paulo Fidalgo
Modified: 2007-09-14 12:17 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Fidalgo 2006-02-04 02:06:35 UTC
Version:           1.9.1 (using KDE 3.5.1, Gentoo)
Compiler:          gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.14-gentoo-r2

I've upgraded from kde  to kde  and now I can't select my addressbook from the list, when I try to send an email.

When I will select a recipient (using the select button on right), I only get "All", "Distribution Lists", "Recent Addresses" and "Selected recipients". and I can't find my addressbook.

I have all the addresses when I open the kaddressbook, and kopete is working nice with it, so it's a kmail bug.


Thanks for attention!
Comment 1 GorDy-- 2006-02-06 02:08:12 UTC
I have exactly the same bug with FC4
Comment 2 Paulo Fidalgo 2006-02-06 02:22:52 UTC
is there any way to get an higher priority on this bug???
this makes kmail unusable for me :S
and a patch addressing the prob should come out soon for distro integration, since this version isn't in the stable version branch yet.
But i would like to listen the devs opinion.

Thanks for attention!
Comment 3 Jan Callewaert 2006-02-06 11:57:39 UTC
Bug #121391 is probably a duplicate of this bug. Ok, I can reproduce it, but there is something really strange with this. Can please somebody try if the same things happen on his computer?

1st. Make kmail start up to a folder without any messages. (Settings -> Configure kmail -> Misc -> assign an empty folder)

2nd. Close kmail and restart it again. Press Ctrl-N and select, you should see all your contacts. Press cancel in the contact windows, and click select again. All your contacts are present. Cancel again and close the new message.

3rd. Press again Ctrl-N and then select, no contacts anymore :(

4th. Try to change the startup folder to a non-empty folder, and repeat the same steps, you should not see some contacts anymore if you click select.

Very strange if you ask me. In contrary to what I said in the other bug, cleaning your profile doesn't work.
Comment 4 GorDy-- 2006-02-07 14:25:41 UTC
I tried to close/open kmail and than I had a windows of opportunities to acces to my address book. Unfortunately, I can't acces it anymore after that I oppened a "new mail" windows.

I didn't reset any of my configuration to reproduce this bug, I only close my kmail client and save my kaddressbook.

Regards
Comment 5 Paulo Fidalgo 2006-02-07 17:47:02 UTC
well I've tried the #3 step, but I don't see the addressess, only ALL, not my addressbook (personal).
Comment 6 Raphaël Pinson 2006-02-11 21:18:39 UTC
Jan's reprocucing scheme tried and working... This is really weird...
4th step is not necessary, since the empty folder stays empty, so I just have to quite and open kmail for it to work again.
Comment 7 Carsten Schlipf 2006-02-15 20:48:27 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Carsten Schlipf 2006-02-15 20:51:06 UTC
I also faced this bug and entered an duplicate, which might contain some more information (http://bugs.kde.org/show_bug.cgi?id=121696). To me it seems like this appears any time, when you open the composer for the second time. This includes a running systray applet.
Comment 9 GorDy-- 2006-02-18 19:08:00 UTC
I wrote a e-mail to someone and when I began to write his name the auto-completion show me the complete mail that is actually in my address book. I still don't see my contact when I push the "Select" button but the auto-completion seems to it.

Comment 10 Paulo Fidalgo 2006-02-19 13:04:59 UTC
Well, I've tried this version with a new user, and after creating some entries in the addressbook, I have it on kmail, even after rename the addressbook.

I will now try some to solve the problem.
Comment 11 Paulo Fidalgo 2006-02-19 16:26:44 UTC
It works for a new user only.
I've deleted all my .kde dir and when I configure kmail with my email settings I cannot "Select" the addressbook.

that's really strange, because it should work like it does with the new user.

Another weird thing, is the behaviour described by GorDy in #9, wich I confirm.
Comment 12 Daniel Watkins 2006-02-22 00:54:16 UTC
I'm using KMail as the mail component within Kontact and, no matter what of the above 'workarounds' I try, I cannot get the address book from the Address Book to show in KMail.
Comment 13 David 2006-02-23 05:24:02 UTC
I removed KDE 3.5.1 because of this and went back to 3.5.0. Now after coming
back I see it is 3.5.1 with Kmail 1.9.1 that is the problem.

My contacts are there. Can see them in Kontact and works with 'dir address book' and 'file address book'. Can also see my contacts when pick the Address Book
from within Kmail. Both show that I have created two types (dir and file) and
that 'dir address book' is active and the Proper Contacts I put there are
shown. 

What doesn't work is when Compose email and try to select a contact email
addressbook with 'Select' button in the "To:" line with Composer, the ones
listed in original posters list are the only ones shown. (ie there is no 
choice for 'dir address book' or 'file address book')

If pick one of the others can get my email addresses to show, but they're mixed
in with bunch of others like: most recent, all,.....  

Going to see if can get my old notes out on how to compile debug into KDE
with Gentoo. Doesn't always work and KDE isn't really helpful when it comes
to debuging for the average person. They are trying to integrate all this into
Kontact, so I don't know who the problem is with: Kontact, Kmail or just the
Composer???



Comment 14 Anselmo 2006-02-23 22:26:12 UTC
I'm on debian testing, using Kontact, Kmail 1.9.1. Composer select button show all the address and filter selection only the first time you open it. You have to close and reopen kontact to see it work again. Address Book module of kontact works normally.
Comment 15 Paulo Fidalgo 2006-02-23 22:54:51 UTC
I've tested the procedure in #14 and still no lucky.
Comment 16 Paulo Fidalgo 2006-02-24 23:05:39 UTC
well some other info that I would like to append to my #11:

It only works for the first time I open the composer, because if I close the composer and try again, the addressbook is missing again.

I have this message on konsole when I click select:

kio_file: WARNING: KLocale: trying to look up "" in catalog. Fix the program

but I don't have kmail compiled with debug option.
Comment 17 Daniel Watkins 2006-02-25 03:59:02 UTC
Using Kontact with debig neabled and gdb, I got the following output (this is all that is relevant):
kontact (core): Part activated: 0xaafb20 with stack id. 3
kmail: KMailPart::guiActivateEvent
kontact: KMComposeWin::slotUpdateFont
kmail: KMComposeWin::readConfig. Daniel Watkins
kontact: KMComposeWin::slotUpdateFont
kmail: KMComposeWin::rethinkFields
kmail: KMComposeWin::rethinkFields
kmail: [void KMComposeWin::initAutoSave()]
kmail: + Text/Plain
kmail: ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE )
kmail: partNode::findType() is looking at Text/Plain
kontact: RecipientsPicker::insertCollection() All  index: 0
kontact: RecipientsPicker::insertCollection() Distribution Lists  index: 1
kontact: RecipientsPicker::insertCollection() Recent Addresses  index: 2
kontact: RecipientsPicker::insertCollection() Selected Recipients  index: 3

Don't know how much this helps (feel free to email me with a better way to obtain output).
Comment 18 David 2006-02-25 05:45:56 UTC
Ya, I recompiled kdepim-3.5.1 in gentoo with USE="debug" and FEATURES="nostrip"
and got pretty much the same thing. Which only really confirms that the app
is only inserting what the original poster said.

ie: I only get "All", "Distribution Lists", "Recent Addresses" and "Selected recipients". 

It doesn't look like it is erroring out or can't find the 'dir address book'
or 'file address book', I also noticed that 'resource-name' isn't available
like it use to be. So far I haven't been able to find in the code how it
gets them (the missing ones) even in the versions that work. Mine are there 
though and good. I am going back to 3.5.0 right now. Hopefully I can debug
enough to see how it retrieves the missing ones. Going to see if can
add more kdDebug()'s to get a better grip on this. I don't get the feeling
it is going to be fixed soon unless we figure out something.

I have been going thru recipientspicker.cpp on 3.5.0 and 3.5.1. Pretty much
the same. They split part of the code in RecipentsPicker::initCollections to
another function Recipients::insertAddressBook and reorganized both a bit.

#include <kabc/stdaddressbook.h> is not included in 3.5.1

They added this to 3.5.1:
  {
    using namespace KABC;
    mAddressBook = KABC::StdAddressBook::self( true );
    connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
             this, SLOT( insertAddressBook( AddressBook * ) ) );
  }

I'm not real good with C/C++ so haven't been able to fix it yet, tried
couple things, got nothing different once, next two times compile errors.


Comment 19 David 2006-02-25 07:02:18 UTC
I'm getting short on time, but found this. Looks interesting, explains how
it works:
http://websvn.kde.org/branches/KDE/3.5/kdelibs/kabc/HOWTO?rev=438982&view=markup
Not sure how much help it will be though, doesn't look up to date.

Some other stuff to look at that might help:
http://websvn.kde.org/branches/KDE/3.5/kdelibs/kabc/README?rev=438982&view=markup
Here is the most recent diffs, look like the ones I saw in my sdiff view. You
will see some stuff looks removed, but is just moved. Should be pretty much like
I described above:
http://websvn.kde.org/branches/KDE/3.5/kdepim/kmail/recipientspicker.cpp?rev=497767&r1=438982&r2=497767
Comment 20 David 2006-02-25 07:05:39 UTC
Sorry, didn't notice this until posted. From what I see in 3.5.0 and everything
works, then in 3.5.1 where some of our address books aren't working correctly.
Looks like the diffs I mention are what was done to fix BUG: http://bugs.kde.org/show_bug.cgi?id=117118

Guessing it caused another bug.
Comment 21 Till Adam 2006-02-25 12:19:56 UTC
SVN commit 513401 by tilladam:

Fix regression apparently introduced by Bram's fix for #117118, if the
analysis in #121337 is not completely off. Based on a patch by Kanniball
<kanniball@zmail.pt>. Thanks.

BUG: 121337
CCMAIL: kanniball@zmail.pt
CCMAIL: bramschoenmakers@kde.nl


 M  +2 -0      recipientspicker.cpp  


--- branches/KDE/3.5/kdepim/kmail/recipientspicker.cpp #513400:513401
@@ -365,6 +365,8 @@
   mAllRecipients->setTitle( i18n("All") );
   insertCollection( mAllRecipients );
 
+  insertAddressBook( mAddressBook );
+
   insertDistributionLists();
 
   insertRecentAddresses();
Comment 22 David 2006-02-26 01:09:35 UTC
Thanks Till!!

I applied the patch and works great. I thought it looked like mAddressBook
wasn't being called, but my C/C++ is wanting. So didn't know quite how to do it
or wasn't totally sure it wasn't being called and couldn't see it. 

Tried 'file address book' and 'dir address book' and both work when select
a recipient. Also, didn't remember putting one of my Family members in Family
'Category' and it is showing up now as a recipient selection. Maybe it was 
there before in kmail 1.9 and overlooked it?

Anyway, working great, Thanks a lot!!
Comment 23 Bram Schoenmakers 2006-02-27 20:28:23 UTC
Thanks for the heads up.
Comment 24 Raphaël Pinson 2006-03-06 17:21:09 UTC
Thanks much, adding the patch to Kubuntu :)
Comment 25 Andres 2006-03-14 19:19:51 UTC
[beginner]How do you apply the patch?
Comment 26 Bram Schoenmakers 2006-03-14 19:32:59 UTC
I think that's quite hard for a beginner, since you need the source code for this patch.

If you don't mind waiting for a few weeks, you can also upgrade to KDE 3.5.2 which will be released in the end of March.
Comment 27 Paulo Fidalgo 2006-03-15 00:04:49 UTC
well, if you don't know how, you should open one bug report at your distro.
I've opened one in gentoo (wich is still open, but I leave an ebuild there), I have one replay from kubuntu saying that the patch has been applied.

The best way is let the distro upgrade it and wait, or otherwise you need to read more, because dealing with the sourcecode in some distros is not an easy task.
Comment 28 Ismail Onur Filiz 2006-03-22 00:32:00 UTC
*** Bug 121139 has been marked as a duplicate of this bug. ***
Comment 29 Ismail Onur Filiz 2006-03-28 21:03:04 UTC
*** Bug 122167 has been marked as a duplicate of this bug. ***
Comment 30 Tobias Koenig 2006-03-31 13:47:42 UTC
*** Bug 123184 has been marked as a duplicate of this bug. ***
Comment 31 Ismail Onur Filiz 2006-04-22 07:25:07 UTC
*** Bug 120532 has been marked as a duplicate of this bug. ***
Comment 32 Carsten Schlipf 2006-04-25 16:24:31 UTC
Thanks for fixing this bug.

However currently it seems that one minor problem exists. The order of the address books is different the first time you open the address selection dialog than in subsequent uses.