You are here: Foswiki>Tasks Web>Item11386 (11 Apr 2012, GeorgeClark)Edit Attach

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

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Engine
Component: Configure
Branches: Release01x01
Reported By: PadraigLennon
Waiting For:
Last Change By: GeorgeClark
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 distro:6b64e63b1dc8 distro:e25c17a7887a
TargetRelease patch
ReleasedIn 1.1.5
CheckinsOnBranches Release01x01
trunkCheckins
Release01x01Checkins distro:6b64e63b1dc8 distro:e25c17a7887a
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 Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy