Closed Bug 321973 Opened 19 years ago Closed 18 years ago

context menu "Bookmark this link..." is broken

Categories

(Firefox :: Bookmarks & History, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Firefox 2 beta1

People

(Reporter: philor, Assigned: pkasting)

References

Details

(Whiteboard: swag: 0.5 days)

Attachments

(1 file, 2 obsolete files)

Currently, right clicking and trying to bookmark a link just brings up a broken and heightless dialog.
-> annie. Annie, I think it's time we stop using the shims and start using #ifdef MOZ_PLACES.
Assignee: nobody → annie.sullivan
Severity: normal → blocker
Priority: -- → P1
Severity: blocker → normal
Priority: P1 → P3
Target Milestone: --- → Firefox 2 beta1
*** Bug 329108 has been marked as a duplicate of this bug. ***
*** Bug 329868 has been marked as a duplicate of this bug. ***
Same here, no bookmark but I don't have the blank dialog. I get this in the javascript console: Error: BookmarksUtils is not defined Source file: chrome://browser/content/browser.xul Line: 1
Blocks: 317881
*** Bug 331860 has been marked as a duplicate of this bug. ***
Whiteboard: swag: 0.5 days
When I click "Bookmark this link", absolutely nothing happens. JavaScript console shows nothing. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060330 Firefox/2.0a1 ID:2006033004 Same with my Trunk build.
Summary: Shim context menu "Bookmark this link..." → context menu "Bookmark this link..." is broken
Flags: blocking1.9a1?
I have a local fix for this
Assignee: annie.sullivan → pkasting
Attached patch patch v1 (obsolete) — Splinter Review
This patch does several things: * Allows callers that pop up the add bookmarks dialog to provide a desired title. If no title is provided, fall back to querying the history service. This is the main part I'd like Joe to review. * Shows the add bookmarks dialog for a link, with the title set to the link text. * Adds relevant bug numbers and cleans up some unused functions for other stuff I ran across while fixing this. These changes are basically all in browser.js. These last two bullet points are the main things I'd like Ben to review.
Attachment #235485 - Flags: superreview?(bugs)
Attachment #235485 - Flags: review?(joe)
Comment on attachment 235485 [details] [diff] [review] patch v1 My main critique is that the explicit passing of undefined is a bit awkward. It'd be better to (1) change the test to "if (param)" instead of "if (param === undefined)" and change the parameter order so that the title parameter goes last and thus can be omitted in the calls.
Attachment #235485 - Flags: review?(joe) → review-
(In reply to comment #9) > (From update of attachment 235485 [details] [diff] [review] [edit]) > It'd be better to (1) change the test to "if (param)" instead of "if (param === > undefined)" I did this purposefully so that callers can provide an empty string as their desired title. If I don't use "=== undefined" I can't get that behavior. I can reorder the params if you wish; I was mainly trying to keep things logically grouped.
Comment on attachment 235485 [details] [diff] [review] patch v1 aside from joe's comments, this looks ok to me from a sr perspective. sr=ben@mozilla.org with those changes.
Attachment #235485 - Flags: superreview?(bugs) → superreview+
Attached patch patch v2 (obsolete) — Splinter Review
This moves the URI/title params to the end of the list so the title can be omitted in most calls. It preserves the "=== undefined" bit, but with a comment noting why that's used. Preserving sr+ from Ben.
Attachment #235485 - Attachment is obsolete: true
Attachment #235987 - Flags: superreview+
Attachment #235987 - Flags: review?(joe)
Comment on attachment 235987 [details] [diff] [review] patch v2 Good for the most part, but structurally, I think it's too much logic in the init function. How about just always setting this._bookmarkTitle = title in the init and then surround the existing block in _populateProperties with the (this._bookmarkTitle === undefined) test. (You'd also want to change the initial declaration of this._bookmarkTitle for consistency.)
Attached patch patch v3Splinter Review
Like this, then?
Attachment #235987 - Attachment is obsolete: true
Attachment #236337 - Flags: superreview+
Attachment #236337 - Flags: review?(joe)
Attachment #235987 - Flags: review?(joe)
Comment on attachment 236337 [details] [diff] [review] patch v3 Yep!
Attachment #236337 - Flags: review?(joe) → review+
Checked in. /mozilla/browser/base/content/browser-context.inc 1.26 /mozilla/browser/base/content/browser-places.js 1.9 /mozilla/browser/base/content/browser-sets.inc 1.81 /mozilla/browser/base/content/browser.js 1.703 /mozilla/browser/components/places/content/bookmarkProperties.js 1.23 /mozilla/browser/components/places/content/bookmarkProperties.xul 1.14 /mozilla/browser/components/places/content/controller.js 1.97 Clearing blocking request.
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking1.9a1?
Resolution: --- → FIXED
Followup fix for small copy-and-paste error: /browser/components/places/content/bookmarkProperties.js 1.24
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h". In Thunderbird 3.0b, you do that as follows: Tools | Message Filters Make sure the correct account is selected. Click "New" Conditions: Body contains places-to-b-and-h Change the action to "Delete Message". Select "Manually Run" from the dropdown at the top. Click OK. Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter. Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: