Item13127: Inconsistent documentation on Config.spec for Plugins

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release:
Applies To: Engine
Component: Configure, Documentation
Branches: master
Reported By: GeorgeClark PhilippGortan
Waiting For:
Last Change By: GeorgeClark
Creating a task because I'll never remember to ask otherwise.

DevelopingPlugins documents that settings should live at the top of the ::cfg hierarchy $Foswiki::cfg{BathPlugin}{PlugType} = 'Plastic';

HowToWriteASpecFile documents that settings should live under {Extensions} ie. $Foswiki::cfg{Extensions}{ConfigurePlugin}{ExampleKey} = 42;

However everything we ship live under {Plugins} and I believe that's where the core looks for the {Enable} and {Module} parameters.

Doing a grep of the subversion tree, only two use {Extensions} one of which seems rather nonsensical. CKEditorPlugin puts settings under {Extensions}{GenPDFPisaPlugin}

find . -name Config.spec | xargs grep \{Extensions\}
./GenPDFAddOn/lib/Foswiki/Contrib/GenPDFAddOn/Config.spec:$Foswiki::cfg{Extensions}{GenPDFAddOn}{htmldocCmd} = '';
./DBIStoreContrib/lib/Foswiki/Contrib/DBIStoreContrib/Config.spec:$Foswiki::cfg{Extensions}{DBIStoreContrib}{DSN} = 'dbi:SQLite:dbname=$Foswiki::cfg{WorkingDir}/dbcache';
./DBIStoreContrib/lib/Foswiki/Contrib/DBIStoreContrib/Config.spec:$Foswiki::cfg{Extensions}{DBIStoreContrib}{Username} = '';
./DBIStoreContrib/lib/Foswiki/Contrib/DBIStoreContrib/Config.spec:$Foswiki::cfg{Extensions}{DBIStoreContrib}{Password} = '';
./DBIStoreContrib/lib/Foswiki/Contrib/DBIStoreContrib/Config.spec:$Foswiki::cfg{Extensions}{DBIStoreContrib}{SQLite}{PCRE} = '/usr/lib/sqlite3/pcre.so';
./DBIStoreContrib/lib/Foswiki/Contrib/DBIStoreContrib/Config.spec:$Foswiki::cfg{Extensions}{DBIStoreContrib}{AutoloadUnknownMETA} = 0;
./DBIStoreContrib/lib/Foswiki/Contrib/DBIStoreContrib/Config.spec:$Foswiki::cfg{Extensions}{DBIStoreContrib}{Schema} = {
./CKEditorPlugin/lib/Foswiki/Plugins/CKEditorPlugin/Config.spec:$Foswiki::cfg{Extensions}{GenPDFPisaPlugin}{xhtml2pdf} = '/usr/local/bin/xhtml2pdf';
./CKEditorPlugin/lib/Foswiki/Plugins/CKEditorPlugin/Config.spec:$Foswiki::cfg{Extensions}{GenPDFPisaPlugin}{useextcss} = $TRUE;
./CKEditorPlugin/lib/Foswiki/Plugins/CKEditorPlugin/Config.spec:$Foswiki::cfg{Extensions}{GenPDFPisaPlugin}{extcssfile} = '';
./CKEditorPlugin/lib/Foswiki/Plugins/CKEditorPlugin/Config.spec:$Foswiki::cfg{Extensions}{GenPDFPisaPlugin}{extcssfileNum} = '';

-- GeorgeClark - 01 Dec 2014

Looking at lib/Foswiki/Plugins.pm, we look for {Plugins} only for the enabled flag.


Dunno what you want from me. It's namespace soup.

FWIW, my opinion, to avoid polluting namespaces:

{Plugins} should only be used for the {Module} and {Enabled}

{Extensions} is used for everything else. Plugins are Extensions. So are Contribs.

Can we persuade everyone of this? I doubt it.

-- CrawfordCurrie - 02 Dec 2014

 

ItemTemplate edit

Summary Inconsistent documentation on Config.spec for Plugins
ReportedBy GeorgeClark PhilippGortan
Codebase
SVN Range
AppliesTo Engine
Component Configure, Documentation
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:45560af0c25a distro:6cee624fcef0
ReleasedIn n/a
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:45560af0c25a distro:6cee624fcef0
ItemBranchCheckins
Release01x01Checkins
Topic revision: r6 - 08 Dec 2014, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy