Open Bug 1586434 Opened 5 years ago Updated 1 year ago

Can't merge a bookmark on one side with a folder on the other

Categories

(Firefox :: Sync, defect, P3)

defect

Tracking

()

People

(Reporter: lina, Unassigned)

References

(Blocks 1 open bug)

Details

There are a few errors in telemetry like Can't merge local kind (Bookmark|Folder) and remote kind (Folder|Bookmark). I was thinking old livemarks might be to blame...but, in that case, the kind should be Livemark, not Folder, and the migrator uses fresh GUIDs when converting livemarks to bookmarks.

However, these two maintenance tasks change the type, but keep the original GUID. That worked for the old bookmarks engine, which removed the old local item and inserted the one from the server. But the new one fails the sync. We should fix that maintenance task to also change the GUID, and upload a tombstone for the old one if it's syncing.

For items that are already on the server, it's trickier. We don't want to cause data loss by deleting the bookmark, but we also don't want to keep useless duplicates around. I think our strategy can be something like:

  1. If we're replacing a bookmark with an empty folder, keep the bookmark and delete the folder.
  2. If we're replacing a bookmark with a non-empty folder, keep both.
  3. For bookmarks on both sides, if it doesn't have a URL, flag it as Replace. We already do this for remote bookmarks when we store them in the mirror, but assume local ones are always Valid.

(3) means that, if we're replacing a bookmark without a URL with an empty folder, we'll delete both...and, if the folder does have children, we'll only keep the folder.

There's an old Dogear PR that we can resurrect and tweak a bit.

Priority: -- → P3

We should fix that maintenance task to also change the GUID, and upload a tombstone for the old one if it's syncing.

Bug 1586427 takes care of this part!

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.