Closed Bug 608972 Opened 14 years ago Closed 9 years ago

Personas/Background without an author displays as "By undefined"

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file)

If you have a persona that doesn't have an author, the Add-ons manager UI says "By undefined"

Looking in LightweightThemeManager.jsm, I see this:

431   this.__defineGetter__("creator", function() {
432     return new AddonManagerPrivate.AddonAuthor(aTheme.author);
433   });

No check for if author isn't specified, so addon manager will get "undefined" which is not equal to ""
Component: Add-ons Manager → Theme
Product: Toolkit → Firefox
QA Contact: add-ons.manager → theme
Target Milestone: --- → Firefox 4.0
I don't have an easy way to create a diff right now, but here's the fix:


  this.__defineGetter__("creator", function() {
    return "author" in aTheme ? new AddonManagerPrivate.AddonAuthor(aTheme.author) : null;
  });
Component: Theme → Add-ons Manager
Product: Firefox → Toolkit
QA Contact: theme → add-ons.manager
Target Milestone: Firefox 4.0 → ---
Shouldn't fixes to LightweightThemeManager.jsm be in themes?
(In reply to comment #2)
> Shouldn't fixes to LightweightThemeManager.jsm be in themes?

No.
Summary: Personas/Background without an other display "By undefined" → Personas/Background without an auther display "By undefined"
Attached patch 608972.diffSplinter Review
Simple fix. I've tested and it fixes the issue.
Attachment #8653637 - Flags: review?(dtownsend)
Attachment #8653637 - Flags: review?(dtownsend) → review+
url:        https://hg.mozilla.org/integration/mozilla-inbound/rev/15ef13bfc4db52066e891211923152edce3be873
changeset:  15ef13bfc4db52066e891211923152edce3be873
user:       Mike Kaply <mozilla@kaply.com>
date:       Mon Aug 31 07:42:04 2015 -0500
description:
Bug 608972 - Make sure there is a theme author before using it. r=Mossop
Summary: Personas/Background without an auther display "By undefined" → Personas/Background without an author displays as "By undefined"
https://hg.mozilla.org/mozilla-central/rev/15ef13bfc4db
Assignee: nobody → mozilla
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: