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

Item3803: %!USERINFO{format="$groups"}% crashes

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   minor 4.2.0

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


-- TWiki:Main/SvenDowideit - 23 Mar 2007

[Fri Mar 23 23:35:06 2007] [error] [client] Can't call method "webDotWikiName" on unblessed reference at /usr/lib/cgi-bin/TWiki4/lib/TWiki.pm line 3662.
[Fri Mar 23 23:35:06 2007] [error] [client]  at /usr/lib/cgi-bin/TWiki4/lib/TWiki.pm line 3662
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::_USERINFO('TWiki=HASH(0x814f6c0)', 'TWiki::Attrs=HASH(0x8bf6488)', 'SvenDowideit', 'Main') called at /usr/lib/cgi-bin/TWiki4/lib/TWiki.pm line 2461
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::_expandTagOnTopicRendering('TWiki=HASH(0x814f6c0)', 'USERINFO', 'format=" $emails, $username, $wikiname, $wikiusername, $group...', 'SvenDowideit', 'Main') called at /usr/lib/cgi-bin/TWiki4/lib/TWiki.pm line 2380
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::_processTags('TWiki=HASH(0x814f6c0)', '\\x{a}\\x{a}\\x{a}   * %USERINFO%\\x{a}   * %USERINFO{format=" $emails, $username...', 'CODE(0x8845f74)', 16, 'SvenDowideit', 'Main') called at /usr/lib/cgi-bin/TWiki4/lib/TWiki.pm line 2306
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::_expandAllTags('TWiki=HASH(0x814f6c0)', 'SCALAR(0x8b4d2d0)', 'SvenDowideit', 'Main') called at /usr/lib/cgi-bin/TWiki4/lib/TWiki.pm line 2659
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::handleCommonTags('TWiki=HASH(0x814f6c0)', '\\x{a}\\x{a}\\x{a}   * %USERINFO%\\x{a}   * %USERINFO{format=" $emails, $username...', 'Main', 'SvenDowideit', 'TWiki::Meta=HASH(0x8b307e0)') called at /usr/lib/cgi-bin/TWiki4/lib/TWiki/UI/View.pm line 375
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::UI::View::_prepare('\\x{a}\\x{a}\\x{a}   * %USERINFO%\\x{a}   * %USERINFO{format=" $emails, $username...', 'TWiki=HASH(0x814f6c0)', 'Main', 'SvenDowideit', 'TWiki::Meta=HASH(0x8b307e0)', 0) called at /usr/lib/cgi-bin/TWiki4/lib/TWiki/UI/View.pm line 359
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::UI::View::view('TWiki=HASH(0x814f6c0)') called at /usr/lib/cgi-bin/TWiki4/lib/TWiki/UI.pm line 160
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::UI::__ANON__() called at /usr/lib/cgi-bin/TWiki4/lib/CPAN/lib//Error.pm line 379
[Fri Mar 23 23:35:06 2007] [error] [client] \teval {...} called at /usr/lib/cgi-bin/TWiki4/lib/CPAN/lib//Error.pm line 371
[Fri Mar 23 23:35:06 2007] [error] [client] \tError::subs::try('CODE(0x814f5a0)', 'HASH(0x8b4cb74)') called at /usr/lib/cgi-bin/TWiki4/lib/TWiki/UI.pm line 200
[Fri Mar 23 23:35:06 2007] [error] [client] \tTWiki::UI::run('CODE(0x819cb88)', 'view', 1) called

The fix in TWiki::_USERINFO() is:

-        my @groupNames = map {$_->webDotWikiName();} $user->getGroups();
+        my @groupNames = map {$_->webDotWikiName();} @{$user->getGroups()};

Questions is, however, why the return value of TWiki::User::getGroups() has changed. This worked before. Does getGroups() need a fix? Crawford, you changed the code in that area recently.

TWiki:Main.MichaelDaum - 24 Mar 2007

@{$this->{groups}} has to be initialised to () to avoid an undef return value when the user is not in any groups.

However I think a better fix is to complete the refactoring that I started with my recent mail to you (eliminating the user objects).


Refactored in Item3838


Summary %!USERINFO{format="$groups"}% crashes
ReportedBy TWiki:Main.SvenDowideit
Codebase ~twiki4
SVN Range TWiki-4.1.2, Fri, 23 Mar 2007, build 13217
AppliesTo Engine

Priority Normal
CurrentState Closed


TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2008-01-22 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback