You are here: Foswiki>Tasks Web>Item9009 (13 May 2010, GeorgeClark)Edit Attach

Item9009: TOC for alternate topic causes crash with uninitialized variables

pencil
Priority: Urgent
Current State: Closed
Released In:
Target Release: n/a
Applies To: Engine
Component: TOC
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Recreated on Foswiki Sandbox. See http://trunk.foswiki.org/Sandbox/TestAlternateTocTopic

The problem appears to be caused in Macros/TOC.pm The Meta $topicObject loaded for the alternate topic returns null string for the topic text. I've committed a unit test that exposes the problem.

Use of uninitialized value in pattern match (m//) at /usr/home/trunk.foswiki.org/core/lib/Foswiki.pm line 2656.
 at /usr/local/lib/perl5/5.8.8/CGI/Carp.pm line 314
   CGI::Carp::realdie('Use of uninitialized value in pattern match (m//) at /usr/hom...') called at /usr/local/lib/perl5/5.8.8/CGI/Carp.pm line 385
   CGI::Carp::die('Use of uninitialized value in pattern match (m//) at /usr/hom...') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki.pm line 134
   Foswiki::__ANON__('Use of uninitialized value in pattern match (m//) at /usr/hom...') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki.pm line 2656
   Foswiki::takeOutBlocks('undef', 'verbatim', 'HASH(0x238a368)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Render.pm line 2005
   Foswiki::Render::renderTOC('Foswiki::Render=HASH(0x14b3618)', 'undef', 'Foswiki::Meta=HASH(0x2505128)', 'Foswiki::Attrs=HASH(0x24df6b8)', 0) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Macros/TOC.pm line 60
   Foswiki::TOC('Foswiki=HASH(0xda37b8)', '%TOC{"System.PatternSkinCustomization"}%\x{a}\x{a}-- Main.GeorgeClark...', 'Foswiki::Meta=HASH(0x13d6038)', '"System.PatternSkinCustomization"') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki.pm line 3122
   Foswiki::expandMacros('Foswiki=HASH(0xda37b8)', '%TOC{"System.PatternSkinCustomization"}%\x{a}\x{a}-- Main.GeorgeClark...', 'Foswiki::Meta=HASH(0x13d6038)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Meta.pm line 2595
   Foswiki::Meta::expandMacros('Foswiki::Meta=HASH(0x13d6038)', '%TOC{"System.PatternSkinCustomization"}%\x{a}\x{a}-- Main.GeorgeClark...') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI/View.pm line 406
   Foswiki::UI::View::_prepare('%TOC{"System.PatternSkinCustomization"}%\x{a}\x{a}-- Main.GeorgeClark...', 'Foswiki::Meta=HASH(0x13d6038)', 0) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI/View.pm line 386
   Foswiki::UI::View::view('Foswiki=HASH(0xda37b8)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 303
   Foswiki::UI::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 415
   eval {...} called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 407
   Error::subs::try('CODE(0xd599c8)', 'HASH(0xda3498)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 411
   Foswiki::UI::_execute('Foswiki::Request=HASH(0xd59ea8)', 'CODE(0xd59a68)', 'view', 1) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 270
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0xd59ea8)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Engine/CGI.pm line 29
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x8f5ad8)') called at /home/trunk.foswiki.org/core/bin/view line 45.

-- GeorgeClark - 12 May 2010

TOC.pm reversed the Web and Topic names when calling normalizeWebTopicName - fixed.

-- GeorgeClark - 13 May 2010

 

ItemTemplate edit

Summary TOC for alternate topic causes crash with uninitialized variables
ReportedBy GeorgeClark
Codebase trunk
SVN Range 7381
AppliesTo Engine
Component TOC
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:2b6272ae4fba distro:0d4586b48d72 distro:b93c0528abb6
TargetRelease n/a
ReleasedIn
Topic revision: r5 - 13 May 2010, GeorgeClark
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