Skip to content

Rebuilding Your Bookmarks Database

Josh Berry edited this page Oct 26, 2024 · 4 revisions

Problem

If your Firefox bookmarks database contains inconsistent data, you may see several problems with Tab Stash.

Most commonly, this results in crashes. For example, you might see crashes that look like these:

Or, you may see that items in your stashes are listed in the wrong order. For example, the Firefox bookmark editor reports that bookmarks A and B are listed with A first and B second, but Tab Stash shows B first, followed by A.

You may also see problems with drag-and-drop--for example, you drag a stashed tab to the top of a group, but Tab Stash moves it to the second or third (or further-down) position in the group.

Explanation

Firefox keeps track of the position of each bookmark within its folder (for example, bookmark A is listed first, bookmark B is second, and so on). However, these positions (or "indexes") are sometimes reported to Tab Stash incorrectly. For example, Firefox may tell Tab Stash that a bookmark should be listed before the first position in the list (e.g. at index -1), or it may say that two bookmarks occupy the same position.

Tab Stash may not know what to do in this situation, leading to the crashes or incorrect behavior described above. While Tab Stash does its best to handle these situations, some of them are impossible to handle without some outside help.

Solution

If the crashing or incorrect behavior only occurs when working with a particular group (or when working with the top-level list of stashes itself, but not any groups within the stash), you can replace the bookmark folder for that group with a new one, and move all the old contents over. Here's how:

  1. Open the Firefox bookmarks editor by clicking the Firefox menu at the right edge of your toolbar, choosing "Bookmarks", and then "Manage Bookmarks".
  2. Locate the problematic folder. (You can find all your Tab Stash bookmarks in "Other Bookmarks" > "Tab Stash", unless you've moved your stash root.)
  3. Create a new folder next to the problematic folder.
  4. Move all the bookmarks and sub-folders from the original folder into the new folder.
  5. Delete the original folder.
  6. Rename the new folder to use the same name as the old folder.
  7. Move the new folder to its desired location.

If you're not sure which folder is causing the issue, or if you have problems with multiple folders, you can backup and restore your entire bookmarks database instead. (I recommend using the import/export feature of Firefox, NOT the backup/restore feature, because the latter may save the inconsistent data in some cases.) Here's how:

  1. Open the Firefox bookmarks editor by clicking the Firefox menu at the right edge of your toolbar, choosing "Bookmarks", and then "Manage Bookmarks".
  2. If you have the "Mobile Bookmarks" folder, move everything out of that folder and into another location in your bookmarks. (This folder does not appear to be saved as part of import/export.)
  3. Click the button that looks like an up arrow/down arrow pair to open the import/export menu.
  4. Choose "Export Bookmarks to HTML", and save the HTML file somewhere convenient.
  5. Open the import/export menu again and choose "Import Bookmarks from HTML". Import the file you just saved.
  6. A duplicate copy of your bookmarks should appear at the bottom of your "Bookmarks Menu" folder. Your imported "Other Bookmarks" and "Bookmarks Toolbar" bookmarks will appear in new folders at the very bottom of "Bookmarks Menu".
  7. IMPORTANT: Double-check that everything important was imported properly before proceeding.
  8. Now, delete all the OLD bookmarks from your bookmarks database (that is, everything that was there before the import):
    • Delete everything from the "Bookmarks Toolbar" folder.
    • Delete everything from the "Other Bookmarks" folder.
    • Confirm that your "Mobile Bookmarks" folder is already empty.
    • Delete the bookmarks from the beginning of the "Bookmarks Menu" folder, leaving the copy that was imported.
    • If you make a mistake, you can simply re-import your bookmarks again (starting from step #5).
  9. Move the imported "Bookmarks Toolbar" bookmarks back into place in the real "Bookmarks Toolbar" folder.
  10. Move the imported "Other Bookmarks" back into place in the real "Other Bookmarks" folder.
  11. Restart your browser to make sure that Tab Stash notices your bookmarks have been replaced and can locate the new "Tab Stash" folder correctly. (This step should not be necessary but is recommended anyway, just to be safe.)