Last Comment Bug 779716 - [SeaMonkey 2.11+] All bookmarks are deleted and are reset to default bookmark if I deleted all bookmarks-yyyy-mm-dd.json files
: [SeaMonkey 2.11+] All bookmarks are deleted and are reset to default bookmark...
Status: RESOLVED FIXED
: dataloss, helpwanted, regression
Product: SeaMonkey
Classification: Client Software
Component: Bookmarks & History (show other bugs)
: Trunk
: All Windows 7
: P2 critical with 1 vote (vote)
: seamonkey2.13
Assigned To: Edmund Wong (:ewong)
:
Mentors:
Depends on: 793425
Blocks: 739041
  Show dependency treegraph
 
Reported: 2012-08-01 19:49 PDT by Alice0775 White
Modified: 2013-07-09 03:00 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
affected
affected
fixed
fixed


Attachments
Do not restore default bookmarks when bookmarks*.json files are deleted. (v1) (1.10 KB, patch)
2012-08-20 23:33 PDT, Edmund Wong (:ewong)
iann_bugzilla: review-
Details | Diff | Splinter Review
Do not restore default bookmarks when bookmarks*.json files are deleted. (v2) (5.26 KB, patch)
2012-08-26 06:43 PDT, Edmund Wong (:ewong)
iann_bugzilla: review+
iann_bugzilla: approval‑comm‑aurora+
bugspam.Callek: approval‑comm‑beta+
Details | Diff | Splinter Review

Description Alice0775 White 2012-08-01 19:49:51 PDT
Build Identifier:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120715 Firefox/14.0.1 SeaMonkey/2.11

This problem happens since SeaMonkey 2.11.

Step To Reproduce:
1. Add several bookmarks
2. Quit SeaMonkey
3. Delete all bookmarks-yyyy-mm-dd.json files in your profile.
4. Start SeaMonkey

Actual Results:
  All bookmarks are deleted and are reset to default bookmark

Expected Results:
  Bookmarks should not be deleted
Comment 1 Alice0775 White 2012-08-01 20:13:29 PDT
Regression window
Good:
http://hg.mozilla.org/comm-central/rev/9998f4b43479
http://hg.mozilla.org/mozilla-central/rev/babbc38b7f52
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120408 Firefox/14.0a1 SeaMonkey/2.11a1
Bad:
http://hg.mozilla.org/comm-central/rev/f5d3b855f290
http://hg.mozilla.org/mozilla-central/rev/22521568cf79
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120409 Firefox/14.0a1 SeaMonkey/2.11a1
Pushlog
http://hg.mozilla.org/comm-central/pushloghtml?fromchange=9998f4b43479&tochange=f5d3b855f290
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=babbc38b7f52&tochange=22521568cf79


Suspected : Bug 739041
Comment 2 Philip Chee 2012-08-02 08:06:42 PDT
Thanks for the report Alice0775 White. Muchas Gracias.
Comment 3 Philip Chee 2012-08-07 11:40:55 PDT
Marco, any ideas?
Comment 4 Serge Gautherie (:sgautherie) 2012-08-08 16:37:32 PDT
(In reply to Alice0775 White from comment #0)
> Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120715 Firefox/14.0.1
> SeaMonkey/2.11

Does this bug happen with "Firefox/14.0.1" too?

> 3. Delete all bookmarks-yyyy-mm-dd.json files in your profile.

Could you check and report in which file your bookmarks are added, and what happens to that file when you restart SeaMonkey?
Comment 5 Alice0775 White 2012-08-08 16:49:54 PDT
(In reply to Serge Gautherie (:sgautherie) from comment #4)
> (In reply to Alice0775 White from comment #0)
> > Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120715 Firefox/14.0.1
> > SeaMonkey/2.11
> 
> Does this bug happen with "Firefox/14.0.1" too?

No

> 
> > 3. Delete all bookmarks-yyyy-mm-dd.json files in your profile.
> 
> Could you check and report in which file your bookmarks are added, and what
> happens to that file when you restart SeaMonkey?

??? Sorry, I do not understand what you want.
Comment 6 Serge Gautherie (:sgautherie) 2012-08-08 17:53:04 PDT
[Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/16.0 Firefox/16.0 SeaMonkey/2.13a1] (2012-07-09-00-30-02-comm-central-trunk)

'bookmarks-YYYY-MM-DD.json' files are located in the 'bookmarkbackups' folder in the SeaMonkey profile.

I can reproduce this bug:
upon restart, the browser window initially shows up with the added (or deleted) bookmark on the bar,
but it soon resets to defaults :-(

Helpwanted: I'm not sure I'll have time to debug this anytime soon :-<
Comment 7 Philip Chee 2012-08-09 02:01:49 PDT
You might need to port some or all of:
Bug 748569 - Fix few migration regressions (reset profile feature is broken - bug 748047, bookmarks.html not imported during migration - bug 738263, default-browser detection during migration is completely broken and few more minor issues)
Comment 8 Edmund Wong (:ewong) 2012-08-20 21:14:29 PDT
I've been looking at the code.  If all the json files are deleted,
the browser goes into  'importBookmark' mode via: 
http://mxr.mozilla.org/comm-central/source/suite/common/src/nsSuiteGlue.js#637

Then since from 
http://mxr.mozilla.org/comm-central/source/suite/common/src/nsSuiteGlue.js#668
there's no bookmarksbackupfile,  it imports from the html bookmark file.

Are the actual bookmarks stored in places.sqlite?
Comment 9 Alice0775 White 2012-08-20 21:37:55 PDT
(In reply to Edmund Wong (:ewong) from comment #8)

> there's no bookmarksbackupfile,  it imports from the html bookmark file.
> 
FYI
There is no html bookmark file in the profile folder,
Because browser.bookmarks.autoExportHTML = false by default.
Comment 10 Edmund Wong (:ewong) 2012-08-20 23:33:02 PDT
Created attachment 653664 [details] [diff] [review]
Do not restore default bookmarks when bookmarks*.json files are deleted. (v1)
Comment 11 Serge Gautherie (:sgautherie) 2012-08-21 00:59:22 PDT
Comment on attachment 653664 [details] [diff] [review]
Do not restore default bookmarks when bookmarks*.json files are deleted. (v1)

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

What about comment 7 (first)?

::: suite/common/src/nsSuiteGlue.js
@@ +643,4 @@
>      var importBookmarksHTML = false;
>      try {
>        importBookmarksHTML =
> +        Application.prefs.getValue("browser.places.importBookmarksHTML", false);

Firefox doesn't have that. Why does SeaMonkey need it?
http://mxr.mozilla.org/comm-central/search?string=browser.places.importBookmarksHTML&case=on
Comment 12 Ian Neal 2012-08-25 06:38:43 PDT
Comment on attachment 653664 [details] [diff] [review]
Do not restore default bookmarks when bookmarks*.json files are deleted. (v1)

>       importBookmarksHTML =
>-        Services.prefs.getBoolPref("browser.places.importBookmarksHTML");
>+        Application.prefs.getValue("browser.places.importBookmarksHTML", false);
Change not required, as Serge said, and, as he said, what about comment 7?
Comment 13 Edmund Wong (:ewong) 2012-08-26 06:43:04 PDT
Created attachment 655414 [details] [diff] [review]
Do not restore default bookmarks when bookmarks*.json files are deleted. (v2)
Comment 14 Edmund Wong (:ewong) 2012-08-29 06:58:05 PDT
Comment on attachment 655414 [details] [diff] [review]
Do not restore default bookmarks when bookmarks*.json files are deleted. (v2)

[Approval Request Comment]
Regression caused by (bug #): bug 779716
User impact if declined: dataloss due to loss of bookmarks
Testing completed (on m-c, etc.):  
Risk to taking this patch (and alternatives if risky): 
String changes made by this patch: None
Comment 15 Edmund Wong (:ewong) 2012-08-29 07:05:11 PDT
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/a38652ab6c4d
Comment 16 Philip Chee 2012-08-29 08:12:45 PDT
> Regression caused by (bug #): bug 779716
Um really?
Comment 17 Edmund Wong (:ewong) 2012-08-30 06:22:55 PDT
(In reply to Philip Chee from comment #16)
> > Regression caused by (bug #): bug 779716
> Um really?

Err.. no. Not really.
Comment 18 Edmund Wong (:ewong) 2012-08-30 06:23:29 PDT
Pushed to comm-aurora:
http://hg.mozilla.org/releases/comm-aurora/rev/47519f4786af
Comment 19 Philip Chee 2012-09-22 10:52:01 PDT
(regression) Filed Bug 793425 - Bookmarks Manager Tools-> Import HTML Wizard not working due to sytax error in migration.js
Comment 20 Edmund Wong (:ewong) 2012-09-23 20:13:25 PDT
(In reply to Philip Chee from comment #19)
> (regression) Filed Bug 793425 - Bookmarks Manager Tools-> Import HTML Wizard
> not working due to sytax error in migration.js

My apologies for that mistake.
Comment 21 Justin Wood (:Callek) (Away until Aug 29) 2012-10-02 19:41:22 PDT
Comment on attachment 655414 [details] [diff] [review]
Do not restore default bookmarks when bookmarks*.json files are deleted. (v2)

http://hg.mozilla.org/releases/comm-beta/rev/54c7a1caa3b9

(and I got its regression fix pushed too)
Comment 22 George 2013-07-09 02:55:00 PDT
OK, this one resurfaced in 2.15b1 and now 2.19 too, I do not get it...

Repeat: status is not fixed, please, re-open this bug.

Thanks
Comment 23 George 2013-07-09 03:00:19 PDT
Small correction: as posted, 2.19 is affected again and needs fixing - however I was wrong about 2.15b1, my bad.

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