Foswiki on GitHub is open for business! Next release meeting: Monday September 1, 1300Z

Item11386: Upgrades to 1.1.x don't get the OP_match operator added to query search. Breaks attachments table.

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Engine Configure  
The following code in templates/attachtables.pattern.tmpl causes an issue where the attachment table is not shown (i.e. The Twisty wrapping it breaks). The issue is with the string comparison =~ which should read ~ The MAKETEXT does not handle the query issue correctly. A separate task Tasks.Item11387 has been raised for this.

Original code
%TMPL:DEF{"topicattachmentwisty"}%%TWISTY{id="topicattachmentslist" mode="div" remember="on" showimgleft="%ICONURLPATH{toggleopen}%" hideimgleft="%ICONURLPATH{toggleclose}%" link="%MAKETEXT{"Attachments [_1]" args="<span class='foswikiSmall foswikiGrayText'>%QUERY{"length(attachments[NOT lc(attr)=~'h'])"}%</span>"}%" linkclass="patternTwistyButton"}%%TMPL:END%

Original code
%TMPL:DEF{"topicattachmentwisty"}%%TWISTY{id="topicattachmentslist" mode="div" remember="on" showimgleft="%ICONURLPATH{toggleopen}%" hideimgleft="%ICONURLPATH{toggleclose}%" link="%MAKETEXT{"Attachments [_1]" args="<span class='foswikiSmall foswikiGrayText'>%QUERY{"length(attachments[NOT lc(attr)~'h'])"}%</span>"}%" linkclass="patternTwistyButton"}%%TMPL:END%

-- PadraigLennon - 22 Dec 2011

This is caused by the upgrade not adding the 'Foswiki::Query::OP_match', entry to $Foswiki::cfg{Operators}{Query}

We don't have a good fix here. Either need to manually update LocalSite.cfg, or delete it and reconfigure. That field is hidden, so configure cannot edit it.

-- GeorgeClark - 22 Dec 2011

This goes back to Foswiki 1.0.x - Even Foswiki 1.1.0 has the OP_match operator defined. This is another reason to re-install when converting to 1.1.

-- GeorgeClark - 23 Dec 2011

Added a check to BasicSanity test to report that the file is missing the setting, along with some instructions on how to resolve the issue. Needed to add this to BasicSanity because "Hidden" fields don't get processed by the checkers.

-- GeorgeClark - 26 Dec 2011
 

ItemTemplate edit

Summary Upgrades to 1.1.x don't get the OP_match operator added to query search. Breaks attachments table.
ReportedBy PadraigLennon
Codebase 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0
SVN Range
AppliesTo Engine
Component Configure
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:13512 Foswikirev:13517
TargetRelease patch
ReleasedIn 1.1.5
CheckinsOnBranches Release01x01
trunkCheckins
Release01x01Checkins Foswikirev:13512 Foswikirev:13517
Topic revision: r9 - 11 Apr 2012, GeorgeClark
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License