Tags:
create new tag
view all tags

Question

There's a problem using NatSkin / NatSKinPlugin with older TWiki versions, eg. the TWikiVMDebianStable.

When NatSkin is activated via
* Set SKIN = nat

NatSkinPlugin produces the following error:

Can't call method "loginUrl" on an undefined value 

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: DebianVM
Web server: apache
Perl version:  
Client OS:  
Web Browser:  
Categories: Plugins, Skin

-- CarloSchulz - 25 Mar 2008

Answer

to solve this issue edit twiki\lib\TWiki\Plugins\NatSkinPlugin.pm and find the following code (around line 1150):

###############################################################################
# returns the login url
sub renderLoginUrl {
  my $session = $TWiki::Plugins::SESSION;
  return '' unless $session;

  my $loginManager = $session->{loginManager} || $session->{users}->{loginManager};
  return $loginManager->loginUrl();
}

Now, you need to replace the code from above with the following patch:

###############################################################################
 # returns the login url
 sub renderLoginUrl {
   my $session = $TWiki::Plugins::SESSION;
   my $loginManager = $session->{loginManager} || # TWiki-4.2
     $session->{users}->{loginManager} || # TWiki-4.???
     $session->{client}; # TWiki-4.0
   return $loginManager->loginUrl();
 }

Refresh your browser and your TWiki should be able to use NatSkin

-- CarloSchulz - 25 Mar 2008

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.

Change status to:
Topic revision: r1 - 2008-03-25 - CarloSchulz
 
  • 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.