Tags:
create new tag
, view all tags

Question

Hi,

I had a problem performing save due to an error saying "Can't call method 'Get' on an undefined value". My TWiki-Version is TWiki-4.2.0, Tue, 22 Jan 2008, build 16278. Suddenly the error occured after we were able to create about 45 topics without problems. The problem only occured when I tried to create new topic using my TWikiForm and the generation of unique topic names using TopicXXXXXXXXXX. Creating a simple topic and saving it worked without problems. Restarting the apache does not help.

I modified the Save.pm a little and the error does not occur any more. My question is, whether my modification is allright.

Here is what I've done: In the apache - error log I saw that the error was raised in Save.pm in line 257:

[Mon Aug 04 08:41:57 2008] [error] [client 10.129.43.88] Can't call method "get" on an undefined value at /srv/www/htdocs/twiki/lib/TWiki/UI/Save.pm line 257., referer: http://borgsapp01.hg.fresenius.de/twiki /bin/edit.pl

The original line 257 in Save.pm:

my $pti = $prevMeta->get( 'TOPICINFO' );

It seemed that $prevMeta is not defined. So to fix it, I added for following code (see lines below #JR 04.08.2008...).

Line 257 in Save.pm after modification:

#JR 04.08.2008: Added check if $prevMeta is defined. Otherwise error message "Can't call method "get" on an undefined value" occurs

if ( $prevMeta ) {

    my $pti = $prevMeta->get( 'TOPICINFO' ); ...

    ...

    if( $formDef && $prevMeta ) { $newMeta->merge( $prevMeta, $formDef ); }

    $merged = [ $orev, $author, $rev||1 ];

#JR 04.08.2008: End of modification

}

Environment

TWiki version: TWiki Release 4.2.0
TWiki plugins: CommentPlugin, EmptyPlugin, EditTablePlugin, InterwikiPlugin, PreferencesPlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, SpreadSheetPlugin, TablePlugin, TinyMCEPlugin, TwistyPlugin, WysiwygPlugin
Server OS: SuSE SLES 9.2 [configure.pl: Linux 2.6.5 (i586-linux-thread-multi)]
Web server: Apache 2.0.49 (Linux/SuSE)
Perl version: 5.008003
Client OS: Windows XP
Web Browser: IE 6
Categories: Version Control, Forms, Fatal Error

-- TWikiGuest - 04 Aug 2008

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.

Thanks, probably best tracked as a bug item.

-- PeterThoeny - 06 Nov 2008

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-11-06 - 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.