Closed Bug 635375 Opened 13 years ago Closed 13 years ago

Preferences > add-ons > get add-ons 'go to page' disabled

Categories

(Toolkit :: Add-ons Manager, defect, P2)

ARM
Android
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: kbrosnan, Assigned: mfinkle)

Details

(Whiteboard: [4.0b5])

Attachments

(2 files, 1 obsolete file)

Open the preferences
Select the Extensions window
Scroll down to the Get add-ons section
Select one of the add-ons

results:
'Go to Page' button is disabled
expected:
clickable button or no button
Guess most of the extensions don't provide a homepage. Expected 'go to page' to take me to the amo page for the extension.
OS: Windows 7 → Android
Hardware: x86 → ARM
Yes, "Go to Page" should take you to the AMO page of the extension. This regressed.
Might be a bug, or normal behavior, in the AddonRepository. The "addon" object returned by the repository has a "homepageURL" property. That property is used by Fennec as the target for the Go To Page button.

In the AddonRepository, the code first tries the add the author supplied hompageURL in the property. The homepageURL is optional. As a fallback, the code will use the AMO home page for the add-on.

The code never seems to add the fallback. Or maybe it adds the AMO page first, then overwrites the empty homepageURL.

Sets the homepageURL:
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/AddonRepository.jsm#901

Sets the AMO home page:
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/AddonRepository.jsm#976

I noticed that the AMO page ("learnmore") is returned first in the XML. Seems like the empty homepageURL is overwriting it.
Priority: -- → P2
Whiteboard: [4.0b5]
Looks like a bug on our side then. Should be as simple as doing an empty check before assigning here http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/AddonRepository.jsm#901

Not sure I'd call this blocking but if someone wants to whip up a quick patch and test I'd push to take it.
Component: General → Add-ons Manager
Product: Fennec → Toolkit
QA Contact: general → add-ons.manager
Attached patch patch (obsolete) — Splinter Review
I think this was not caught in the current tests because the test for "use learnmore if homepage is not defined" did not have an empty <homepageURL/> in the XML. The real AMO feed does.

Pushed to try
Assignee: nobody → mark.finkle
Attachment #514862 - Flags: review?(dtownsend)
Patch works in Fennec. Add-ons with a homepage will open it, else the learnmore AMO page is opened.
Comment on attachment 514862 [details] [diff] [review]
patch

I think this is the wrong patch
Attached patch real patchSplinter Review
Here's the right one
Attachment #514862 - Attachment is obsolete: true
Attachment #514900 - Flags: review?(dtownsend)
Attachment #514862 - Flags: review?(dtownsend)
The patch is passing on Try server
Attachment #514900 - Flags: review?(dtownsend)
Attachment #514900 - Flags: review+
Attachment #514900 - Flags: approval2.0+
pushed:
http://hg.mozilla.org/mozilla-central/rev/e8facc64c88e
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Kevin or Aaron, can one of you please verify this fix? Thanks.
Verified - Firefox Mobile nightly 20110304042129
Status: RESOLVED → VERIFIED
Flags: in-litmus?
Kevin, who can add this manual test to Litmus?
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: