Page MenuHomePhabricator

Group membership log messages sometimes miss new membership status
Closed, ResolvedPublic

Description

Hello,

Please have a look, for example, at https://meta.wikimedia.org/w/index.php?title=Special%3ALog&type=rights&user=&page=User%3A%D7%93%D7%95%D7%A8%D7%99%D7%AA%40hewiki&year=&month=-1&tagfilter=.

10:41, 16 November 2012 Matanya (talk | contribs | block) changed group membership for User:דורית@hewiki from bureaucrat and administrator to [missing new status of the user] (reason).

Also other example: https://meta.wikimedia.org/w/index.php?title=Special%3ALog&type=rights&user=&page=User%3AVituzzu%40itwiki&year=&month=-1&tagfilter=

22:16, 14 November 2012 Vituzzu (talk | contribs | block) changed group membership for User:Vituzzu@itwiki from bureaucrat, flooder and administrator to bureaucrat and [?? missing] (fatto)

Userrights log messages are not completing for unknown reasons, leaving those messages incomplete thus not allowing to know which rights have changed.

Thanks. Regards.


Version: unspecified
Severity: normal

Details

Reference
bz42211

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:12 AM
bzimport set Reference to bz42211.

Appears to be to do with RightsLogFormatter::getMessageParameters, Language::listToText, and $newGroups array keys not starting at 0 on some entries. Moving to MediaWiki product.

This hack fixes it for me:
diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php
index 8c1e294..26368b4 100644

  • a/includes/logging/LogFormatter.php

+++ b/includes/logging/LogFormatter.php
@@ -1108,7 +1108,7 @@ class RightsLogFormatter extends LogFormatter {

        $params[3] = $this->msg( 'rightsnone' )->text();
}
if ( count( $newGroups ) ) {
  • $params[4] = $lang->listToText( $newGroups );

+ $params[4] = $lang->listToText( array_values( $newGroups ) );

} else {
        $params[4] = $this->msg( 'rightsnone' )->text();
}

Changed summary, as it's happening too on commons.wikimedia.org:

https://commons.wikimedia.org/w/index.php?title=Special%3ALog&type=rights&user=Trijnstel&page=User%3AShinePhantom&year=&month=-1&tagfilter=

22:42, 14 November 2012 Trijnstel (talk | contribs | block) changed group membership for User:ShinePhantom from OTRS member, autopatroller and file mover to OTRS member and [missing](OTRS members are already autopatrolled).

Regards.

  • Bug 42411 has been marked as a duplicate of this bug. ***
  • Bug 42418 has been marked as a duplicate of this bug. ***
  • Bug 43538 has been marked as a duplicate of this bug. ***

I see this "Resolved - Fixed" and "Merged" in comment 7 but the problem still happens. Is the code working in the server or awaiting commit?

From meta rights' log:

  • 11:05, 31 December 2012 Vituzzu (talk | contribs) changed group membership for User:Vituzzu@itwiktionary from CheckUser and patroller to (done)

Thanks (& happy new year)

It's fixed, but WMF haven't updated their version of the software to include the patch yet.