Bug: Recursive includes seems to be broken
I had to apply following patch to fix them:
Index: TWiki.pm
===================================================================
RCS file: /var/cvs/iponweb/twiki-full/lib/TWiki.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TWiki.pm 2003/02/26 14:53:20 1.3
+++ TWiki.pm 2003/04/08 15:10:14 1.4
@@ -1412,7 +1412,7 @@
# FIXME What about attachments?
# recursively process multiple embedded %INCLUDE% statements and prefs
- $text =~ s/%INCLUDE{(.*?)}%/&handleIncludeFile($1, $theTopic, $theWeb, @theProcessedTopics )/ge;
+ $text =~ s/%INCLUDE{(.*?)}%/&handleIncludeFile($1, $theTopic, $theWeb, $verbatim, @theProcessedTopics )/ge;
return $text;
}
Without this patch I get
Can't use string ("/SOME/PATH") as an ARRAY ref
while "strict refs" in use at ../lib/TWiki.pm line 1881.
error.
Note that the line number probably doesn't match sources in released version as we did some modifications
in our installation of TWiki. This line corresponds to line
my $verbatimCount = $#{$verbatim} + 1;
from TWiki::takeOutVerbatim().
Test case
Environment
| TWiki version: |
TWiki20030201 with some local modifications |
| TWiki plugins: |
N/A |
| Server OS: |
Linux Debian |
| Web server: |
Apache 1.3.9 |
| Perl version: |
5.6.1 |
| Client OS: |
Any |
| Web Browser: |
Any |
--
IlyaMartynov - 08 Apr 2003
Follow up
This is indeed a bug. (but error message does not show up on TWiki.org)
--
PeterThoeny - 09 Apr 2003
Fix record
As usual, I have packaged your patch as a ready-to-apply patch.
Peter, what would be nice would be a page listing all the "maintenance patches" to apply to
the stable versions in operations, for people not wanting to risk damaging a working TWiki
in production (and not wanting to spend the amount of work necessary to do a version upgrade)?
--
ColasNahaboo - 09 Apr 2003
Fix is now in
TWikiAlphaRelease and at TWiki.org.
Listing maintenance patches: Yes, that makes sense as part of the
WebFormReorg, possibly with a new
MaintenancePatchFor form field listing all production releases.
BTW, the patch has one extra comma that should go away.
--
PeterThoeny - 11 Apr 2003
Oops, sorry. Fixed and re-uploaded as v2
--
ColasNahaboo - 12 Apr 2003