You are here: Foswiki>Tasks Web>Item841 (23 Feb 2009, KennethLavrsen)Edit Attach

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
Reported By: SvenDowideit
Waiting For:
Last Change By: KennethLavrsen
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/ templates/messages.tmpl
Index: lib/
--- lib/   (revision 2129)
+++ lib/   (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

ItemTemplate edit

Summary the warning parameter if ignored for Sectional INCLUDEs
ReportedBy SvenDowideit
Codebase 1.0.0
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Priority Urgent
CurrentState Closed
Checkins distro:4799e6cba5f8
TargetRelease patch
ReleasedIn 1.0.1
Topic revision: r3 - 23 Feb 2009, KennethLavrsen - This page was cached on 16 Jan 2020 - 14:53.

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