Closed Bug 1638360 Opened 1 year ago Closed 1 year ago

WebExtension bookmarks context menu will appear in the "Most Visited" folder for bookmarks that have no bookmark id

Categories

(WebExtensions :: General, defect, P5)

defect

Tracking

(firefox79 fixed)

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: kernp25, Assigned: soniasingla.1812, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(5 files, 1 obsolete file)

Attached image firefox_SCCY1tt5Wm.png (obsolete) —

AR:

The context menu item will appear for these bookmarks in the bookmarks toolbar.

Note: In the library window the context menu item will not appear for bookmarks inside the "Most Visited" folder.

Flags: needinfo?(rob)
Attached image firefox_FtEDN7JVqo.png
Attachment #9149399 - Attachment is obsolete: true
Attached file manifest.zip

(In reply to kernp25 from comment #0)

Note: In the library window the context menu item will not appear for bookmarks inside the "Most Visited" folder.

The same is also with the bookmarks sidebar.

Attached image 41VPdjeTgn.png

How did you get this folder to appear? I think that I've seen it before in the past, but it doesn't appear in a new profile.

Could you open the places.sqlite file from your profile directory and show the result of:

sqlite3 places.sqlite 'select * from moz_bookmarks where title = "Most Visited"'

To get an idea of how to interpret the output, here is the definition of the table.

sqlite3 places.sqlite '.schema moz_bookmarks'

CREATE TABLE moz_bookmarks (  id INTEGER PRIMARY KEY, type INTEGER, fk INTEGER DEFAULT NULL, parent INTEGER, position INTEGER, title LONGVARCHAR, keyword_id INTEGER, folder_type TEXT, dateAdded INTEGER, lastModified INTEGER, guid TEXT, syncStatus INTEGER NOT NULL DEFAULT 0, syncChangeCounter INTEGER NOT NULL DEFAULT 1);
...
Flags: needinfo?(rob)
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1638428

(In reply to Rob Wu [:robwu] from comment #5)

How did you get this folder to appear?

You don't have this folder?

I have this folder, since i installed Firefox.

Those bookmarks were automatically added when the browser profile was created, but that stopped 2 years ago with bug 1446325.

I cannot create them again through the bookmark menu, but I can, through the bookmarks.create API, like this:

await browser.bookmarks.create({
  title:  'Most Visited',
  url: 'place:sort=8&maxResults=10',
  parentId:'toolbar_____'
})

I don't know why the ID is missing, but cannot debug it since i don't have that bookmark of yours.
If you want to help with debugging, share the part from places.sqlite from comment 5. If you don't have the sqlite3 program and are willing to share the database of your bookmarks and history, send places.sqlite to me by mail. It contains sensitive information, so to make sure that it is saved in as few places as possible (i.e. not saved on intermediate mail servers), generate a one-time link via https://send.firefox.com and mail me the link. I will download your file for debugging only, and remove it afterwards.

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---

152|1|6|3|0|Most Visited|||1492090248054000|1492090248111000|lL2U-b5xRYm4|1|1

Flags: needinfo?(rob)
Attached image firefox_AZ8oi4YicN.png
Severity: -- → S4

To fix this bug, this condition:

      if (!trigger._placesNode) {
        return;
      }

should be changed to

      if (!trigger._placesNode?.bookmarkGuid) {
        return;
      }

at https://searchfox.org/mozilla-central/rev/4bb2401ecbfce89af06fb2b4d0ea3557682bd8ff/browser/components/extensions/parent/ext-menus.js#1168

Mentor: rob
Flags: needinfo?(rob)
Keywords: good-first-bug
Priority: -- → P5
Assignee: nobody → soniasingla.1812
Attachment #9156518 - Attachment description: Bug 1638360 - Context Menu Item appearing for bookmarks. r=robwu → Bug 1638360 - Only show bookmark menu items for nodes with a bookmarGuid. r=robwu
Attachment #9156518 - Attachment description: Bug 1638360 - Only show bookmark menu items for nodes with a bookmarGuid. r=robwu → Bug 1638360 - Only show bookmark menu items for nodes with a bookmarkGuid. r=robwu
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f01316d43bf0
Only show bookmark menu items for nodes with a bookmarkGuid. r=robwu
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.