Closed Bug 1452393 Opened 6 years ago Closed 6 years ago

Importing bookmarks from html not working

Categories

(Toolkit :: Places, defect)

59 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: e412byoy7, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180323154952

Steps to reproduce:

I exported my bookmarks from a profile as html, then created a new profile and tried to import bookmarks from html.


Actual results:

Nothing happened, bookmark toolbar is still empty, and in toolbar menu I see that only very few bookmarks were imported (only 5-10% of my bookmarks).


Expected results:

Should have exported/imported all bookmarks into menu or even into bookmarks toolbar.
Component: Untriaged → Places
Product: Firefox → Toolkit
Looks like that html file may be corrupt, or your original database was corrupt and the html file was only partially created. Are you willing to share that html file privately through mail?

In about:support, in the Places section, there's a button to run some diagnostics and repair of the bookmarks database, that may be worth try running in the original profile.
Flags: needinfo?(danielboontje)
Ah the integrity check, ok done that, this is the result:

> Task: checkIntegrity
+ The database is sane
> Task: invalidateCaches
+ The caches have been invalidated
> Task: checkCoherence
+ The database is coherent
> Task: expire
+ Database cleaned up
> Task: vacuum
+ Initial database size is 10240 KiB
+ The database has been vacuumed
+ Final database size is 5120 KiB
> Task: stats
+ Database size is 5120 KiB
+ pragma_user_version is 41
+ pragma_page_size is 32768
+ pragma_cache_size is -2048
+ pragma_journal_mode is wal
+ pragma_synchronous is 1
+ History can store a maximum of 104858 unique pages
+ Table moz_places has 7878 records
+ Table moz_historyvisits has 9228 records
+ Table moz_inputhistory has 333 records
+ Table moz_hosts has 878 records
+ Table moz_bookmarks has 2206 records
+ Table moz_keywords has 1 records
+ Table sqlite_sequence has 1 records
+ Table moz_anno_attributes has 10 records
+ Table moz_annos has 165 records
+ Table moz_items_annos has 392 records
+ Table sqlite_stat1 has 19 records
+ Table moz_bookmarks_deleted has 0 records
+ Index sqlite_autoindex_moz_inputhistory_1
+ Index sqlite_autoindex_moz_hosts_1
+ Index sqlite_autoindex_moz_keywords_1
+ Index sqlite_autoindex_moz_anno_attributes_1
+ Index sqlite_autoindex_moz_bookmarks_deleted_1
+ Index moz_places_hostindex
+ Index moz_places_visitcount
+ Index moz_places_frecencyindex
+ Index moz_places_lastvisitdateindex
+ Index moz_historyvisits_placedateindex
+ Index moz_historyvisits_fromindex
+ Index moz_historyvisits_dateindex
+ Index moz_bookmarks_itemindex
+ Index moz_bookmarks_parentindex
+ Index moz_bookmarks_itemlastmodifiedindex
+ Index moz_places_url_hashindex
+ Index moz_places_guid_uniqueindex
+ Index moz_bookmarks_guid_uniqueindex
+ Index moz_annos_placeattributeindex
+ Index moz_items_annos_itemattributeindex
+ Index moz_keywords_placepostdata_uniqueindex
+ Index moz_bookmarks_dateaddedindex
> Task: _refreshUI


I would have to test again if the bug is gone now, btw just fyi, the actual bug I encountered before this html bug was this one: >>Firefox not opening with last session tabs when setting "open with last tabs" is enabled"<<

I didn't create a bug report for that initial issue, it started happening 4 days ago, but since that "broken" profile was huuge (had something like 250 bookmarks in it is my guess) I created a new one with now only ~ 25 bookmarks and now Firefox is starting everytime with last session tabs, so now it's working fine with new profile.
Flags: needinfo?(danielboontje)
Oh if I read that correct, above, does the line "+ Table moz_bookmarks has 2206 records" mean I have 2206 bookmarks in my old profile? o_O
Flags: needinfo?(mak77)
(In reply to Daniel from comment #3)
> Oh if I read that correct, above, does the line "+ Table moz_bookmarks has
> 2206 records" mean I have 2206 bookmarks in my old profile? o_O

Yes, that's correct.

Some things that might help us here:

- On you old profile, open up Tools -> Web Developer -> Browser Console (it opens as a separate window), and then see if any errors appear when you do the HTML export. You could do the same for import into a fresh profile as well.
- If you're willing, you could share the places.sqlite & broken html file with us via direct mail. We could take a look and see if we could see what's happening.
Flags: needinfo?(mak77) → needinfo?(danielboontje)
Also, have you ever used any bookmark related add-ons? If so, which ones?
Not used bookmark related addons from what I remember. Where do I find the places.sqlite to send to you?
Flags: needinfo?(danielboontje) → needinfo?(standard8)
You can find it via Help -> About Troubleshooting, once you've opened it, there's Profile Folder details and normally a button to open the profile folder. Inside that you should find the places.sqlite.

Then can you put it on https://send.firefox.com/ and send an expiring link to me: standard8 AT mozilla.com

Obviously it will contain your bookmarks and history, but I won't share those with anyone.
Flags: needinfo?(standard8) → needinfo?(danielboontje)
Ok sent it.
Flags: needinfo?(danielboontje)
Attached image Tree after import
Hi Daniel, thank you for the database and file. As far as I can tell, your database is perfectly fine.

Having tried it out and looked at duplication in you current profile, I think I've figured out what is happening.

When you import from HTML bookmarks, bookmarks originally in the "Bookmarks Menu" are imported into that same folder. Bookmarks that were in "Bookmarks Toolbar" and "Other Bookmarks" are imported into folders as sub-folders in "Bookmarks Menu". You have to manually move the contents of those folders to the toolbar/other bookmarks folders if you want to restore the locations.

Note that if you use the backup option, followed by restore in the new profile, you'll get the bookmarks in exactly the right locations. Doing a restore will erase any bookmarks in the profile you're running it though.

We currently have bug 1431376 on file for considering what we do with the location of bookmarks on HTML import.

If you can confirm if this helps you resolve your issue, then we'll mark it as a duplicate of that bug.
Flags: needinfo?(danielboontje)
Could it be that the integrity check repaired it? Or does it only read data, not change any data?
Flags: needinfo?(danielboontje) → needinfo?(standard8)
(In reply to Daniel from comment #10)
> Could it be that the integrity check repaired it? Or does it only read data,
> not change any data?

That's possible, but I think you'd have had an error raised or something more broken than what you saw. The explanation I gave seemed to fix what I've understood better.... did you check within the Bookmarks Menu folder after having imported when first reporting this bug?
Flags: needinfo?(standard8) → needinfo?(danielboontje)
Marking as works for me, since I believe this is just a misunderstanding as to where bookmarks import to. We already have bug 1431376 on file to consider about bookmark import locations.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(danielboontje)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: