Item11548: INCLUDE{warn="custom"} only works for topic-missing warnings.
Priority: Normal
Current State: Closed
Released In: 2.1.3
Target Release: patch
TemiV identified an important bug. It seems custom error messages via
VarINCLUDE's
warn
parameter is only supported on topic missing errors.
Access denied, for example, always shows the foswikiAlert, ignoring the custom
warn
.
Example:
%STARTSECTION{"code"}%%INCLUDE{
"%TOPIC%Hidden"
warn="Self-denial is a virtue"
}%%ENDSECTION{"code"}%
Test:
Self-denial is a virtue
--
PaulHarvey - 22 Feb 2012
Item11548Hidden
--
PaulHarvey - 22 Feb 2012
In addition, this task should also fix it so that
warn
uses
Foswiki::Func::decodeFormatTokens()
--
PaulHarvey - 22 Feb 2012
I'm currently running with this ugly hack
diff --git a/lib/Foswiki/Macros/INCLUDE.pm b/lib/Foswiki/Macros/INCLUDE.pm
index e0c068d..14ba97d 100644
--- a/lib/Foswiki/Macros/INCLUDE.pm
+++ b/lib/Foswiki/Macros/INCLUDE.pm
@@ -98,7 +98,7 @@ sub _includeWarning {
# different inlineAlerts need different argument counts
my $argument = '';
- if ( $message eq 'topic_not_found' ) {
+ if ( $message eq 'topic_not_found' or $message eq 'access_denied' ) {
my ( $web, $topic ) = @_;
$argument = "$web.$topic";
}
--
PaulHarvey - 27 Mar 2012