Closed Bug 628785 Opened 14 years ago Closed 12 years ago

Firefox should define a value for extensions.getAddons.recommended.url so AddonRepoistory.retrieveRecommendedAddons() works

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: sheppy, Assigned: sachin)

References

Details

(Keywords: regression, Whiteboard: [good first bug])

Attachments

(1 file, 1 obsolete file)

I don't have a value set for this preference, so the AddonRepository.jsm API fails immediately instead of attempting to load recommendations when I call retrieveRecommendedAddons(). If this pref is missing, an appropriate default should be used.
Looks like no default is set for this preference on a fresh install of Firefox. Setting the preference to: https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=firefox Makes the API start to work.
Not going to be a blocker but we should probably re-add the preference back so the API continues to work.
Dave, do we make use of the URL in any of our UI? Or is it a method which can be used by add-ons?
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
(In reply to comment #3) > Dave, do we make use of the URL in any of our UI? Or is it a method which can > be used by add-ons? We don't use it in the UI anymore but the API is still available for add-ons.
Regression from bug 554007.
Blocks: 554007
Keywords: regression
Whiteboard: [good first bug]
No longer blocks: 629398
No preference was created, though. Please tell me where the other preferences are created, if I have to create a preference for this.
Attachment #737093 - Flags: review?(eshepherd)
Comment on attachment 737093 [details] [diff] [review] If the preference doesn't exist, it uses the default value. Review of attachment 737093 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for jumping in to fix this, Sachin. Sorry for the confusion here - we don't support default preferences for URLs in the code (ie, AddonRepository.jsm shouldn't be modified to support this). As comment 2 says, all we need is a value for this preference added here: http://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#44 Other apps will have to set the value for the pref if they want to have that API be usable, same as every other URL the Add-ons Manager uses.
Attachment #737093 - Flags: review?(eshepherd) → review-
Thanks Blair, for the review.
Assignee: nobody → sachinhosmani2
Attachment #737093 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #737225 - Flags: review?(bmcbride)
Comment on attachment 737225 [details] [diff] [review] Creates the preference with a default value. Review of attachment 737225 [details] [diff] [review]: ----------------------------------------------------------------- Wonderful, thanks :)
Attachment #737225 - Flags: review?(bmcbride) → review+
Summary: If extensions.getAddons.recommended.url pref doesn't exist, use a reasonable default → Firefox should define a value for extensions.getAddons.recommended.url so AddonRepoistory.retrieveRecommendedAddons() works
Landed on the fx-team branch, which should get merged into mozilla-central within a day or two: https://hg.mozilla.org/integration/fx-team/rev/00c7171cf12c
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: