Open Bug 1470043 Opened 6 years ago Updated 3 months ago

Add a Places maintenance task to remove items with invalid URLs

Categories

(Toolkit :: Places, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: lina, Unassigned)

References

Details

Attachments

(1 obsolete file)

A user ran into this in https://support.mozilla.org/en-US/questions/1222500. Invalid item URLs are almost certainly going to cause problems elsewhere, not just in Sync, and we should remove them.

We probably can't do this for all invalid URLs in `moz_places`, since that would require a full table scan without an index. Starting with items seems reasonable, though.

Does this sound like a good idea to you, Mak, or should we ask users to manually rebuild their databases if an invalid URL sneaks in?
Note, we also have bug 458619 and bug 1401401 that relate to this. The latter is mainly suggesting a maintenance task.
The problem is that to do this we must scan the whole database, even if it's just for bookmarks, we have users with ten thousands or more.
I was rather thinking to do this from some calling code, like when we fail creating an nsIURI/URL in certain code points, we invoke an API to cleanup the thing. I didn't have a chance to investigate doing that though.
What's the definition of an invalid URL?  Like what would you say in the documentation?
Priority: -- → P3
See Also: → 1401401, 458619
Attachment #8986643 - Attachment is obsolete: true
See Also: → 1557445
Severity: normal → S3
Depends on: 1874010

I hope that this would not be automatic, I'd like to be given a chance to repair the url before all the other info in the bookmark is erased?

But yeah, the original problem of causing issues in sync seems serious and urgent?

(In reply to Perry Wagle from comment #5)

I hope that this would not be automatic, I'd like to be given a chance to repair the url before all the other info in the bookmark is erased?

That's a valid concern.
A simple approach may be to export a firefox_invalid_bookmarks.txt (or json) to Desktop with the removed uris, and notify about that.
A more complex approach may be to move them into a separate table, then after startup if the table is non empty present a notification to the user with a button pointing to a privileged content page to fix them. If no action is taken for N sessions, just throw the url away.
The implementation cost is surely different here, that makes me think approach 1 is more likely.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: