You are here: Foswiki>Tasks Web>Item13513 (03 Aug 2015, GeorgeClark)Edit Attach

Item13513: Configure extension installer overlays extension settings with defaults when upgrading an extension.

Priority: Urgent
Current State: Closed
Released In: 2.0.1
Target Release: patch
Applies To: Engine
Component: Configure
Branches: master
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Noticed when upgrading AntiWikiSpamPlugin on, all of the customized settings were lost.

-- GeorgeClark - 07 Jul 2015

Marking this urgent. Even though the gui user has a chance to not save the configuration, shell installer does not.

From the install log:
{Plugins}{AntiWikiSpamPlugin}{MeaningfulCount} '0' '10'
{Plugins}{AntiWikiSpamPlugin}{MeaningfulWebs} '^(Extensions&vbar;Download&vbar;Tasks&vbar;Support&vbar;System)$' '.*'
{Plugins}{AntiWikiSpamPlugin}{RegistrationBlackList} 'System.FoswikiOrgAntiWikiSpamRegistrationBlackList' '$Foswiki::cfg{SystemWebName}.AntiWikiSpamRegistrationBlackList'
{Plugins}{AntiWikiSpamPlugin}{RegistrationWhiteList} 'System.FoswikiOrgAntiWikiSpamRegistrationWhiteList' '$Foswiki::cfg{SystemWebName}.AntiWikiSpamRegistrationWhiteList'
{Plugins}{AntiWikiSpamPlugin}{AutoUpdateSignatures} ($FALSE)  
{Plugins}{AntiWikiSpamPlugin}{CheckAttachments} ($FALSE)  
{Plugins}{AntiWikiSpamPlugin}{CheckRegistrations} ($TRUE) 1
{Plugins}{AntiWikiSpamPlugin}{CheckTopics} ($TRUE) 1
{Plugins}{AntiWikiSpamPlugin}{RegistrationBlackList} '$Foswiki::cfg{SystemWebName}.AntiWikiSpamRegistrationBlackList' '$Foswiki::cfg{SystemWebName}.FoswikiOrgAntiWikiSpamRegistrationBlackList'
{Plugins}{AntiWikiSpamPlugin}{RegistrationWhiteList} '$Foswiki::cfg{SystemWebName}.AntiWikiSpamRegistrationWhiteList' '$Foswiki::cfg{SystemWebName}.FoswikiOrgAntiWikiSpamRegistrationWhiteList'

-- GeorgeClark - 07 Jul 2015

To recreate:

  • Install an extension - in this case it was AntiWikiSpamPlugin.
  • Update settings to change some defaults.
  • Re-install the extension
  • Note that the settings have reverted to the defaults.

I did some debug printing. around / after Line 969 in Configure::Package, dumping the $Foswiki::cfg before and after various calls to Foswiki::Configure::LoadSpec::parse

Nether call actually changes the parameters, but a final dump at end of the install shows them reverted. I could not figure out how. Note that the 2nd call to LoadSpec is missing the $reporter, and will crash if it has anything to report (ie with TRACE / DEBUG enabled).

-- Main.GeorgeClark - 13 Jul 2015 - 20:19

Found the issue. Package applies all the settings without regard to whether the setting is already defined in the configuration.

This could possibly become a feature at some point. It might be useful to be able to tell configure to restore all settings for an extension back to the defaults. But not for 2.0.1

-- GeorgeClark - 16 Jul 2015

ItemTemplate edit

Summary Configure extension installer overlays extension settings with defaults when upgrading an extension.
ReportedBy GeorgeClark
Codebase 2.0.0
SVN Range
AppliesTo Engine
Component Configure
Priority Urgent
CurrentState Closed
Checkins distro:36aca0d6cf20
TargetRelease patch
ReleasedIn 2.0.1
CheckinsOnBranches master
masterCheckins distro:36aca0d6cf20
Topic revision: r5 - 03 Aug 2015, GeorgeClark - This page was cached on 23 Oct 2016 - 18:22.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License