Item14355: Missing Attachment template expects too many params
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: NatSkin
Branches: master
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