Open Bug 1440988 Opened 7 years ago Updated 1 years ago

data loss: browser.bookmarks.update() removes bookmark tags

Categories

(Toolkit :: Places, defect, P2)

defect

Tracking

()

Tracking Status
firefox58 --- affected
firefox59 --- affected
firefox60 --- affected

People

(Reporter: soeren.hentzschel, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: dataloss, Whiteboard: [sng-scrubbed])

Attachments

(1 file)

Attached file bookmarks_organizer-2.0.0.xpi (deleted) —
There is a data loss issue with the browser.bookmarks.update() WebExtension API. At the moment there is no way to update bookmark tags, that's bug 1225916, so this bug is not about adding support for bookmark tags. But if you call browser.bookmarks.update() and update the URL of a bookmark all bookmark tags will be deleted! This does not happen if you only update the title of a bookmark. It was already reported in the issues tracker of one of my add-ons with Firefox 55 (https://github.com/cadeyrn/bookmarks-organizer/issues/47) and I can reproduce the issue with Firefox Nightly 60. I attached my add-on so you can test: STR: 1. create a bookmark, for example with http://www.mozilla.org (not with https://) and set tags for this bookmark 2. open the interface of the add-on and start the check for broken bookmarks 3. The add-on will find the created bookmark and show it as warning because of the redirect to https:// 4. Either click the link to repair the redirect or edit the bookmark manually in the add-on interface and change the URL Expected: All bookmark tags are still there Actual: All bookmark taags are deleted!
Marco, wondering if you have any idea about the cause on this. The webextension api simply calls PlacesUtils.bookmarks.update({guid, url}), we're not doing anything to remove or preserve tags.
Flags: needinfo?(mak77)
Tags are bound to the url, when you change the url you're not exactly losing tags, those are still related to the old url. It's possible we'll change this behavior when we fix bug 424160, that's TBD though. The fact is, suppose you have 2 bookmarks pointing to the same url, both share the same tag. You change url of one of them. 1. If we leave the tags on the old url, the modified bookmark will apparently have lost tags 2. If we move tags to the new url, the unmodified bookmark will apparently lose tags An alternative may be to copy tags over so they apply to both old and new urls.
Component: WebExtensions: General → Places
Depends on: 424160
Flags: needinfo?(mak77)
Priority: -- → P2
Whiteboard: [fxsearch]

Hello, I find the current implementation of keywords a little frustrating because it results in apparently empty but non-deleteable keywords.

  1. add a bookmark and associate a new tag
  2. modify the bookmark address
  3. modify the tag name

Result: a new tag is created, and the initial tag is still there but now empty. There is no way to retrieve or see the associated bookmark. The tag is simply "dead". I can only be removed by creating a new profile and reloading all bookmarks from sync.

For me this is a severe bug because I loose data. URLs change. And when I adapt it I loose my tags if I am not aware of restoring them manually. I hope you find a solution for this issue. Thanks.

Severity: normal → S3

This is still a valid bug. From a data loss POV, it may be best to copy the tags over to the new URL.

Whiteboard: [fxsearch] → [sng-scrubbed]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: