NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item11548: INCLUDE{warn="custom" only works for topic-missing warnings
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Normal |
Confirmed |
Engine |
INCLUDE |
|
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:
No permission to view Tasks.Item11548Hidden
--
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