Topic on Project:Support desk/Flow

Summary by Nikerabbit

Fixed in latest version.

SebastianKazan (talkcontribs)

I succesfully installed the InviteSignup Extension and it works in general BUT:


-Users that have logged-in after receiving the invitation do not show up in the "Signed-Up" window of the extension


- when I set the parameter $wgISGroups in Localsettings.php to

´$wgISGroups = array( 'translator', 'sysop' );

or to any other combination of groups, I get the following error:

[7f8255b23d69b36c8679f494] /index.php?title=Special:InviteSignup ArgumentCountError from line 444 of C:\Inetpub\vhosts\xxx.de\wiki.xxx.de\includes\user\UserGroupMembership.php: Too few arguments to function UserGroupMembership::getGroupMemberName(), 1 passed in C:\Inetpub\vhosts\xxx.de\wiki.xxx.de\extensions\InviteSignup\SpecialInviteSignup.php on line 164 and exactly 2 expected

Backtrace:

#0 C:\Inetpub\vhosts\xxxde\wiki.xxx.de\extensions\InviteSignup\SpecialInviteSignup.php(164): UserGroupMembership::getGroupMemberName(string)

#1 C:\Inetpub\vhosts\xxxde\wiki.xxx.de\extensions\InviteSignup\SpecialInviteSignup.php(90): SpecialInviteSignup->getAddRow()

#2 C:\Inetpub\vhosts\xxx.de\wiki.xxxde\includes\specialpage\SpecialPage.php(569): SpecialInviteSignup->execute(NULL)

#3 C:\Inetpub\vhosts\xxx.de\wiki.xxx.de\includes\specialpage\SpecialPageFactory.php(568): SpecialPage->run(NULL)

#4 C:\Inetpub\vhosts\xxx.de\wiki.xxx.de\includes\MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#5 C:\Inetpub\vhosts\xxx.de\wiki.xxx.de\includes\MediaWiki.php(860): MediaWiki->performRequest()

#6 C:\Inetpub\vhosts\xxx.de\wiki.xxx.de\includes\MediaWiki.php(517): MediaWiki->main()

#7 C:\Inetpub\vhosts\xxx.de\wiki.xxx.de\index.php(42): MediaWiki->run()

#8 {main}



in line 164 of SpecialInviteSignup.php I find the following:


   $groupChecks = [];

       foreach ( $this->groups as $group ) {

           $groupChecks[] = Xml::checkLabel(

               UserGroupMembership::getGroupMemberName( $group ),

               "group-$group",

               "group-$group"

           );

       }


And in line 444 of includes\user\UserGroupMembership.php I find:


   public static function getGroupMemberName( $group, $username ) {

       $msg = wfMessage( "group-$group-member", $username );

       return $msg->isBlank() ? $group : $msg->text();

   }



MarkAHershberger (talkcontribs)

So obviously the problem comes because the $username variable isn't set in the calls (there are two of them) from SpecialInviteSignup.php.

The username parameter is used to determine the gender to use in the group message.

I've filed a bug and provided a patch. Please try it and let me know if it works.

SebastianKazan (talkcontribs)

Hello Mark,


thank you very much! The error message dissapears and the group names appear. I can also check them. However, the users are not actually assigned to any group.


I can see the group rights in the "user group rights" list (so they do exist) but the invitees are not assigned to them. Also, when signed-in, there is no indication of it in the table under "signed-up".


The button delete: is it supposed to invalidate the invitation link? At the moment it only deletes the line in the table.


I get another error when actually signing-up on the registration page:


Deprecated: Use of UserCreateForm hook (used in InviteSignupHooks:: onUserCreateForm) was deprecated in Wiki 1.27. [Called from Hooks::run in C:\ABC.wiki.de\includes\Hooks.php at line 202] in C:...\include\debug\MWDebug.php on line 309.


Hooks.php line 202:


   public static function run( $event, array $args = [], $deprecatedVersion = null ) {

       foreach ( self::getHandlers( $event ) as $hook ) {

           $retval = self::callHook( $event, $hook, $args, $deprecatedVersion );

           if ( $retval === null ) {

               continue;

           }


MWDebug.php line 309:


   private static function sendMessage( $msg, $caller, $group, $level ) {

       $msg .= ' [Called from ' . $caller['func'] . ' in ' . $caller['file'] . ']';

       if ( $level !== false ) {

           trigger_error( $msg, $level );

       }

       wfDebugLog( $group, $msg, 'private' );

   }

MarkAHershberger (talkcontribs)

A deprecation is not an error, but a warning. For everything else, I think you need to create some tasks for the extension in Phabricator so people know what to work on in this extension.

SebastianKazan (talkcontribs)
MarkAHershberger (talkcontribs)
Nikerabbit (talkcontribs)

This issue is now fixed in the latest version.