Theme File Bug

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
RealityRipple
Astronaut
Astronaut
Posts: 659
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Theme File Bug

Unread post by RealityRipple » 2018-05-17, 02:50

Came across a bug when I was working with themes. At first, I thought it was my fault, but I've tested it with a blank profile and themes that aren't my own with the same result.

Bug: Theme becomes un-enable-able if updated and disabled at the same time, in that order.

Steps to Reproduce:
  1. Download two theme XPI files. Any two themes will do.
  2. Open the Add-ons Manager.
  3. Install both themes, select one to be enabled. We will call this one Theme X and the disabled one Theme Y. Theme D will represent the Default theme. The installation process doesn't matter at this stage.
  4. Reinstall Theme X by dragging it into Pale Moon. Do not restart.
  5. Enable Theme Y through the Appearance section of the Add-ons Manager and restart.
Expected Result: Theme X should be installed with the version from the file. Theme Y should be enabled. Theme X and Theme D should have Enable buttons.

Actual Result: Theme X is installed, I think. Theme Y is enabled. Theme X does not have an Enable button. If you enable Theme D or install another theme, Theme X will be enable-able, but Theme Y won't be. Things get stuck until you remove the themes. I'm uncertain if X or Y must be removed, possibly either one will let the other work. Adding more themes will still prevent Theme Y from being enable-able again. There could be other permutations of this bug with varied outcomes, but the main thing is that one or more themes will end up getting "locked out" of the interface.

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 580
Joined: 2017-01-14, 02:40
Location: Philippines
Contact:

Re: Theme File Bug

Unread post by FranklinDM » 2018-05-18, 11:11

I can confirm this.

For some reason, the Add-ons Manager gets confused and marks both themes as active while Theme X is not marked as userDisabled even if it should be disabled (this is evident in the extensions.json, found inside the profile folder). If you switch/enable other themes, Theme X is still marked as active and not userDisabled (when only 1 theme should be allowed to be enabled :think:).

Locked