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

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Enhancement Closed Engine FoswikiMeta  
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 15:01 (GMT)

FormattedSearch
Formatted Search Customize the display of search results. The default output format of a %SEARCH{...}% is a table consisting of topic names and topic summaries. Use ...
QuerySearch
Query Search Query searches help you search the contents of forms attached to your topics, as well as the values of other meta data attached to the topic. Using query ...
Number of topics: 2

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

Results from System web retrieved at 15:01 (GMT)

FormattedSearch
Formatted Search Customize the display of search results. The default output format of a %SEARCH{...}% is a table consisting of topic names and topic summaries. Use ...
QuerySearch
Query Search Query searches help you search the contents of forms attached to your topics, as well as the values of other meta data attached to the topic. Using query ...
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
 

ItemTemplate edit

Summary New Plugin API method Foswiki::Meta::registerMETA not working correctly
ReportedBy PaulHarvey
Codebase 1.1.1, 1.1.0, trunk
SVN Range
AppliesTo Engine
Component FoswikiMeta
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins Foswikirev:9848 Foswikirev:9849 Foswikirev:9850 Foswikirev:9851 Foswikirev:9858 Foswikirev:9868 Foswikirev:9881
TargetRelease patch
ReleasedIn 1.1.2
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 CopyrightStatement. Creative Commons License