You are here: Foswiki>Tasks Web>Item9948 (16 Mar 2011, GeorgeClark)Edit Attach

Item9948: New Plugin API method Foswiki::Meta::registerMETA not working correctly

pencil
Priority: Enhancement
Current State: Closed
Released In: 1.1.2
Target Release: patch
Applies To: Engine
Component: FoswikiMeta
Branches:
Reported By: PaulHarvey
Waiting For:
Last Change By: GeorgeClark
Foswiki::Func::registerMETA calling convention doesn't match Foswiki::Meta::registerMETA, so you get perl errors when you use it (Func wants a hashref, Meta wants a hash).

Additionally, it's impossible to register a new meta that is an array type like FILEATTACHMENT. SvenDowideit pointed out Foswiki::Query::Node and the %isArrayType hash. There is no good way to add an element to this hash, unless you use persistent perl and wait for the 2nd+ request (the first request compiles the .pm, overwriting any previous hash elements a plugin may have registered in initPlugin).

-- PaulHarvey - 04 Nov 2010

CDot and Olivier made some useful suggestions. Refactoring Foswiki::Query::Node::isArrayType and aliases into Foswiki::Meta; changing back to the old method signature, adding type => 'array' and alias => 'foo' along the way

-- PaulHarvey - 04 Nov 2010

Hi Crawford, your changes have enabled SemanticLinksPlugin to work quite well, thanks.

But the following no longer works:
Searched: parent.name='Macros'

Results from System web retrieved at 07:29 (GMT)

VarACTIVATEDPLUGINS
ACTIVATEDPLUGINS list of currently activated plugins Examples * %ACTIVATEDPLUGINS% expands to Related PLUGINDESCRIPTIONS, FAILEDPLUGINS, PLUGINVERSION
VarADDTOZONE
ADDTOZONE add content to a named zone on the page Parameters Parameter Description Default "zone" comma separated list of the names of zones th...
Number of topics: 2

But this does:
Searched: META:TOPICPARENT.name='Macros'

Results from System web retrieved at 07:29 (GMT)

VarACTIVATEDPLUGINS
ACTIVATEDPLUGINS list of currently activated plugins Examples * %ACTIVATEDPLUGINS% expands to Related PLUGINDESCRIPTIONS, FAILEDPLUGINS, PLUGINVERSION
VarADDTOZONE
ADDTOZONE add content to a named zone on the page Parameters Parameter Description Default "zone" comma separated list of the names of zones th...
Number of topics: 2

ReleaseBlocker, I might get a few minutes to look at it tonight

-- PaulHarvey - 05 Nov 2010

Should be OK now.

-- CrawfordCurrie - 06 Nov 2010

Re-worded the bug title for release notes.

-- PaulHarvey - 06 Nov 2010

I don't see any of Crawford's checkins making it over to Release01x01. As a result SemanticLinksPlugin and perhaps others are broken on 1.1.2 but work fine on trunk.

-- PaulHarvey - 27 Feb 2011
 
Topic revision: r16 - 16 Mar 2011, 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