Tags:
create new tag
view all tags

Question

I have a topic (Main.WebHome) that generates a nastygram when I click the "History" link. The message reads "Undefined subroutine &TWiki::handleIncludeFile called".

The site is using a slightly modified version of PatternSkin, in case this might be relevant.

Looking in /var/log/httpd/*, I found messages in error_log:

error_log:[Wed Dec 20 12:09:14 2006] [error] [client 1.2.3.4] Undefined subroutine &TWiki::handleIncludeFile called at /www/twiki-4.0.5/lib/TWiki/Plugins/DefaultPlugin.pm line 150., referer: http://my.decru.com/bin/view/Main

The code in question is in the commonTagsHandler subroutine:

... # This is the place to define customized tags and variables # Called by TWiki::handleCommonTags, after %INCLUDE:"..."%

# for compatibility for earlier TWiki versions: if( $doOldInclude ) { # allow two level includes $_[0] =~ s/%INCLUDE:"([^%\"]*?)"%/TWiki::handleIncludeFile( $1, $_[1], $_[2], "" )/geo; <<< $_[0] =~ s/%INCLUDE:"([^%\"]*?)"%/TWiki::handleIncludeFile( $1, $_[1], $_[2], "" )/geo; } ...

Grepping for handleIncludeFile in /lib/TWiki/Plugins only found the lines given above. My suspicion is that this is an obscure TWiki bug which we have (somehow) exercised by using INCLUDE files. Given that we aren't running an "earlier TWiki version", I decided to simply turn off this "feature".

$doOldInclude is set (in DefaultPlugin.pm) by:

$doOldInclude = TWiki::Func::getPluginPreferencesFlag( "OLDINCLUDE" ) || "";

Looking around in the TWiki, I saw that TWiki.DefaultPlugin was setting OLDINCLUDE:

Set OLDINCLUDE = 1

So, I added the line:

Set OLDINCLUDE = 0

and the problem went away. Given that the flag was causing a non-existent function to be called, I can't imagine that this change will hurt anything.

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultSpreadSheetPlugin,BugzillaLinkPlugin,BugzillaQueryPlugin,CommentPlugin,DefaultPlugin,EditTablePlugin,ExcelImportExportPlugin,HolidaylistPlugin,InterwikiPlugin,PreferencesPlugin,RenderListPlugin,SlashFilenamePlugin,SlideShowPlugin,SmiliesPlugin,TablePlugin,ThreadedDiscussionPlugin
Server OS: Linux, kernel 2.6.9-42.ELsmp
Web server: Apache
Perl version: v5.8.8
Client OS: Mac OS X 10.4.8
Web Browser: Firefox 2.0
Categories: Fatal error

-- RichMorin - 20 Dec 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

You might have a version mismatch between DefaultPlugin and TWiki. Disable the plugin if you do not need it. In any case it is unlikely that you need the OLDINCLUDE, this is from a very ancient TWiki.

-- PeterThoeny - 24 Dec 2006

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2006-12-24 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.