Item8521: ZonePlugin breaks plugin installer from both bin/configure and shell

Priority: Urgent
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: ZonePlugin
Reported By: GeorgeClark
Waiting For:
Last Change By: PaulHarvey
See Support.Question427

The BEGIN block of the ZonePlugin is executed by the plugin installer even when the plugin is disabled. This causes all plugin installs to fail. The workaround to allow plugin installation to proceed is to be sure that ZonePlugin is enabled in LocalSite.cfg if it is installed.

I locally tried the following patch to the BEGIN block and it appears to allow the installer to proceed - however I have not done much testing:

# monkey-patch API ###########################################################
BEGIN {
  if ($Foswiki::cfg{Plugins}{ZonePlugin}{Enabled}) {
      no warnings 'redefine';
      *Foswiki::Func::addToZone = \&Foswiki::Plugins::ZonePlugin::addToZone;
      *Foswiki::Func::addToHEAD = \&Foswiki::Plugins::ZonePlugin::addToHead;
  }
}

-- GeorgeClark - 13 Feb 2010

Why does ZonePlugin get compiled even though it is disabled?

-- MichaelDaum - 14 Feb 2010

Someone who knows / understands the internals of configure and the installer scripts might know - I don't. Maybe part of the installer error checking? In any event, it pretty thoroughly breaks bin/configure and xxxxx_installer scripts. Two sites reported errors in Support / IRC in less than 24 hours.

-- GeorgeClark - 14 Feb 2010

The above patch looks pretty straight forward. Will add it asap.

-- MichaelDaum - 14 Feb 2010

Note that this issue appears to be also triggered by other plugin failures. See Item2595 where a plugin issue disrupts plugin installation.

-- GeorgeClark - 14 Feb 2010

Should be fixed in v1.1

-- MichaelDaum - 15 Feb 2010

Tiny tweak to config.spec so we can actually see the ZonePlugin options. Probably should have created a new task, but it was very minor change.

-- PaulHarvey - 05 Mar 2010
 
Topic revision: r11 - 05 Mar 2010, PaulHarvey
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License