• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

if you make a skin version of a tmpl, and start by including the generic version of that tmpl at the top, you never see twiki again

ie. if view.svenskin.tmpl has %TMPL:INCLUDE{"view"}%

as I'd like to create customisations to the tmpls that work for more than one skin, i'd rather this would continue down the SKIN path, without the recursion.

Index: TWiki/Templates.pm
===================================================================
--- TWiki/Templates.pm  (revision 10654)
+++ TWiki/Templates.pm  (working copy)
@@ -388,6 +388,10 @@
         my $retrieve = $candidate->{retrieve};
         my $name = $candidate->{name};
         if( &$validate( $name )) {
+            next if (defined($this->{files}->{$name}));
+            #recursion prevention.
+            $this->{files}->{$name} = 1;
+
             return &$retrieve( $name );
         }
     }

I don't see any problem caused by this change.

AC

Setting "Merge to" = patch so it will go in release notes.

-- SP

ItemTemplate
Summary Prevent infinite recursion in TMPL:INCLUDE when including generic templates
ReportedBy TWiki:Main.SvenDowideit
Codebase 4.0.0, 4.0.2, ~twiki4, 4.0.1, ~develop
SVN Range Sun, 18 Jun 2006 build 10637
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins 10674
TargetRelease patch
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2006-06-28 - SteffenPoulsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback