Closed Bug 466753 Opened 16 years ago Closed 15 years ago

import Outlook Express settings from identity not named 'Main Identity' fails.

Categories

(MailNews Core :: Import, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b2

People

(Reporter: philbaseless-firefox, Assigned: philbaseless-firefox)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
Build Identifier: version 2.0.0.18 (20081105)

Outlook express installed with its wizard will install 'main identity' and list accounts under registry location TB is currently looking at.  If OExp uses imported or transferred settings or other identity created in any other manner will place settings under registry location that is not imported and TB fails to import settings.

refer to here for specific applicable details: http://www.insideoe.com/files/regkeys.htm

Reproducible: Always

Steps to Reproduce:
1.check outlook express identity to see if it is not 'main identity'
2.start TB and import settings.
3.popup indicating TB : An error occurred...  
Actual Results:  
Settings are not imported

Expected Results:  
Settings imported.

bug https://bugzilla.mozilla.org/show_bug.cgi?id=419597 may be related.  Those involved may want to try this patch.
Attachment #350093 - Flags: review?(bienvenu)
here's the diff from /thunderbird/source/mailnews/import/oexpress/nsOEImport.cpp
rev 1.44

--- nsoesettings.cpp	2008-11-24 10:08:21.789584200 -0600
+++ nsoesettingsrev.cpp	2008-11-24 14:07:57.508334200 -0600
@@ -171,6 +171,21 @@
 HKEY OESettings::FindAccountsKey( void)
 {
   HKEY  sKey;
+
+  if (::RegOpenKeyEx( HKEY_CURRENT_USER, "Identities", 0, KEY_QUERY_VALUE, &sKey) == ERROR_SUCCESS) {
+    BYTE *  pBytes = nsOERegUtil::GetValueBytes( sKey, "Default User ID");
+    ::RegCloseKey( sKey);
+    if (pBytes) {
+      nsCString  key( "Identities\\");
+      key += (const char *)pBytes;
+      nsOERegUtil::FreeValueBytes( pBytes);
+      key += "\\Software\\Microsoft\\Internet Account Manager\\Accounts";
+      if (::RegOpenKeyEx( HKEY_CURRENT_USER, key.get(), 0, KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, &sKey) == ERROR_SUCCESS) {
+        return( sKey);
+      }
+    }
+  }
+
   if (::RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\Microsoft\\Internet Account Manager\\Accounts", 0, KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, &sKey) == ERROR_SUCCESS) {
     return( sKey);
   }
Status: UNCONFIRMED → NEW
Ever confirmed: true
Damn bugzilla...
Component: Migration → Import
Product: Thunderbird → MailNews Core
QA Contact: migration → import
Version: unspecified → Trunk
Assignee: nobody → philbaseless-firefox
I built from: thunderbird-2.0.0.18-source.tar.bz2
which has file cvs:
/nsOESettings.cpp/1.31/Fri Sep 17 11:12:14 2004//TTHUNDERBIRD_2_0_0_18_RELEASE

Changes made are per my diff.  I attached the diff to prevent confusion of changes made from this tarbar and 1.41 that I originally attached.

This successfully imported the settings to satisfy this bug however someone needs to test to see if oexpress with settings installed with its's initial setup wizard will work with this patch.  It should since it checks the xfered type identities first and then the wizard, 'main identity' next.

Let me know if you want me to try a later release
Attached patch diff to ver 131 (obsolete) — Splinter Review
Attachment #350093 - Attachment is obsolete: true
Attachment #350093 - Flags: review?(bienvenu)
Preferably make a patch against hg tip - this isn't something likely to get fixed for 2.x, but only for tb3.

http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree
http://developer.mozilla.org/en/Mercurial_FAQ
Version = Trunk

This patch only affects OESettings::FindAccountsKey and should work on any version.

Hopefully, someone reviews and checks this in because I may not get that deep into this process to do any good and yet this is a pretty easy fix and probably easy checkin for someone who knows what they're doing.

This is probably bug fix that will be looked for by those who have not bothered with TB and hopefully is in the next release and noted on the splash page for TB.

Other settings imports from OExp need work.  I may look into fixing those.
Attached patch against hg tipSplinter Review
works in hg tip

I just copied and modified similar code elsewhere in file so it should be easy to review and check in.
Attachment #350544 - Attachment is obsolete: true
Comment on attachment 350676 [details] [diff] [review]
against hg tip

I'll provisionally take the review - I may push it to someone else if I don't get to it in a few days.
Attachment #350676 - Flags: review?(bugzilla)
Comment on attachment 350676 [details] [diff] [review]
against hg tip

I'm sorry, but I've just found out I can't easily test this at the moment when I thought I may have been able to. Pushing to Neil who I think has an outlook setup.
Attachment #350676 - Flags: review?(bugzilla) → review?(neil)
Attachment #350676 - Flags: review?(neil) → review+
Comment on attachment 350676 [details] [diff] [review]
against hg tip

This compiles and looks as if it should work (I checked the registry keys manually against an installation of Outlook Express).
This patch is included in this bug
<a href="show_bug.cgi?id=470725">470725</a>
I marked it as dupe hopefully that is proper

https://bugzilla.mozilla.org/show_bug.cgi?id=470725
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Please handle one issue in one bug, especially if you already have review for the patch in one bug. (This patch only needs superreview now.)
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Status: REOPENED → ASSIGNED
Attachment #350676 - Flags: superreview?(bienvenu)
Attachment #350676 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 350676 [details] [diff] [review]
against hg tip

thx for the patch, Phil
fix checked in - http://hg.mozilla.org/comm-central/rev/8dca8b467146
Status: ASSIGNED → RESOLVED
Closed: 16 years ago15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b2
You need to log in before you can comment on or make changes to this bug.