Closed
Bug 1351282
Opened 7 years ago
Closed 6 years ago
Cannot delete or edit invalid bookmark
Categories
(Firefox :: Bookmarks & History, defect, P2)
Tracking
()
RESOLVED
DUPLICATE
of bug 1401401
People
(Reporter: schrobe, Unassigned)
Details
Attachments
(1 file)
8.65 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20170302120751 Steps to reproduce: I have a bookmark whose URL starts with: http://[ and is a wrong/invalid URL. This bookmark was created with an older version of Firefox (I believe 45 or 35). It noticed that it is not possible to enter such an URL when creating a new bookmark now, but when I upgraded to the current version no problems occured (like telling me that I can not upgrade because of invalid bookmark URLs). In summary: I presume that the validation rules for bookmark URLs have been made stricter, since somehow I could enter this URL with my old firefox Version which I now can not reproduce. Actual results: I can not delete the bookmark. When clicking "Delete" in the context-menu, nothing happens. In the "Library" when I try to select the bookmark, the row is selected but the fields below showing the Name, Location and Tags are not updated (they are filled with the previous selection) When I try to edit the bookmark via clicking "Properties" in the context-menu, an empty dialog opens (see attached screenshot). IMPORTANT NOTE: I had the exact same behaviour already BEFORE upgrading. Expected results: 1.) Either it should not be possible to simply import / migrate data (in my case invalid bookmark URLs) from an older version which do not fulfill the validation rules anymore. Maybe the user could have been informed about this during the upgrade. 2.) Or, when somehow an invalid URL makes it into a bookmark, it should still be possible to delete that entry. Furthermore, the properties dialog looks really "broken" beeing completely blank while still showing a "Save" button. This should be fixed.
Component: Untriaged → Bookmarks & History
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Comment 1•7 years ago
|
||
We should probably add some validation cleanup to the maintenance task. It's strange that a previous version allowed to insert an invalid url, since all the official APIs always checked url validity. Maybe it was an add-on you had on previous versions that became incompatible now? Or maybe we just changed validation rules for nsIURI, lately something relevant happened there. I agree that we should also make somehow possible to remove it. In the meanwhile, I suspect the only way for you to clean it up would be to manually remove the bookmark from the database. From the devtools menu, open Scratchpad. From the Environment menu (if not visible you need to open the tools and from its options enable the Browser Chrome toolbox) select Browser. Paste this into the pad, replace the "http://" with the full url of your bookmark in both points, select all the contents of the pad and press Run: PlacesUtils.withConnectionWrapper("Remove broken url", function* (db) { yield db.execute(`DELETE FROM moz_bookmarks WHERE fk = (SELECT id FROM moz_places WHERE url_hash = hash("http://") AND url = "http://")`); yield db.execute(`DELETE FROM moz_places WHERE foreign_count = 0 AND last_visit_date ISNULL`); });
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Comment 2•6 years ago
|
||
Forward duping to bug 1401401 as more ideas there.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•