Closed Bug 457441 Opened 17 years ago Closed 17 years ago

Firefox will NOT Export bookmarks html file

Categories

(Firefox :: Bookmarks & History, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 3.1b3

People

(Reporter: barnicoate, Assigned: mak)

References

Details

(Keywords: verified1.9.1)

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 Error Console Code: Error: uncaught exception: [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIPlacesImportExportService.exportHTMLToFile]" nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)" location: "JS frame :: chrome://browser/content/places/places.js :: PO_exportBookmarks :: line 381" data: no] Reproducible: Always Steps to Reproduce: 1.Open Book marks 2.Select Organize Bookmarks 3.Select Import and Backup 4.Select Export HTML 5.Select File Name, folder etc.. 6. Actual Results: NO html file, no bookmarks file, no named html file in chosen folder (My Documents) Expected Results: DUHHHHH Error console printout:::: Error: uncaught exception: [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIPlacesImportExportService.exportHTMLToFile]" nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)" location: "JS frame :: chrome://browser/content/places/places.js :: PO_exportBookmarks :: line 381" data: no]
WFM in Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080927033433 Minefield/3.1b1pre. Please try in Safe Mode.
Can you please test it in the Firefox safemode ? - http://support.mozilla.com/en-US/kb/Safe+Mode
This is similar to bug 448584, but for HTML export instead of JSON. Regardless of whatever the content of the user's bookmarks are, Firefox should be more robust wrt to handling errors during the export process, so that at the very least a valid file is exported.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → Firefox 3.1
FYI: This is not the first bug, there is another unconfirmed bug where the reporter had the same issue and it works in the safemode, he wants to comment which addon caused this....
(In reply to comment #4) > FYI: This is not the first bug, there is another unconfirmed bug where the > reporter had the same issue and it works in the safemode, he wants to comment > which addon caused this.... Thanks. What bug is that? Maybe We'll have that other bug be extension-specific, and I'll convert this one into being about export robustness.
bug 457870 "Disabling MozFox 1.0 fixed the problem of nothing happening with Export Bookmarks to HTML."
Greg, can you please answer comment 1 an 2?
The problem is that places.sqlite is missing entries in moz_places table. You can see the missing entries by executing "SELECT * FROM moz_bookmarks WHERE moz_bookmarks.fk NOT IN (SELECT id FROM moz_places)" with external SQLite tool. I don't know why and when Firefox removed those entries. When I wanted to see properties of those bookmarks, Firefox showed few pixels heigth dialog box, and error console got NS_ERROR_MALFORMED_URI exception. I tried to delete them, but error console got the same error and bookmark still left. I re-added entries to moz_places with id=moz_bookmarks.fk (the titles of all missing entries were URLs, so I knew what is the address of bookmark), and then Firefox succesfully exported bookmarks.html with no errors in error console. When exporting I think Firefox should skip those bad bookmarks and add message to error log about skipped bookmark and show error dialog box about them. Bookmark properties window should show with empty URL field, so that user could restore URL himself. Also it should be possible to delete bookmark even if entry in moz_places is missing. And the most important that we should find why Firefox deletes entry in moz_places.
we already did that for JSON in bug 448584, so it would be better looking at this code before final, we have a lot of reports on sumo and mozillazine (see bug 463770, most likely a dupe of this, waiting for answers from reporters)
Flags: blocking-firefox3.1?
Yes, this should block 3.1. Given the corruption problems that have been reported, ensuring backup and export system robustness is important.
Flags: blocking-firefox3.1? → blocking-firefox3.1+
Blocks: 437273
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Blocks: 463770
Attached patch patch (obsolete) — Splinter Review
i've changed some error from being fatal to be a simple warning, so that we continue exporting or importing bookmarks
Attachment #349843 - Flags: review?(dietrich)
Comment on attachment 349843 [details] [diff] [review] patch > // save the favicon, ignore errors > if (!icon.IsEmpty() || !iconUri.IsEmpty()) { > nsCOMPtr<nsIURI> iconUriObject; >- NS_NewURI(getter_AddRefs(iconUriObject), iconUri); >- if (!icon.IsEmpty() || iconUriObject) { >+ rv = NS_NewURI(getter_AddRefs(iconUriObject), iconUri); >+ if (!icon.IsEmpty() || NS_SUCCEEDED(rv)) { > rv = SetFaviconForURI(frame.mPreviousLink, iconUriObject, icon); >+ if (NS_FAILED(rv)) >+ NS_WARNING("Unable to set a favicon for an uri while importing bookmarks"); here and elsewhere, include the offending data in the warning if possible. >diff --git a/browser/components/places/tests/unit/test_457441.js b/browser/components/places/tests/unit/test_457441.js include a short description in the test file name >+/* >+ * Remove all bookmarks >+ */ >+function database_clear() { >+ // Clear all bookmarks >+ bs.removeFolderChildren(bs.bookmarksMenuFolder); >+ bs.removeFolderChildren(bs.toolbarFolder); >+ bs.removeFolderChildren(bs.unfiledBookmarksFolder); >+ // Check for correct cleanup >+ database_empty_check(); >+} >+ >+/* >+ * Check that we don't have any bookmark >+ */ >+function database_empty_check() { >+ var query = hs.getNewQuery(); >+ query.setFolders([bs.toolbarFolder, bs.bookmarksMenuFolder, bs.unfiledBookmarksFolder], 3); >+ var options = hs.getNewQueryOptions(); >+ options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS; >+ var result = hs.executeQuery(query, options); >+ var root = result.root; >+ root.containerOpen = true; >+ do_check_eq(root.childCount, 0); >+ root.containerOpen = false; >+} these could both be in the header file, and should be renamed to indicate that they're specific to bookmarks, not the whole database. r=me with these fixed
Attachment #349843 - Flags: review?(dietrich) → review+
Whiteboard: [has patch][has review]
Attached patch patch v1.1Splinter Review
comments addressed
Attachment #349843 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Keywords: fixed1.9.1
Whiteboard: [has patch][has review]
Target Milestone: Firefox 3.1 → Firefox 3.1b3
verified FIXED on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 ID:20090305133223
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: