Closed
Bug 437273
Opened 16 years ago
Closed 16 years ago
bookmarks backup fails when bookmark record has no corresponding place record
Categories
(Firefox :: Bookmarks & History, defect, P2)
Tracking
()
VERIFIED
FIXED
Firefox 3.1b3
People
(Reporter: myk, Unassigned)
References
Details
(Whiteboard: [fixed by bug 457441])
When bookmarks are backed up either via PlacesUtils::backupBookmarksToFile or nsIPlacesImportExportService::exportHTMLToFile, and a bookmark record has no corresponding place record (f.e. because of the Fx3b4/5 bug described by dietrich in bug 436696, comment 8), then backing up fails with an exception.
PlacesUtils::backupBookmarksToFile exception:
Error: uncaught exception: [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]" nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)" location: "JS frame :: file:///home/myk/Applications/firefox-trunk/modules/utils.js :: PU__uri :: line 153" data: no]
nsIPlacesImportExportService::exportHTMLToFile exception:
(from Weave, which uses this method)
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://weave/content/wizard.js :: SyncWizard_onBookmarksBackup :: line 157" data: no]
Bookmarks 2008-06-04.html
nsIPlacesImportExportService::exportHTMLToFile doesn't write the file at all when it hits this exception, while PlacesUtils::BackupBookmarksToFile leaves the file in a partially-written state.
It seems like both of these methods should trap this exception and recover by either skipping the bookmark entirely or backing up as much info about it as they can instead of failing and aborting the backup.
Additionally, perhaps PlacesUtils::backupBookmarksToFile should not leave the file in a partially-written state, and PlacesOrganizer::backupBookmarks should trap any exceptions thrown by PlacesUtils::backupBookmarksToFile and report the failure to the user who initiated the backup.
You can trigger the exception by updating a moz_bookmarks record in a test profile to have an invalid foreign key. For example, in a relatively fresh profile I ran the following query on the Places database to hork the record for the "Get Bookmark Add-ons" bookmark.
UPDATE moz_bookmarks SET fk = 4000 WHERE fk = 4;
Then I tried to back up via Bookmarks > Organize Bookmarks > Import and Backup > Backup... and via the Weave configuration wizard.
Comment 1•16 years ago
|
||
related: bug 404171.
OS: Linux → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → Firefox 3.1
Version: unspecified → 3.0 Branch
Comment 2•16 years ago
|
||
a work for preventive maintenance bug 431558
Comment 3•16 years ago
|
||
bug 457441 is practically the "real world" bug users will see
Comment 4•16 years ago
|
||
all dependancies are fixed, so this should be no more an issue
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Target Milestone: Firefox 3.1 → Firefox 3.1b3
Comment 5•15 years ago
|
||
Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090526 Shiretoko/3.5pre ID:20090526031155
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Whiteboard: [fixed by bug 457441]
Comment 6•15 years ago
|
||
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".
In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body contains places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.
Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•