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

Item6655: 5.x compatibility problem

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension WebPermissionsPlugin Normal Closed   n/a  

Edit Form Data

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


Symptoms and impact

As noted at the http://twiki.org/cgi-bin/view/Support/SID-00922 there is an issue with displaying the plugin page in the TWiki 5.0.0 and 5.0.1. The following error comes instead of the plugin page:

[error] [client xxxx] Can't call method "param" on an undefined value at /var/www/newise/twiki/lib/TWiki/Plugins/WebPermissionsPlugin/Core.pm line 43., referer: https://xxxxxxxxxxxxx/twiki/bin/view/TWiki/InstalledPlugins

As the result the plugin page is unavailable in the Wiki. The basic plugin functionality seems to be unaffected.


The problematic code in plugin Core.pm is:

41     my( $session, $params, $topic, $web ) = @_;
42     my $query = $session->{cgiQuery};
43     my $action = $query->param( 'web_permissions_action' );

The 5.x changed the public fields of the TWiki class. As a result there is no longer a field called 'cgiQuery'.This causes the error in line 43, as the $query variable is undefined because of that change.

The relevant field is now called 'request'.


Proposed fix is to change line 42 to:

42     my $query = $session->{request};

After the fix, the page shows up correctly.

-- TWiki:Main.SzymonSobczyk - 2011-03-06

Thank you Szymon for providing a proposed fix. I updated the plugin as follows to make it compatible with TWiki-5.0 as well as earlier releases:

my $query = $session->{request}; || $session->{cgiQuery};

-- TWiki:Main.PeterThoeny - 2011-03-07

I did additional fixes:

  • XHTML fixes
  • Placing checkboxes before checkbox label to be compliant with web standards
  • Better images for VIEW.gif VIEW.gif and CHANGE.gif CHANGE.gif

-- TWiki:Main.PeterThoeny - 2011-03-07

Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r17 - 2011-03-08 - SzymonSobczyk
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback