Page MenuHomePhabricator

Uncaught HiddenCentralUserException when visiting Special:EventDetails for an event with a suppressed private participant
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Create an event page and enable registration
  • Create a new account and log in with it
  • Use the newly-created account to register privately for the event
  • Using a privileged account, block & suppress the account you just created
  • Log-in as the organizer again
  • Visit Special:EventDetails for that event

What happens?:
The following uncaught exception is thrown:

[62a1e363282a500356e454df] /w/index.php?title=Special:EventDetails/432&tab=ParticipantsPanel MediaWiki\Extension\CampaignEvents\MWEntity\HiddenCentralUserException: Central ID 60 belongs to a hidden user

Backtrace:

from /var/www/html/w/extensions/CampaignEvents/src/MWEntity/CampaignsCentralUserLookup.php(102)
#0 /var/www/html/w/extensions/CampaignEvents/src/FrontendModules/EventDetailsParticipantsModule.php(404): MediaWiki\Extension\CampaignEvents\MWEntity\CampaignsCentralUserLookup->getUserName()
#1 /var/www/html/w/extensions/CampaignEvents/src/FrontendModules/EventDetailsParticipantsModule.php(344): MediaWiki\Extension\CampaignEvents\FrontendModules\EventDetailsParticipantsModule->getParticipantRow()
#2 /var/www/html/w/extensions/CampaignEvents/src/FrontendModules/EventDetailsParticipantsModule.php(297): MediaWiki\Extension\CampaignEvents\FrontendModules\EventDetailsParticipantsModule->getParticipantRows()
#3 /var/www/html/w/extensions/CampaignEvents/src/FrontendModules/EventDetailsParticipantsModule.php(135): MediaWiki\Extension\CampaignEvents\FrontendModules\EventDetailsParticipantsModule->getParticipantsContainer()
#4 /var/www/html/w/extensions/CampaignEvents/src/Special/SpecialEventDetails.php(178): MediaWiki\Extension\CampaignEvents\FrontendModules\EventDetailsParticipantsModule->createContent()
#5 /var/www/html/w/includes/specialpage/SpecialPage.php(701): MediaWiki\Extension\CampaignEvents\Special\SpecialEventDetails->execute()
#6 /var/www/html/w/includes/specialpage/SpecialPageFactory.php(1562): SpecialPage->run()
#7 /var/www/html/w/includes/MediaWiki.php(328): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#8 /var/www/html/w/includes/MediaWiki.php(927): MediaWiki->performRequest()
#9 /var/www/html/w/includes/MediaWiki.php(581): MediaWiki->main()
#10 /var/www/html/w/index.php(50): MediaWiki->run()
#11 /var/www/html/w/index.php(46): wfIndexMain()
#12 {main}

What should have happened instead?:
No exception thrown.

Software version (skip for WMF-hosted wikis like Wikipedia):
master

Other information (browser name/version, screenshots, etc.):
Similar to T338185.

Example on beta: https://en.wikipedia.beta.wmflabs.org/wiki/Special:EventDetails/233 (provided by @vaughnwalters); note that only the event organizers can reproduce this bug.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJul 4 2023, 12:23 AM

Change 935176 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Catch the correct exception for getUserName() in SpecialEventDetails

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

Change 935176 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Catch the correct exception for getUserName() in SpecialEventDetails

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

The uncaught exception is not thrown anymore, this is working correctly. Sending to product sign off.

Screen Recording 2023-07-05 at 10.52.46 AM.gif (1ร—2 px, 1 MB)

AC is met for this bug fix, marking as done / resolved.