Page MenuHomePhabricator

Internal error on changing user's global rights (CentralAuthGroupMembershipProxy::getWikiId() undefined)
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

[YnGcCQIbWuc35AFJerq3ogAAAAw] /wiki/Special:GlobalUserRights Error: Call to undefined method MediaWiki\Extension\CentralAuth\User\CentralAuthGroupMembershipProxy::getWikiId()

Backtrace:

from /srv/mediawiki/php-master/extensions/Echo/includes/Hooks.php(753)
#0 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(338): MediaWiki\Extension\Notifications\Hooks::onUserGroupsChanged(MediaWiki\Extension\CentralAuth\User\CentralAuthGroupMembershipProxy, array, array, User, string, array, array)
#1 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#2 /srv/mediawiki/php-master/includes/HookContainer/HookRunner.php(4171): MediaWiki\HookContainer\HookContainer->run(string, array)
#3 /srv/mediawiki/php-master/extensions/CentralAuth/includes/Special/SpecialGlobalGroupMembership.php(398): MediaWiki\HookContainer\HookRunner->onUserGroupsChanged(MediaWiki\Extension\CentralAuth\User\CentralAuthGroupMembershipProxy, array, array, User, string, array, array)
#4 /srv/mediawiki/php-master/extensions/CentralAuth/includes/Special/SpecialGlobalGroupMembership.php(318): MediaWiki\Extension\CentralAuth\Special\SpecialGlobalGroupMembership->doSaveUserGroups(MediaWiki\Extension\CentralAuth\User\CentralAuthGroupMembershipProxy, array, array, string, array, array)
#5 /srv/mediawiki/php-master/extensions/CentralAuth/includes/Special/SpecialGlobalGroupMembership.php(228): MediaWiki\Extension\CentralAuth\Special\SpecialGlobalGroupMembership->saveUserGroups(string, string, MediaWiki\Extension\CentralAuth\User\CentralAuthGroupMembershipProxy)
#6 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(688): MediaWiki\Extension\CentralAuth\Special\SpecialGlobalGroupMembership->execute(NULL)
#7 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(1409): SpecialPage->run(NULL)
#8 /srv/mediawiki/php-master/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#9 /srv/mediawiki/php-master/includes/MediaWiki.php(912): MediaWiki->performRequest()
#10 /srv/mediawiki/php-master/includes/MediaWiki.php(566): MediaWiki->main()
#11 /srv/mediawiki/php-master/index.php(50): MediaWiki->run()
#12 /srv/mediawiki/php-master/index.php(46): wfIndexMain()
#13 /srv/mediawiki/w/index.php(3): require(string)
#14 {main}

Navigating back to Special:GlobalUserRights/There'sNoTime and refreshing shows the checkbox filled, and the user appears in the global group listing (e.g. global-file-deletion-reviewer), however the permissions are not applied.

What should have happened instead?:
User rights change successfully, with a log entry

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.: 1.39.0-alpha (5b6bfe8), via https://meta.wikimedia.beta.wmflabs.org

Event Timeline

Change 789077 had a related patch set uploaded (by Majavah; author: Majavah):

[mediawiki/extensions/CentralAuth@master] SpecialGlobalGroupMembership: do not call core hooks

https://gerrit.wikimedia.org/r/789077

Change 789077 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] SpecialGlobalGroupMembership: do not call core hooks

https://gerrit.wikimedia.org/r/789077

Change 788854 had a related patch set uploaded (by Hashar; author: Majavah):

[mediawiki/extensions/CentralAuth@wmf/1.39.0-wmf.10] SpecialGlobalGroupMembership: do not call core hooks

https://gerrit.wikimedia.org/r/788854

Change 788854 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@wmf/1.39.0-wmf.10] SpecialGlobalGroupMembership: do not call core hooks

https://gerrit.wikimedia.org/r/788854

Mentioned in SAL (#wikimedia-operations) [2022-05-04T08:15:29Z] <hashar@deploy1002> Synchronized php-1.39.0-wmf.10/extensions/CentralAuth/includes/Special/SpecialGlobalGroupMembership.php: SpecialGlobalGroupMembership: do not call core hooks - T307518 (duration: 01m 09s)

Thank you for the report and the test case @TheresNoTime . I have tested it on the beta cluster and it works. The fix has been ported to production branch 1.39.0-wmf.10 (currently solely on testwikis) which unblock the train \o/

taavi renamed this task from Beta cluster internal error on changing user's global rights (CentralAuthGroupMembershipProxy::getWikiId() undefined) to Internal error on changing user's global rights (CentralAuthGroupMembershipProxy::getWikiId() undefined).May 4 2022, 8:19 AM
taavi closed this task as Resolved.

Change 811424 had a related patch set uploaded (by RhinosF1; author: Majavah):

[mediawiki/extensions/CentralAuth@REL1_38] SpecialGlobalGroupMembership: do not call core hooks

https://gerrit.wikimedia.org/r/811424

Change 811424 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@REL1_38] SpecialGlobalGroupMembership: do not call core hooks

https://gerrit.wikimedia.org/r/811424