Item14355: Missing Attachment template expects too many params

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: NatSkin
Branches: master
Reported By: PeterFarmer
Waiting For:
Last Change By: MichaelDaum
The TMPL:DEF macro for no_such_attachment in message.nat.tmpl expects 2 parameters when only one appears to be supplied (in Foswiki 2.1.2) . The resulting misformed error page can be created by manually invoking a non-existent attachment url e.g. http://my.wiki.site/foswiki/pub/Sandbox/MyTopic/missingAttachment.jpg

%TMPL:DEF{"no_such_attachment"}% <!-- removed contact -->
---++ %MAKETEXT{"Attachment '[_1]' does not exist" args="%PARAM2%"}%
%MAKETEXT{"You are trying to [_1] an attachment that does not exist." args="%PARAM1%"}%
%TMPL:END%

Can I suggest that the correct markup is as below :

%TMPL:DEF{"no_such_attachment"}% <!-- removed contact -->
---++ %MAKETEXT{"Attachment '[_1]' does not exist" args="%PARAM1%"}%
%MAKETEXT{"You are trying to access an attachment that does not exist." }%
%TMPL:END%

-- PeterFarmer - 27 Mar 2017

Fixed in latest release

-- MichaelDaum - 12 Feb 2019
 

ItemTemplate edit

Summary Missing Attachment template expects too many params
ReportedBy PeterFarmer
Codebase 2.1.2
SVN Range
AppliesTo Extension
Component NatSkin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins SafeWikiPlugin:83e77b2d170b
ReleasedIn n/a
CheckinsOnBranches master
trunkCheckins
masterCheckins SafeWikiPlugin:83e77b2d170b
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r4 - 12 Feb 2019, MichaelDaum
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