• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3602: TemplateLogin problem with upgrade to 4.1.1

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine TemplateLogin Normal No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Yesterday (Fri 9 Feb 2007) I downoaded the Twiki-4.1.1 (TWiki-4.1.1, Mon, 05 Feb 2007, build 12770) and merged in my site's settings and application web.

All is fine until I come to protected pages or try to log in on an unprotected page.
It then throws an error.

URL of the form:
http://www.sitename.com/bin/login/TWiki/WebHome?origurl=/bin/view/TWiki/WebHome

The error in the browser reads:

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

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

The log file reads


| 10 Feb 2007 - 06:50 | Can't call method "login" on an undefined value at login line 37.
        main::logon('TWiki=HASH(0x814cad4)') called at /home/antonaylward/TWiki//lib/TWiki/UI.pm line 157
        TWiki::UI::__ANON__() called at /home/antonaylward/lib/CPAN/lib//Error.pm line 379
        eval {...} called at /home/antonaylward/TWiki/lib/CPAN/lib//Error.pm line 371
        Error::subs::try('CODE(0x814ccc0)', 'HASH(0x9087900)') called at /home/antonaylward/TWiki/lib/TWiki/UI.pm line 197
        TWiki::UI::run('CODE(0x81604d0)') called

The code fragment is an exception capture.

I had previously run bin/configure and set up for TemplateLogin

I'm not seeing other errors in the logs.

-- TWiki:Main/AntonAylward - 10 Feb 2007

I have just tried template login and it works fine with 4.1.1.

Any other special things round your TWiki?

Do you have a /tmp/twiki directory?

Kenneth

-- TWiki:Main.KennethLavrsen - 10 Feb 2007

Yes U have the TWIKIBASE/tmp/twiki direcotry.

As for "special" ... ? What might be "special"?

I had this working under 4.0.0 and ran the new config and followed the changes for install .... Give me a clue?

The error is saying that a method is not found, but all the code is in place, the new /bin and all of the new .pm under /lib

-- TWiki:Main.AntonAylward - 11 Feb 2007

Check permissions, and check the apache log

-- TWiki:Main.CrawfordCurrie - 12 Feb 2007

The Apache logs read:


[Mon Feb 12 13:34:10 2007] [error] [client 65.217.37.201] Can't call method "login" on an undefined value at login line 37.
[Mon Feb 12 13:34:10 2007] [error] [client 65.217.37.201] \tmain::logon('TWiki=HASH(0x814cad4)') called at /home//home/antonaylward/lib/TWiki/UI.pm line 157
[Mon Feb 12 13:34:10 2007] [error] [client 65.217.37.201] \tTWiki::UI::__ANON__() called at /home/antonaylward/lib/CPAN/lib//Error.pm line 379
[Mon Feb 12 13:34:10 2007] [error] [client 65.217.37.201] \teval {...} called at /home/antonaylward/lib/CPAN/lib//Error.pm line 371
[Mon Feb 12 13:34:10 2007] [error] [client 65.217.37.201] \tError::subs::try('CODE(0x814ccc0)', 'HASH(0x833e108)') called at /home/antonaylward/lib/TWiki/UI.pm line 197
[Mon Feb 12 13:34:10 2007] [error] [client 65.217.37.201] \tTWiki::UI::run('CODE(0x8160664)') called

and the TWiki logs read | 12 Feb 2007 - 13:34 | Can't call method "login" on an undefined value at login line 37. main::logon('TWiki=HASH(0x814cad4)') called at /home/antonaylward/lib/TWiki/UI.pm line 157 TWiki::UI::__ANON__() called at /home/antonaylward/lib/CPAN/lib//Error.pm line 379 eval {...} called at /home/.jordana/antonaylward/InfoSecWiki.com/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x814ccc0)', 'HASH(0x833e108)') called at /home/antonaylward/lib/TWiki/UI.pm line 197 TWiki::UI::run('CODE(0x8160664)') called

The code fragment is:


    151     my $session = new TWiki( $user, $query, \%initialContext );
    152
    153     local $SIG{__DIE__} = \&Carp::confess;
    154
    155     try {
    156         $session->{loginManager}->checkAccess();
    157         &$method( $session );
    158     } catch TWiki::AccessControlException with {
....
....
    177     } catch Error::Simple with {
    178         my $e = shift;
    179         print "Content-type: text/plain\n\n";
    180         if( DEBUG ) {
    181             # output the full message and stacktrace to the browser
    182             print $e->stringify();
    183         } else {
    184             my $mess = $e->stringify();
    185             print STDERR $mess;
    186             $session->writeWarning( $mess );
    187             # tell the browser where to look for more help
    188             print 'TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.'."\n\n";
    189             $mess =~ s/ at .*$//s;
    190             # cut out pathnames from public announcement
    191             $mess =~ s#/[\w./]+#path#g;
    192             print $mess;
    193         }
    194     } otherwise {
    195         print "Content-type: text/plain\n\n";
    196         print "Unspecified error";
    197     };

And on the screen, of course, I get

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

Can't call method "login" on an undefined value
so we know where the error was caught.

As far as I can make out, what its saying is that the line

 157         &$method( $session );
isn't getting to see a setiiing for $session that is meaningful.

I can't see why. I'm not that "up" on OO-perl :-/

-- TWiki:Main.AntonAylward - 12 Feb 2007

I never did find the root cause, but what I did was a complete svn up on my home machine, extracted the bin/ and the lib/ by hand, and FTP'd them to the target machine.

It seem there was some oddity in the particular day's pacakging.

From not on I'll ignore the pakage and build my own. smile

-- TWiki:Main.AntonAylward - 13 Feb 2007

ItemTemplate
Summary TemplateLogin problem with upgrade to 4.1.1
ReportedBy TWiki:Main.AntonAylward
Codebase 4.1.1
SVN Range TWiki-4.1.1, Fri, 09 Feb 2007, build 12770
AppliesTo Engine
Component TemplateLogin
Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2007-02-13 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback