Item11386: Upgrades to 1.1.x don't get the OP_match
operator added to query search. Breaks attachments table.
Priority: Urgent
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Engine
Component: Configure
Branches: Release01x01
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