MozillaZine

lost bookmarks on update to 3.6, unable to retrieve them

Discussion of general topics about Mozilla Firefox
Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 15th, 2010, 10:28 am

dickvl wrote:Try JSONView: <!-- m --><a class="postlink" href="https://addons.mozilla.org/firefox/addon/10869">https://addons.mozilla.org/firefox/addon/10869</a><!-- m -->

You can also try to open a JSON backup in a browser tab (File > Open File) and use this bookmarklet:
Code: Select all
javascript:(function(){var E=document.getElementsByTagName('PRE')[0],T=E.innerHTML,i=0,r1,r2;t=new Array();while(/("uri":"([^"]*)")/g.exec(T)){r1=RegExp.$1;r2=RegExp.$2;if(/^https?:/.exec(r2)){t[i++]='['+(i)+']:<a href='+r2+'>'+r2+'<\/a>';}}with(window.open().document){for(i=0;t[i];i++)write(t[i]+'<br>');close();}})();

See also <!-- l --><a class="postlink-local" href="http://forums.mozillazine.org/viewtopic.php?f=38&t=776805&start=15">viewtopic.php?f=38&t=776805&start=15</a><!-- l -->
I read the info at both links. I do not understand how to use the 'bookmarklet', whether that will only allow viewing or if the info can then be converted to a useable format. Please advise.

At this point I don't need help in reading the info in the .JSON file because that's already been accomplished by changing to .txt 'All I need' now are instructions on how to ultimately get the info into a new bookmarks file, other than the one-by-one which I've already begun.

dickvl

User avatar
 
Posts: 52834
Joined: July 18th, 2005, 3:25 am

Post Posted February 15th, 2010, 10:42 am

If you open the JSON file in a browser tab and copy and paste the bookmarklet code in the location bar then you should get the htttp(s) links in a new tab.
You can save that tab to a html file (File > Save Page As) and import that file in the Bookmarks Manager.

See also http://en.wikipedia.org/wiki/Bookmarklet

Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 15th, 2010, 11:14 am

dickvl wrote:If you open the JSON file in a browser tab and copy and paste the bookmarklet code in the location bar then you should get the htttp(s) links in a new tab.
You can save that tab to a html file (File > Save Page As) and import that file in the Bookmarks Manager.

See also <!-- m --><a class="postlink" href="http://en.wikipedia.org/wiki/Bookmarklet">http://en.wikipedia.org/wiki/Bookmarklet</a><!-- m -->
We're really close, thanks for that! The page converts and all 3032(!) bookmarks are in an ordered form and numbered, saved as an HTML file. It defaults to a .JSON ending, so I saved it that way and with .HTML When using the 'Import and Backup'/Import HTML, it appears to work. Upon checking bookmarks, they don't show up there. I tried importing with each ending. Instead of the bookmarks, there's a Wikipedia icon and the word, 'Error' which when clicked brings up this page:
http://en.wikipedia.org/wiki/Jim_Rogers ... 2:%22Truck

Can you steer me to tweaking it further to get the file correct, such that it loads into bookmarks? Thanks!

Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 15th, 2010, 11:28 am

dickvl, scratch the part in the last message about Wiki. Apparently that Wiki message was from a previous attempt to import files and I hadn't spotted it until now. I deleted it and attempted to import the new file, both ways, but nothing happens. Any suggestions?

dickvl

User avatar
 
Posts: 52834
Joined: July 18th, 2005, 3:25 am

Post Posted February 15th, 2010, 11:35 am

Try this version:
Code: Select all
javascript:(function(){var E=document.getElementsByTagName('PRE')[0],T=E.innerHTML,i=0,r1,r2;t=new Array();while(/("uri":"([^"]*)")/g.exec(T)){r1=RegExp.$1;r2=RegExp.$2;if(/^https?:/.exec(r2)){t[i++]='<a href='+r2+'>'+r2+'<\/a>';}}with(window.open().document){write('<!DOCTYPE NETSCAPE-Bookmark-file-1><DL><p>');for(i=0;t[i];i++)write('<DT>'+t[i]);write('</DL><p>');close();}})();

Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 15th, 2010, 11:43 am

That one, as you probably know, also converts the .JSON file nicely but does not number each link like the first bookmarklet did. Again it was saved with both the .JSON & .HTML endings, but again nothing happened with either when import was attempted. More ideas? I appreciate your help.

dickvl

User avatar
 
Posts: 52834
Joined: July 18th, 2005, 3:25 am

Post Posted February 15th, 2010, 1:01 pm

If it doesn't work in the current profile then try it in a new profile.
It does work for me to import a HTML backup created via that last bookmarklet (haven't tested the other).

You can also try to delete places.sqlite and remove JSON backups in the current profile.

Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 15th, 2010, 1:46 pm

I tried every combination of the above that I could come up with and none of them worked for me. Either I'm missing something or there's something else missing or preventing the import of the file. When trying 'Import and Backup/ Restore', the message 'Unable to process the backup file.' continues to come up. Importing HTML results in nothing happening. Deleted the places.sqlite and .JSON files but that made no difference, whether it was with the new profile or the old one.

Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 15th, 2010, 2:12 pm

From where things currently stand, there is no significant advantage to importing the old bookmarks directly into my new bookmarks because they will all have to be organized in new folders and sub folders individually. It's actually a disadvantage to import them in one lump in terms of organization for me.

My interest is for anyone who has the time, interest and skill to use it on figuring out how to repair or alter the original .JSON file so that it can be imported intact, with everything in its proper folder as was originally intended when I clicked install 3.6 Thanks for your help.

dickvl

User avatar
 
Posts: 52834
Joined: July 18th, 2005, 3:25 am

Post Posted February 15th, 2010, 4:21 pm

Did you try the extension to see if that extension would indicate where the problem in the JSON file occurs?
https://addons.mozilla.org/firefox/addon/10869

Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 15th, 2010, 6:14 pm

Yes, I had tried that extension before and was able to open and view the document, similar to changing the extension to .txt When the file is opened this way, a message accompanies the text, 'There was an error parsing the JSON document. The document may not be well-formed.' Unfortunately it does not tell what the problem is. Obviously I don't recognize the problem(s) either, let alone know how to repair it. I need a person or program who can detect AND repair the problem, or at least explain how I can do the same. Keep trying, we must be getting close!

pepegotsi
 
Posts: 110
Joined: June 24th, 2009, 7:02 am

Post Posted February 16th, 2010, 7:53 am

You should have backed up your FF configuration with MozBackup to a safe place. Then, in seconds you can restore to prior conditions. Backup!!!!

Bbill
 
Posts: 16
Joined: February 14th, 2010, 2:11 pm

Post Posted February 16th, 2010, 10:51 am

So, have you got something useful to contribute, for instance a way to repair the .JSON file so it can be used, or are you too busy searching the forums for opportunities to tell people the obvious what they should have done??? That's like telling somebody they shouldn't have run their car into a telephone pole. Of course the bookmarks should have been backed up, but they weren't, partially because I understood they were automatically backed up and partially because it was just a 'simple update' of FF. Hindsight is 20-20.

dfoulkes

User avatar
 
Posts: 22575
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Post Posted February 16th, 2010, 11:51 am

He posted the exact same thing on another thread and I hopefully commented in such a way that will persuade him to post answers/results as opposed to trolling.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!

dickvl

User avatar
 
Posts: 52834
Joined: July 18th, 2005, 3:25 am

Post Posted February 16th, 2010, 3:09 pm

Here is a version that works with a file formatted by JSONView.
Then you you can compare the output.
I see extra lines probably from links in annotations (e.g. live RSS feeds) that do not have a 'uri' label, but something else, so my other script won't catch those.
Code: Select all
javascript:(function(){var x=0,e=document.getElementsByTagName('a'),E,i,j,k=0,p,P,u,t=new Array(),X;for(i=0;E=e[i];i++){if((u=E.href)!=''){T=u;p=E.parentNode.parentNode.getElementsByClassName('prop');for(j=0;P=p[j];j++){if(P.innerHTML=='title'){try{T=P.parentNode.getElementsByTagName('span')[1].innerHTML;}catch(e){}}}t[k++]='['+(k)+'] '+((x)?((x&1)?'<a href='+u+'>':'')+T+((x&2)?' &lt;'+u+'&gt;':'')+((x&1)?'<\/a>':''):u);}}with(window.open().document){write('<!DOCTYPE NETSCAPE-Bookmark-file-1><DL><p>');for(i=0;t[i];i++)write('<DT>'+t[i]);write('</DL><p>');close();}})();
(x=0 gives text output; you can use x=0 (url as text) or x=1 (clickable title) or x=2 (title+url) or x=3 (clickable title+url)
Last edited by dickvl on May 10th, 2010, 9:36 am, edited 1 time in total.

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 5 guests