Last Comment Bug 801615 - Edited contacts can't be saved if address book has lists
: Edited contacts can't be saved if address book has lists
Status: RESOLVED FIXED
: regression
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Address Book & Contacts (show other bugs)
: Trunk
: All All
: -- major with 3 votes (vote)
: seamonkey2.16
Assigned To: Ian Neal
:
Mentors:
: 801371 801710 802111 803864 805271 806196 (view as bug list)
Depends on: 761852
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-15 06:42 PDT by :Hb
Modified: 2013-01-04 10:00 PST (History)
14 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
verified
fixed


Attachments
Fix typos [Checked into comm-aurora: Comment 10 , comm-beta & trunk: Comment 18 , comm-release: Comment 29] (1.23 KB, patch)
2012-10-15 15:46 PDT, Ian Neal
neil: review+
neil: approval‑comm‑aurora+
bugspam.Callek: approval‑comm‑beta+
bugspam.Callek: approval‑comm‑release+
Details | Diff | Splinter Review

Description :Hb 2012-10-15 06:42:53 PDT
After upgrading to version 2.13.1 edited contacts can't be saved in existing address books. The OK button doesn't work. Creating new contacts in existing address books is possible, but editing them afterwards fails too.

In address books created after the upgrade editing contacts works fine.
Comment 1 :Hb 2012-10-15 07:01:09 PDT
This error happens in new address books to if they contain mailing lists. And old address books are not affected if they don't have mailing lists.
Comment 2 therube 2012-10-15 09:25:39 PDT
Confirmed.

Nothing shows in Error Console.
Comment 3 therube 2012-10-15 09:49:37 PDT
SeaMonkey 2.12.1 & (at least some) 2.13a1 work correctly, but broken by (at some point in?) 2.13a2, so looks like a regression.

(Not exact regression range, just what I had on hand.)

Works:
Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/16.0 Firefox/16.0 SeaMonkey/2.13a1
Build identifier: 20120712003002

http://hg.mozilla.org/mozilla-central/rev/46804c31366b

Broken:
Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/16.0 Firefox/16.0 SeaMonkey/2.13a2
Build identifier: 20120723013003

http://hg.mozilla.org/releases/mozilla-aurora/rev/1580771f753b
Comment 4 therube 2012-10-15 10:11:20 PDT
*** Bug 801710 has been marked as a duplicate of this bug. ***
Comment 5 Phoenix 2012-10-15 12:06:13 PDT
*** Bug 801371 has been marked as a duplicate of this bug. ***
Comment 6 Philip Chee 2012-10-15 12:54:11 PDT
Ian touched a lot of addressbook code in that time frame. CC IanN
Comment 7 Jens Hatlak (:InvisibleSmiley) 2012-10-15 13:29:21 PDT
I'd bet someone used an editor without (variable occurrence) highlighting to create this:

http://mxr.mozilla.org/comm-central/source/suite/mailnews/addrbook/abCardOverlay.js#186
http://mxr.mozilla.org/comm-central/source/suite/mailnews/addrbook/abCardOverlay.js#191

These are the only two mentions of "subdir" in that file...

I think this one's easy. Takers? I won't get to this until tomorrow, so here's your chance!
Comment 8 Ian Neal 2012-10-15 15:46:49 PDT
Created attachment 671634 [details] [diff] [review]
Fix typos [Checked into comm-aurora: Comment 10 , comm-beta & trunk: Comment 18 , comm-release: Comment 29]

[Approval Request Comment]
Regression caused by (bug #): 761852
User impact if declined: Edited contacts cannot be saved
Testing completed (on m-c, etc.): Yes 
Risk to taking this patch (and alternatives if risky): None
String changes made by this patch: None
Comment 9 Ian Neal 2012-10-15 15:53:14 PDT
(In reply to Jens Hatlak (:InvisibleSmiley) from comment #7)
> I'd bet someone used an editor without (variable occurrence) highlighting
Does vim have such an extension?

> to
> create this:
> 
> http://mxr.mozilla.org/comm-central/source/suite/mailnews/addrbook/
> abCardOverlay.js#186
> http://mxr.mozilla.org/comm-central/source/suite/mailnews/addrbook/
> abCardOverlay.js#191
> 
> These are the only two mentions of "subdir" in that file...
> 
> I think this one's easy. Takers? I won't get to this until tomorrow, so
> here's your chance!

Yeah, I'd already got there, was just waiting for trees to compile to test before attaching.
Comment 10 Ian Neal 2012-10-15 17:14:19 PDT
Comment on attachment 671634 [details] [diff] [review]
Fix typos [Checked into comm-aurora: Comment 10 , comm-beta & trunk: Comment 18 , comm-release: Comment 29]

http://hg.mozilla.org/releases/comm-aurora/rev/ea12aa746521
Comment 11 Justin Wood (:Callek) (Away until Aug 29) 2012-10-15 18:12:11 PDT
Comment on attachment 671634 [details] [diff] [review]
Fix typos [Checked into comm-aurora: Comment 10 , comm-beta & trunk: Comment 18 , comm-release: Comment 29]

Review of attachment 671634 [details] [diff] [review]:
-----------------------------------------------------------------

a+ for beta, I'll leave the -release flag open so that if we have another .x release we can triage then. I suspect we'd take it for -release though if we do, but I won't spin a release *just* for this.
Comment 12 Jens Hatlak (:InvisibleSmiley) 2012-10-15 22:42:36 PDT
(In reply to Ian Neal from comment #9)
> (In reply to Jens Hatlak (:InvisibleSmiley) from comment #7)
> > I'd bet someone used an editor without (variable occurrence) highlighting
> Does vim have such an extension?

Not sure about real variable highlighting like tools like Eclipse provide for some languages. But word highlighting should do. Just ":set hlsearch" (or ":set hls" in short), then "*" (jumps to next occurrence) or "*``" (jumps back). See http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches for details.

Personally I'm not using vim for larger editing sessions, but don't use a full-blown IDE for Mozilla-related coding either. SciTE and Notepad++ provide word occurrence highlighting out of the box (just double-click a word), and SciTE works on both Windows and Linux/Unix, with the possibility to share configuration files between platforms even.
Comment 13 :Hb 2012-10-16 05:30:22 PDT
Thanks to all for the quick solution.

I hacked the patch in omni.ja with no result.  After disabling an Add-On and restarting the browser the patch worked.  The "disabling an Add-On" is only a workaround for clearing some cache. 

1. a)
Why isn't a solution for the "bad cache after altering omni.ja problem" described here https://developer.mozilla.org/en-US/docs/Mozilla/About_omni.ja_%28formerly_omni.jar%29 ?

1. b)
What is the best way to make changes in omni.ja work?

2. 
Now a contact can't be edited if its source picture is absent as said in bug 691141.

(In reply to therube from comment #2)
> Nothing shows in Error Console.

I did see an error message after setting dom.report_all_js_exceptions = true
Comment 14 therube 2012-10-16 08:12:05 PDT
*** Bug 802111 has been marked as a duplicate of this bug. ***
Comment 15 Michael Carr 2012-10-16 10:57:09 PDT
SeaMonkey 2.13.1 upgrade.
Now I can not save changes to address book records.
Close and reopen SeaMonkey. Same.
Reboot system. Same.

Went back to SeaMonkey 2.13.
Same problem.

I'm running SeaMonkey under Windows XP Pro with all patches installed.

The OK button (used to save changes) visually depresses when clicked, but the changes are not saved and the record does not close.

My address book has been around for years. It gets large over time--I currently have 1393 contacts. So my "old" address book has this "new" problem.

I also have several email address lists, but I've also had these for years. So I speculate the elists did not create the problem.

If you want any log files, I'll send them along. But you will need to tell me the file name and its usual location.
Comment 16 :Hb 2012-10-16 11:56:52 PDT
(In reply to Michael Carr from comment #15)
The error is found, see attachment 671634 [details] [diff] [review].  For an instant solution you can hack the omni.ja file in Seamonkeys program folder with an unzipper and an editor.  Or you can store contact updates temporarily in an address book without mailing lists until an updated program version is released.
Comment 17 Michael Carr 2012-10-16 12:07:15 PDT
I installed lower versions until SeaMonkey started working again.

At 2.12.1 the problem went away.

This tells me the problem is in the SeaMonkey program, not in a corrupted address book data base, nor a corrupted setting inside "about:config".

Thanks to everyone who is working on finding the bug and fixing it.
Comment 18 Ian Neal 2012-10-16 13:25:38 PDT
Comment on attachment 671634 [details] [diff] [review]
Fix typos [Checked into comm-aurora: Comment 10 , comm-beta & trunk: Comment 18 , comm-release: Comment 29]

http://hg.mozilla.org/comm-central/rev/f2e48ec916ba
http://hg.mozilla.org/releases/comm-beta/rev/e9a98a948e7e
Comment 19 john 2012-10-18 04:28:03 PDT
I'm using Windows 8RP and the same issue as above. No problem changes addresses in a 'book' without 'lists' - but definitely 'ME TOO' for address books with lists.
Comment 20 Philip Chee 2012-10-20 22:07:08 PDT
*** Bug 803864 has been marked as a duplicate of this bug. ***
Comment 21 bertranddepommery 2012-10-21 06:21:17 PDT
(In reply to Hb from comment #1)
> This error happens in new address books to if they contain mailing lists.
> And old address books are not affected if they don't have mailing lists.

Hello,
Sorry, it happens in my old address book's (I dont create new address book) : the old are affected !
Bertrand
Comment 22 :Hb 2012-10-21 11:42:08 PDT
(In reply to bertranddepommery from comment #21)

Has your old address book a mailing list card?
Comment 23 Ian Neal 2012-10-22 02:36:40 PDT
*** Bug 804063 has been marked as a duplicate of this bug. ***
Comment 24 bertranddepommery 2012-10-22 14:55:13 PDT
(In reply to Hb from comment #22)
> (In reply to bertranddepommery from comment #21)
> 
> Has your old address book a mailing list card?

In my all address book's, there is both card indivudual and listes for mailing.
Comment 25 bertranddepommery 2012-10-22 15:03:01 PDT
Hello,
the listes for mailing can be modified (add or delete a name in the liste).
We can creat a new individual card or delete an indidual card, but we can't modify any card
Bertrand
Comment 26 bertranddepommery 2012-10-22 15:17:45 PDT
Excuse me I'm testing the address book :
In e new address book we can creat a new indidual card and we can also modify then
In an adress book without mailing listes that in ok and When we create one maling list then modifing a individual card become impossible (delete all the list, the modify become possible).
The bug is there !
Comment 27 Jens Hatlak (:InvisibleSmiley) 2012-10-22 23:33:03 PDT
Thanks everyone but we don't need further input at this time. The problem is very well understood and has already been fixed in later versions, namely 2.14 Beta 1. This means it will be fixed in 2.14 at the latest. If we do a 2.13.2 release, the fix might already be included in that version.
Comment 28 Justin Wood (:Callek) (Away until Aug 29) 2012-10-23 22:00:13 PDT
Comment on attachment 671634 [details] [diff] [review]
Fix typos [Checked into comm-aurora: Comment 10 , comm-beta & trunk: Comment 18 , comm-release: Comment 29]

Review of attachment 671634 [details] [diff] [review]:
-----------------------------------------------------------------

Changed my mind on the "I won't spin a release just for this". This issue seems to be more impactful in the wild than I expected. We might also have a few useful ride-alongs here. Land at your earliest convenience
Comment 29 Ian Neal 2012-10-24 14:39:31 PDT
Comment on attachment 671634 [details] [diff] [review]
Fix typos [Checked into comm-aurora: Comment 10 , comm-beta & trunk: Comment 18 , comm-release: Comment 29]

http://hg.mozilla.org/releases/comm-release/rev/2d80b9fec104
Comment 30 Philip Chee 2012-10-24 22:15:59 PDT
*** Bug 805271 has been marked as a duplicate of this bug. ***
Comment 31 nva@vtresources.com 2012-10-25 05:30:44 PDT
(In reply to Hb from comment #16)
> (In reply to Michael Carr from comment #15)
> The error is found, see attachment 671634 [details] [diff] [review].  For an
> instant solution you can hack the omni.ja file in Seamonkeys program folder
> with an unzipper and an editor.  Or you can store contact updates
> temporarily in an address book without mailing lists until an updated
> program version is released.

I hope I am just an idiot. Updates work in a new book with no lists, but the hack mentioned doesn't seem to do it if list are present -- for me, anyway. 'omni.ja' updated and confirmed change; restarted Seamonkey several times, having disabled and enabled add-ons each time.
Comment 32 Tony Mechelynck [:tonymec] 2012-10-27 12:41:35 PDT
(In reply to nva@vtresources.com from comment #31)
> (In reply to Hb from comment #16)
> > (In reply to Michael Carr from comment #15)
> > The error is found, see attachment 671634 [details] [diff] [review].  For an
> > instant solution you can hack the omni.ja file in Seamonkeys program folder
> > with an unzipper and an editor.  Or you can store contact updates
> > temporarily in an address book without mailing lists until an updated
> > program version is released.
> 
> I hope I am just an idiot. Updates work in a new book with no lists, but the
> hack mentioned doesn't seem to do it if list are present -- for me, anyway.
> 'omni.ja' updated and confirmed change; restarted Seamonkey several times,
> having disabled and enabled add-ons each time.

Let's see. Here is how I would do it. If it doesn't work this way, then *both* of us are idiots.
omni.ja is just a zipfile under another name, so the following ought to do it:
0. Make sure that SeaMonkey is fully closed. You may want to check it using "ps -lC seamonkey" under Linux or Mac, or the Processes tab (sorted by process name) of the Windows Task Manager, which IIUC can be started by Ctrl+Alt+Del. (It may take several minutes after the last SeaMonkey window closes; how long may depend on how many tabs were open.)
1. Create an empty new directory.
2. Unzip omni.ja (found in your installation directory, see http://kb.mozillazine.org/Installation_directory for examples) into that new directory.
3. Find abCardOverlay.js and edit it with a plaintext editor (vim, or WordPad, or…). Notepad is probably a bad choice, and Word is certainly a bad choice.
4. Click the "Diff" link for the patch to see the old and new text in two columns. (Since SeaMonkey is not running, and we don't want to start it, you may want to use another browser to do it: Safari, Konqueror, Opera, Epiphany, Internet Explorer… Hopefully there is one on your machine.)
5. In your editor (opened at step 3) find the "old text" (step 4, left column) and replace it by the "new text" (step 4, right column)
6. "Save and close" (or whatever it is called in that editor) in your editor.
7. Zip the contents of the directory created at step 1 (but not the directory itself) back into omni.ja (overwriting it in your installation directory, where you found it at step 2).
8. Start SeaMonkey again.

Immediately before step 2 you may have to rename omni.ja to omni.zip (depending on the capabilities of your zip/unzip utility); in that case, at step 7 use omni.zip as the zipfile name and rename it to omni.ja thereafter.
Comment 33 Tony Mechelynck [:tonymec] 2012-10-27 12:50:14 PDT
P.S. At step 4 you could of course also use Firefox, if you have it installed. ;-)
Comment 34 :Hb 2012-10-27 15:04:25 PDT
(In reply to Tony Mechelynck [:tonymec] from comment #32)
> 8. Start SeaMonkey again.

Then the old javascript from old omni.ja will cause the old error. Confusingly you will see the new, changed script in the Source of: jar:... window. 

To get the new script to work, you have to clear a cache. This can be done by (de)installing or (de)activating an AddOn or by starting SeaMonkey with the -purgecaches parameter on the command line.
Comment 35 bertranddepommery 2012-10-28 04:45:26 PDT
Hello
thanks for the 2.13.2 that run ok for the addresses in a addressbook with mailing lists.
Sincerly
Comment 36 sphakka 2012-10-28 05:47:39 PDT
*** Bug 806196 has been marked as a duplicate of this bug. ***
Comment 37 Michael Carr 2012-11-15 12:39:20 PST
Thanks to everyone 
and 
a special thanks for 2.13.2 !!!
(<== I believe this is directed to "Justin Wood (:Callek)")

2.13.2 got me back to a secure release--
I'd back-graded to get a release that still worked 
(but "working" and "insecure" is not a longterm solution)

yours in Life,
Michael Carr
Dallas, TX, USA
Comment 38 Dick Hoffman 2013-01-03 12:16:04 PST
This bug seems to have reappeared in SM 2.14.1. I am unable to make permanent changes to entries in my address book. This includes deleting contacts, editing contact's information, changing entries in a mailing list and creating a new mailing list. I'm running under Windows XP SP3.
Dick Hoffman
Comment 39 lfletch03 2013-01-03 14:25:05 PST
To djhoff:
I initially reported this bug.  I also use WinXP SP3 and am having no further  problems at all with the address book in Seamonkey.  I can edit contacts, add contacts, delete contacts. No problems editing groups either.
Do you use AVG 2013 by chance?
Comment 40 Jens Hatlak (:InvisibleSmiley) 2013-01-03 14:31:19 PST
Dick, sorry to hear that you have problems with your address book, but whatever you're seeing, it's not this bug. The cause of this bug had been analyzed, found and fixed months ago. If your problem persists, please open a new bug with clear steps to reproduce. Include information such as used SeaMonkey version and any useful output from the Error Console (to be found under Tools, Web Development). Thanks.
Comment 41 :Hb 2013-01-03 15:54:30 PST
(In reply to Dick Hoffman from comment #38)
> ... I am unable to ... creating a new mailing list. 

Clearly not this bug. As Jens said please watch the Error Console. To get more information there you might want to set the preference dom.report_all_js_exceptions = true
Comment 42 Dick Hoffman 2013-01-04 10:00:11 PST
OK, thanks for verifying Bug 801615 is fixed and for the suggestions (I don't see a preference called 'dom.report_all_js_exceptions' but have ALL selected in the Error Console options). On initial revue there are no messages in the Error Console but
I will pursue my problem and may enter a new Bug if I think it merits doing so.
Dick

Note You need to log in before you can comment on or make changes to this bug.