User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+ When opening a group of bookmarks in tabs (from Bookmarks-> Open in Tabs) it will fail to open any bookmarks in the list if they are after a missing local file. No tab or bookmark extensions are installed. Reproducible: Always Steps to Reproduce: 1. Make a group of bookmarks, which includes at least one local file (e.g. file:///C:/test.html) which is inbetween normal external url tabs. 2. close browser and move/rename local file. 3. restart browser, select bookmark group from menu and then Open in Tabs Actual Results: Tabs are opened as expected, in order, up to the missing local file. A tab is opened with "File Not Found Error" as expected. However, no subsequent tabs from the group are then opened. I.E. A group consisting of links to: google.com bbc.co.uk file:///c:\file.html mozilla.org slashdot.org where file.html is removed and the browser restarted. will open the first three tabs, giving an not found error for file.html, will not open the forth tab (or any after it) Expected Results: Opened all tabs, displaying errors for missing pages, including subsequent ones in the group.
confirmed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050715 Firefox/1.0+
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'm getting an error message in the js console: Error: uncaught exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIWebNavigation.loadURI]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://global/content/bindings/browser.xml :: loadURIWithFlags :: line 170" data: no] Probably putting it in a try..catch would solve the bug, but I'm not sure if that's allowed there.
Created attachment 189474 [details] [diff] [review] patch Like this, this fixes it, but there is a comment in this function in browser.xml: <!-- throws exception for unknown schemes --> http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/browser.xml#150 So it could be perhaps it should raise an exception here for a reason?
Right, that comment is there because this was done on purpose. This should be put in a try/catch block where it's called from bookmarks code (something like in bug 245588), not changed globally for the bindings themselves. So if I'm not mistaken, this should probably go at http://lxr.mozilla.org/mozilla/source/browser/components/bookmarks/content/bookmarks.js#654 instead.
Created attachment 189486 [details] [diff] [review] patch2 Thanks for the info, Gavin. This seems to make it work. This is a Firefox only patch. I'll attach a Seamonkey patch (I haven't testest the Seamonkey patch).
Created attachment 189487 [details] [diff] [review] seamonkey patch So I guess this is what has to be done for Seamonkey (I haven't tested this).
(In reply to comment #6) >Created an attachment (id=189487) >seamonkey patch > >So I guess this is what has to be done for Seamonkey (I haven't tested this). No, that won't work at all, it seems that each caller of addTab (except for trivial cases such as about:blank) needs to have try/catch guards. I wondered about this when the open links in new tab code was written and at the time DanM said he didn't want to change the behaviour of addTab so he worked around it.
Attachment #189487 - Attachment is obsolete: true
this patch not fix the bug if user open one bookmark with invalid link to a local file.(if the file not exist) you need to patch openOneBookmark function or openUILinkIn.... but i thing it's better to check if url start with "file:/" and then test if the file exist befor we try to load it. if the file not exist show the message "File not Found"
I can reproduce with recent Linux trunk build. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051204 Firefox/1.6a1
OS: Windows XP → All
I find that it doesn't matter where the local file is positioned. After failing to load, if I try to load the group of tabs again, they will all load successfully (except the bad local file link). This loading twice behavior was reproduced with the local file in diff places as well as with several different tab groupings.
i doubt this is valid for 3.x, moreover bug 356571 has fixed the invalid uri case
i'm solving this as WFM, if you can still reproduce please post updated STRs for current trunk/branch.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.