Last keyword is deleted when adding new keyword to bookmark, if there are more than 248 keywords defined

RESOLVED INCOMPLETE

Status

()

RESOLVED INCOMPLETE
2 years ago
2 years ago

People

(Reporter: regit, Unassigned)

Tracking

51 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170201180315

Steps to reproduce:

1. Add 248 keywords to different bookmarks
2. Add keyword number 249 to a bookmark
3. Go to the previous bookmark and see that the keyword has been removed


Actual results:

Keyword is deleted from a (seemingly random) bookmark.


Expected results:

A keyword for a bookmark is never deleted, when adding a keyword to a bookmark.

Updated

2 years ago
Component: Untriaged → Bookmarks & History
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Comment 1

2 years ago
Could you share a bookmark archive with 248 bookmaks and keywords to import, please. It would help to test.
Flags: needinfo?(rasmus)
Can't reproduce the issue with the following script:

var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]
                      .getService(Components.interfaces.nsINavBookmarksService);
var menuFolder = bmsvc.bookmarksMenuFolder; // Bookmarks menu folder
var newFolderId = bmsvc.createFolder(menuFolder, "Test", bmsvc.DEFAULT_INDEX);
var ios = Components.classes["@mozilla.org/network/io-service;1"]
                    .getService(Components.interfaces.nsIIOService);
for (var i = 1; i < 260; i++)
{
  var uri = ios.newURI(`https://sub${i}.example.com/`, null, null);
  var newBkmkId = bmsvc.insertBookmark(newFolderId, uri, bmsvc.DEFAULT_INDEX, "");
  bmsvc.setKeywordForBookmark(newBkmkId, `keyword${i}`)
}
OS: Linux → Unspecified
Hardware: x86_64 → Unspecified
(Reporter)

Comment 3

2 years ago
@Loic: I am sorry, but I have since updated my bookmarks, so I now have only 40-50 keywords defined...
Flags: needinfo?(rasmus)
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
I don't think there's anything to do with the number of keywords, but a keyword can only point to a single uri. it's likely with so many keywords you may have tried to set an already existing keyword to a different uri, or changed uri for an existing keyword and that uri already had another keyword associated.

Also considered comment 2, this report unfortunately doesn't look actionable.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
(Reporter)

Comment 5

2 years ago
That's fine, at least there is a bug report now, if anyone else encounters this at some point in the future.
You need to log in before you can comment on or make changes to this bug.