Item841: the warning parameter if ignored for Sectional INCLUDEs
Priority: Urgent
Current State: Closed
Released In: 1.0.1
Target Release: patch
Applies To: Engine
Component:
Branches:
which kills their use for fallbacks in apps
topic not there
warning
TopicNotThere not found
section not there
warning $section in Tasks not found
neither setion nor topic there
warning,
TopicNotThere not found, so can't look for $section
sven@t42p:/data/trunk/core$ svn diff lib/Foswiki.pm templates/messages.tmpl
Index: lib/Foswiki.pm
===================================================================
--- lib/Foswiki.pm (revision 2129)
+++ lib/Foswiki.pm (working copy)
@@ -3484,6 +3484,11 @@
}
}
+ if ( $interesting and (length($text) eq 0) ) {
+ return _includeWarning( $this, $control{warn}, 'topic_section_not_found',
+ $includedWeb, $includedTopic, $control{section} );
+ }
+
# If there were no interesting sections, restore the whole text
$text = $ntext unless $interesting;
Index: templates/messages.tmpl
===================================================================
--- templates/messages.tmpl (revision 2129)
+++ templates/messages.tmpl (working copy)
@@ -455,6 +455,7 @@
%TMPL:DEF{"bad_protocol"}% %MAKETEXT{"Error: Unsupported protocol. (Must be 'http://domain/...')"}% %TMPL:END%
%TMPL:DEF{"bad_content"}% %MAKETEXT{"Error: Unsupported content type: [_1] (Must be =text/html=, =text/plain= or =text/css=)" args="%PARAM1%"}% %TMPL:END%
%TMPL:DEF{"topic_not_found"}% %MAKETEXT{"Warning: Can't find topic [_1].[_2]" args="<nop>%PARAM1%, <nop>%PARAM2%"}% %TMPL:END%
+%TMPL:DEF{"topic_section_not_found"}% %MAKETEXT{"Warning: Can't find named section [_3] in topic [_1].[_2]" args="<nop>%PARAM1%, <nop>%PARAM2%, <nop>%PARAM3%"}% %TMPL:END%
%TMPL:DEF{"already_included"}% %MAKETEXT{"Warning: Can't INCLUDE [_1] repeatedly, topic is already included. [_2]" args="<nop>%PARAM1%, %PARAM2%"}% %TMPL:END%
%TMPL:DEF{"bad_include_path"}% %MAKETEXT{"Warning: Can't INCLUDE '[_1]', path is empty or contains illegal characters." args="<nop>%PARAM1%"}% %TMPL:END%
%TMPL:DEF{"generic"}% %PARAM1% %PARAM2% %PARAM3% %PARAM4% %TMPL:END%
which also inspired
Item844
--
SvenDowideit - 23 Jan 2009