Item11546: Cant locate object method "TopicObject", in Foswiki/Prefs.pm line 311.

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.7
Target Release: patch
Applies To: Engine
Component:
Branches: Release01x01 trunk
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Certain Web/Topic configurations appear to break Prefs::HASH as called by WorkflowPlugin.

  • Create a "Template" web beneath a real web. (ie. cp -a _default Sandbox/. )
  • Attempt to view the topic. =bin/view/Sandbox/_default/WebHome

With WorkflowPlugin enabled, Foswiki crashes in Frefs.pm. With WorkflowPlugin disabled, Foswiki issues an "oops". Access Denied - Attention - The "(Missing or illegal web)" web does not exist

Not sure if this is a bug in the Prefs that WorkflowPlugin exposes, or a bug in the plugin itself.

Can't locate object method "topicObject" via package "Foswiki::Prefs::HASH" at /var/www/foswiki/trunk/core/lib/Foswiki/Prefs.pm line 311.
 at /var/www/foswiki/trunk/core/lib/Foswiki/Prefs.pm line 311
   Foswiki::Prefs::popTopicContext('Foswiki::Prefs=HASH(0x8560808)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Func.pm line 505
   Foswiki::Func::popTopicContext('System', 'WebBottomBarExample') called at /var/www/foswiki/trunk/core/lib/Foswiki/Plugins/WorkflowPlugin.pm line 94
   Foswiki::Plugins::WorkflowPlugin::_initTOPIC('System', 'WebBottomBarExample') called at /var/www/foswiki/trunk/core/lib/Foswiki/Plugins/WorkflowPlugin.pm line 517
   Foswiki::Plugins::WorkflowPlugin::commonTagsHandler('<span class="foswikiRight"> <a href="http://foswiki.org/"><im...', 'WebBottomBarExample', 'System', 1, 'Foswiki::Meta=HASH(0x8bd31c0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Plugin.pm line 288
   Foswiki::Plugin::invoke('Foswiki::Plugin=HASH(0x89a2240)', 'commonTagsHandler', '<span class="foswikiRight"> <a href="http://foswiki.org/"><im...', 'WebBottomBarExample', 'System', 1, 'Foswiki::Meta=HASH(0x8bd31c0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Plugins.pm line 340
   Foswiki::Plugins::dispatch('Foswiki::Plugins=HASH(0x8560838)', 'commonTagsHandler', '<span class="foswikiRight"> <a href="http://foswiki.org/"><im...', 'WebBottomBarExample', 'System', 1, 'Foswiki::Meta=HASH(0x8bd31c0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Macros/INCLUDE.pm line 299
   Foswiki::__ANON__() called at /usr/lib/perl5/vendor_perl/5.12.2/Error.pm line 415
   eval {...} called at /usr/lib/perl5/vendor_perl/5.12.2/Error.pm line 407
   Error::subs::try('CODE(0x8af6710)', 'HASH(0x8bd3670)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Macros/INCLUDE.pm line 343
   Foswiki::INCLUDE('Foswiki=HASH(0x8514ed0)', 'Foswiki::Attrs=HASH(0x8af66f0)', 'Foswiki::Meta=HASH(0x8a9faf8)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 3107
   Foswiki::_expandMacroOnTopicRendering('Foswiki=HASH(0x8514ed0)', 'INCLUDE', '"System.WebBottomBarExample"', 'Foswiki::Meta=HASH(0x8a9faf8)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2983
   Foswiki::_processMacros('Foswiki=HASH(0x8514ed0)', '%INCLUDE{"System.WebBottomBarExample"}%', 'CODE(0x84c5fc8)', 'Foswiki::Meta=HASH(0x8a9faf8)', 15) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 3001
   Foswiki::_processMacros('Foswiki=HASH(0x8514ed0)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...', 'CODE(0x84c5fc8)', 'Foswiki::Meta=HASH(0x8a9faf8)', 16) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2780
   Foswiki::innerExpandMacros('Foswiki=HASH(0x8514ed0)', 'SCALAR(0x8321350)', 'Foswiki::Meta=HASH(0x8a9faf8)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 3289
   Foswiki::expandMacros('Foswiki=HASH(0x8514ed0)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...', 'Foswiki::Meta=HASH(0x8a9faf8)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Meta.pm line 3142
   Foswiki::Meta::expandMacros('Foswiki::Meta=HASH(0x8a9faf8)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI/Oops.pm line 124
   Foswiki::UI::Oops::oops('Foswiki=HASH(0x8514ed0)', '', 'WebPreferences', 'Foswiki::Request=HASH(0x8488800)', 0) called at /var/www/foswiki/trunk/core/lib/Foswiki/OopsException.pm line 222
   Foswiki::OopsException::generate('Foswiki::OopsException=HASH(0x8a91f48)', 'Foswiki=HASH(0x8514ed0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 379
   Foswiki::UI::__ANON__('Foswiki::OopsException=HASH(0x8a91f48)', 'SCALAR(0x81247d8)') called at /usr/lib/perl5/vendor_perl/5.12.2/Error.pm line 339
   eval {...} called at /usr/lib/perl5/vendor_perl/5.12.2/Error.pm line 329
   Error::subs::run_clauses('HASH(0x8514bf0)', 'Foswiki::OopsException=HASH(0x8a91f48)', undef, 'ARRAY(0x8124bb8)') called at /usr/lib/perl5/vendor_perl/5.12.2/Error.pm line 426
   Error::subs::try('CODE(0x804e338)', 'HASH(0x8514bf0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 435
   Foswiki::UI::_execute('Foswiki::Request=HASH(0x8488800)', 'CODE(0x84ffb70)', 'view', 1) called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 274
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x8488800)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Engine/CGI.pm line 41
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x81e51c8)') called at view line 24.

This was also reported in Support.Question749 - http://paste.ubuntu.com/550550/

-- GeorgeClark - 21 Feb 2012

This happens if you have an invalid WebName (must start with capital letter), because the pushTopicContext / popTopicContext combo will fail.

You can insert a "return undef unless Foswiki::Func::isValidWebName( $web );" before line 95 in WorkflowPlugin.pm to disable the workflow in such webs.

-- StephanOsthold - 03 Apr 2012

Michael, Crawford. Can you review the suggested fix? I don't do much with WorkflowPlugin.

-- GeorgeClark - 24 Oct 2012

it was treating the symptoms, and not the cause. The cause was a lot more complex and involved.

-- CrawfordCurrie - 18 Dec 2012

 

ItemTemplate edit

Summary Cant locate object method "TopicObject", in Foswiki/Prefs.pm line 311.
ReportedBy GeorgeClark
Codebase 1.1.4, 1.1.2, trunk
SVN Range
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:aa973aa9e88f distro:fab80eea36f5
TargetRelease patch
ReleasedIn 1.1.7
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:fab80eea36f5
Release01x01Checkins distro:aa973aa9e88f
Topic revision: r8 - 01 Feb 2013, 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