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
--
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
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.