The default bug view has changed. See this FAQ.

When migrating with multiple themes all will be marked as enabled in the database

VERIFIED FIXED in mozilla1.9.3a5

Status

()

Toolkit
Add-ons Manager
P1
major
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: Alfred Kayser, Assigned: mossop)

Tracking

({testcase})

Trunk
mozilla1.9.3a5
testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [AddonsRewriteTestday][rewrite])

Attachments

(5 attachments)

(Reporter)

Description

7 years ago
In the new addons UI introduced by 554007, the 'Use Theme' button is missing.
Only 'Personas' can be enabled, but then they cannot be disabled.
(Reporter)

Updated

7 years ago
Blocks: 554007

Comment 1

7 years ago
Enable on the default theme (I only have one so just using that as an example) will unload the persona.
(Reporter)

Comment 2

7 years ago
There is no 'enable' button on other full themes. That is the real issue here.

Updated

7 years ago
Blocks: 550048
Whiteboard: [AddonsRewriteTestday]
I see an enable button. Can you please give exact steps and tell us your complete build id? Thanks.
(Assignee)

Updated

7 years ago
No longer blocks: 554007

Comment 4

7 years ago
Created attachment 442773 [details]
Enable Themes button

I also see the enable button on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a5pre) Gecko/20100430 Minefield/3.7a5pre.  It's right there for your walnut theme, yay!

Perhaps this is OS dependent issue?
(Reporter)

Comment 5

7 years ago
Created attachment 442793 [details]
Screenshot showing the missing 'enable' button on themes

This is with build: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100430 Minefield/3.7a5pre GTB5

This is in Windows XP, classic theme.
(Reporter)

Comment 6

7 years ago
To be more precise,
the .addon-control.enable button has: hidden="true".
So, somehow the logic of the addon manager makes it hidden.
I have seen it too a couple of minutes ago. I have no steps yet but will keep an eye on it.
I have still no idea why that happens but I have a simplified profile ready which I will attach to this bug now.
Summary: With the new addons UI, there is no way to use a theme. → Under some conditions it's not possible to enable other themes (personas)
Version: unspecified → Trunk
Keywords: testcase
Whiteboard: [AddonsRewriteTestday] → [AddonsRewriteTestday][rewrite]
Created attachment 442850 [details]
test profile

Just create a fresh profile and replace its content. Then open the Addons Manager and select the Themes pane. As you can see there is no Enable button for the Default theme.
Duplicate of this bug: 563116
This sounds like a manifestation of my [suite] issue.

Where if there is more than one "app-installed" theme, there is no enable button on the other.

I suspect the manager is making some assumption about "App Theme is Enabled" and does not provide buttons for the _other_ app themes. If this is a separate issue I can split it out if need be
Blocks: 561600
Created attachment 442994 [details]
Busted extensions.sqlite

This extensions.sqlite was created by running an about:addons build once on an existing profile.
(Assignee)

Updated

7 years ago
Priority: -- → P1
(Assignee)

Updated

7 years ago
Blocks: 461973
No longer blocks: 550048
(Assignee)

Comment 13

7 years ago
(In reply to comment #9)
> Created an attachment (id=442850) [details]
> test profile
> 
> Just create a fresh profile and replace its content. Then open the Addons
> Manager and select the Themes pane. As you can see there is no Enable button
> for the Default theme.

I think this profile is causing a different bug which I've filed as bug 563971. The others here seem to be seeing something different.
(Assignee)

Comment 14

7 years ago
(In reply to comment #5)
> Created an attachment (id=442793) [details]
> Screenshot showing the missing 'enable' button on themes
> 
> This is with build: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
> rv:1.9.3a5pre) Gecko/20100430 Minefield/3.7a5pre GTB5
> 
> This is in Windows XP, classic theme.

For some reason here the manager thinks that Walnut is enabled, but I presume the default theme is the one that is showing? The other themes there don't have enable buttons because they are incompatible with the app I think.
(Assignee)

Comment 15

7 years ago
Figured this out. This is a problem when migrating multiple themes from the old extensions.rdf. We never used to make a userDisabled property in the rdf for themes, the preference was all that was used. The current code assumes a lack of userDisabled property means the add-on was enabled which is wrong for themes.
Summary: Under some conditions it's not possible to enable other themes (personas) → When migrating with multiple themes all will be marked as enabled in the database
(Assignee)

Comment 16

7 years ago
Created attachment 444177 [details] [diff] [review]
patch rev 1

This solves the problem at migration time and adds an automated test for it. It doesn't currently fix the problem for existing users that have hit it, need to consider the cost of that vs. just asking them to delete the extensions.sqlite from their profile.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #444177 - Flags: review?(robert.bugzilla)
(Assignee)

Comment 17

7 years ago
http://hg.mozilla.org/projects/addonsmgr/rev/6fbb50534c71
Flags: in-testsuite+
Whiteboard: [AddonsRewriteTestday][rewrite] → [AddonsRewriteTestday][rewrite][fixed-in-addonsmgr][needs-review]
Comment on attachment 444177 [details] [diff] [review]
patch rev 1

>diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm
>--- a/toolkit/mozapps/extensions/XPIProvider.jsm
>+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
>@@ -1383,17 +1383,20 @@ var XPIProvider = {
>       // Update the AddonInternal properties.
>       newAddon._installLocation = aInstallLocation;
>       newAddon.visible = !(newAddon.id in visibleAddons);
>       newAddon.installDate = aAddonState.mtime;
>       newAddon.updateDate = aAddonState.mtime;
> 
>       // If there is migration data then apply it.
>       if (aMigrateData) {
>-        newAddon.userDisabled = aMigrateData.userDisabled;
>+        // Theme disabled state is determined by the selected theme preference
>+        // and will have been set in loadManifestFromRDF
Perhaps something along these lines?
// A theme's disabled state is determined by the selected theme preference
// which is read in loadManifestFromRDF

>+        if (newAddon.type != "theme")
>+          newAddon.userDisabled = aMigrateData.userDisabled;
>         if ("installDate" in aMigrateData)
>           newAddon.installDate = aMigrateData.installDate;
>         if ("targetApplications" in aMigrateData)
>           newAddon.applyCompatibilityUpdate(aMigrateData, true);
>       }
> 
>       // Update the database.
>       XPIDatabase.addAddonMetadata(newAddon, aAddonState.descriptor);

r=me with the wording fixed up
Attachment #444177 - Flags: review?(robert.bugzilla) → review+
Whiteboard: [AddonsRewriteTestday][rewrite][fixed-in-addonsmgr][needs-review] → [AddonsRewriteTestday][rewrite][fixed-in-addonsmgr][needs-landing]
(Assignee)

Comment 19

7 years ago
http://hg.mozilla.org/mozilla-central/rev/2a012e312acc
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [AddonsRewriteTestday][rewrite][fixed-in-addonsmgr][needs-landing] → [AddonsRewriteTestday][rewrite]
Target Milestone: --- → mozilla1.9.3a5
Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a5pre) Gecko/20100517 Minefield/3.7a5pre

Dave, do the automated test cover all of the possible cases or do we also need manual tests?
Status: RESOLVED → VERIFIED
Flags: in-litmus?
(Assignee)

Comment 21

7 years ago
Should be fine here.
Flags: in-litmus? → in-litmus-
You need to log in before you can comment on or make changes to this bug.