Closed Bug 532577 Opened 11 years ago Closed 11 years ago

Customizing personas will break addons manager

Categories

(Mozilla Labs Graveyard :: Personas Plus, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: tchung, Assigned: jose)

References

Details

Attachments

(2 files)

If you tried customizing the persona, then your addons manager will completely break.  You can't even remove the extension anymore, and must delete the profile. 

Using: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20091202 Minefield/3.7a1pre

See screenshot

Repro:
1) install latest extension at: https://ftp.mozilla.org/pub/mozilla.org/labs/personas/personas-dev-latest.xpi
2) set customized personas
3) in the edit window, change the text color to something else (already note that the custom color doesnt immediately update)
4) click ok to save.
5) open up addons manager.  Verify the window is broken and non functional.
Priority: -- → P1
Blocks: 521857
Target Milestone: -- → 1.5
Depends on: 529968
confirmed also for 1.5 Extension and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2b4) Gecko/20091124 Firefox/3.6b4
Assignee: cbeard → jose
Status: NEW → ASSIGNED
related errors from the error console :

Error: uncaught exception: [Exception... "'JavaScript component threw a null value as an exception' when calling method: [nsIExtensionManager::removeInstallListenerAt]"  nsresult: "0x8057001d (NS_ERROR_XPC_JS_THREW_NULL)"  location: "JS frame :: chrome://mozapps/content/extensions/extensions.js :: Shutdown :: line 1346"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIRDFService.GetLiteral]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://mozapps/content/extensions/extensions.js :: rebuildLWThemeDS :: line 886"  data: no]
The problem is that when a custom persona is selected it is being treated like a regular persona by the lightweight theme manager. This is OK, but the custom persona lacks an id - and sometimes also a name - which breaks the Tools - Add-ons - Themes dialog.

The proposed solution is to set an id property to the custom persona with a value of zero. This way, the custom persona theme appears in the Themes dialog and everything works as expected.

There is another issue though: now the custom persona is not applied at all unless a header and footer are specified (which is OK I guess?). This is being enforced somewhere inside the lightweight theme manager. This might not be a problem, but if it is perhaps a separate bug should be filed for it.

Submitted a patch so Myk can review all this, before committing.
Attachment #415915 - Flags: review?(myk)
Attachment #415915 - Flags: review?(myk) → review+
Comment on attachment 415915 [details] [diff] [review]
Patch: Id = zero for custom persona

In the long run, the custom persona feature should be enhanced to allow users to create multiple custom personas, and at that point it'll make sense to assign each a unique ID, but for now this is great. r=myk
Thanks Myk. Patch committed:
http://hg.mozilla.org/labs/personas/rev/042184de7312
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to comment #3)\
> There is another issue though: now the custom persona is not applied at all
> unless a header and footer are specified (which is OK I guess?). This is being
> enforced somewhere inside the lightweight theme manager. This might not be a
> problem, but if it is perhaps a separate bug should be filed for it.
>
Filed Bug 532741 to track this.   This used to work before (personas 1.4?)
Blocks: 529968
No longer depends on: 529968
Verified fix with personas 1.5rc2.
Status: RESOLVED → VERIFIED
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.