Page MenuHomePhabricator

MediaWiki\Extension\CampaignEvents\TrackingTool\ToolNotFoundException: No tool with DB ID 1
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
message
[7d972cac-6cfb-4232-8c36-12c00e2d0188] /wiki/Especial:Detalhes_do_evento/1152   MediaWiki\Extension\CampaignEvents\TrackingTool\ToolNotFoundException: No tool with DB ID 1
trace
from /srv/mediawiki/php-1.44.0-wmf.17/extensions/CampaignEvents/src/TrackingTool/TrackingToolRegistry.php(228)
#0 /srv/mediawiki/php-1.44.0-wmf.17/extensions/CampaignEvents/src/FrontendModules/EventDetailsModule.php(604): MediaWiki\Extension\CampaignEvents\TrackingTool\TrackingToolRegistry->getUserInfo(int, string)
#1 /srv/mediawiki/php-1.44.0-wmf.17/extensions/CampaignEvents/src/FrontendModules/EventDetailsModule.php(315): MediaWiki\Extension\CampaignEvents\FrontendModules\EventDetailsModule->getTrackingToolsSection(MediaWiki\Title\Title, MediaWiki\Linker\LinkRenderer)
#2 /srv/mediawiki/php-1.44.0-wmf.17/extensions/CampaignEvents/src/FrontendModules/EventDetailsModule.php(145): MediaWiki\Extension\CampaignEvents\FrontendModules\EventDetailsModule->getInfoColumn(MediaWiki\User\User, MediaWiki\Extension\CampaignEvents\MWEntity\MWAuthorityProxy, MediaWiki\Output\OutputPage, MediaWiki\Linker\LinkRenderer, bool, bool, bool, string, int)
#3 /srv/mediawiki/php-1.44.0-wmf.17/extensions/CampaignEvents/src/Special/SpecialEventDetails.php(203): MediaWiki\Extension\CampaignEvents\FrontendModules\EventDetailsModule->createContent(MediaWiki\User\User, MediaWiki\Extension\CampaignEvents\MWEntity\MWAuthorityProxy, bool, bool, string, MediaWiki\Output\OutputPage, MediaWiki\Linker\LinkRenderer)
#4 /srv/mediawiki/php-1.44.0-wmf.17/includes/specialpage/SpecialPage.php(729): MediaWiki\Extension\CampaignEvents\Special\SpecialEventDetails->execute(string)
#5 /srv/mediawiki/php-1.44.0-wmf.17/includes/specialpage/SpecialPageFactory.php(1734): MediaWiki\SpecialPage\SpecialPage->run(string)
#6 /srv/mediawiki/php-1.44.0-wmf.17/includes/actions/ActionEntryPoint.php(503): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#7 /srv/mediawiki/php-1.44.0-wmf.17/includes/actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()
#8 /srv/mediawiki/php-1.44.0-wmf.17/includes/MediaWikiEntryPoint.php(202): MediaWiki\Actions\ActionEntryPoint->execute()
#9 /srv/mediawiki/php-1.44.0-wmf.17/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#10 /srv/mediawiki/w/index.php(3): require(string)
#11 {main}
Impact

Can't view event details.

Notes

Only seen on the Wikimedia Brazil wiki, for which the P&E Dashboard integration is disabled. The error presumably occurs when viewing an event 1) created on another wiki where the integration is enabled, and 2) linked to a course on the Dashboard.

Details

Event Timeline

I'm guessing we should make it so that when the P&E Dashboard integration is disabled (which should continue to be the case in certain wikis), the entry is not removed altogether from the registry, and instead there should be a usability check somewhere.

when the P&E Dashboard integration is disabled (which should continue to be the case in certain wikis)

On second thought... Do we need to allow this? It makes the configuration and the code more complicated. In general, since events are global, we need to use the same configuration for all wikis. Ideally, this would also apply to whether the P&E Dashboard integration is enabled, and we would not allow disabling it for an individual wiki. @ifried Any thoughts on this?

Yeah, I think it would be easiest if we just have P&E Dashboard integration for all wikis -- and, if a wiki doesn't find it useful, they don't have to use it. Then we don't need to worry about these types of issues arising. Works for me.

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

[mediawiki/extensions/CampaignEvents@master] Add note about P&E Dashboard configuration

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

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

[operations/mediawiki-config@master] Drop $wmgCampaignEventsProgramsAndEventsDashboardEnabled

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

Yeah, I think it would be easiest if we just have P&E Dashboard integration for all wikis -- and, if a wiki doesn't find it useful, they don't have to use it. Then we don't need to worry about these types of issues arising. Works for me.

Thanks! I also just realized that we changed this somewhat recently in T377252. No solution is perfect, unfortunately.


<technical details>
We should probably reconsider this decision when (if?) we add support for tracking tools other than the Dashboard.
For the time being, I don't see a way to

  1. Allow the field to be removed from individual wikis, and
  2. Recognize the Dashboard as a valid tracking tool even when not enabled locally

Without adding a new config setting. But config should be avoided when possible, especially if it's such a nice use case. Maybe, the best way forward is to treat the production Dashboard and the staging Dashboard as separate tools, have them recognized everywhere, but choose which one to allow (if any) for events on the current wiki. But then, this would entail some generalization of how the form field is rendered, and also the format of the config setting etc. All these things would be necessary for the "allow other tracking tools" project anyway, hence my proposal to wait until then.
</technical details>


For this task:

  • I updated the on-wiki documentation, to explain why all wikis should be configured the same way.
  • I made r1124889 to update the same documentation in the code
  • And r1124893 to re-enable the Dashboard integration for affiliate wikis; deployment scheduled for tomorrow 2025-03-06 14:00 UTC.

Change #1124893 merged by jenkins-bot:

[operations/mediawiki-config@master] Drop $wmgCampaignEventsProgramsAndEventsDashboardEnabled

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

Mentioned in SAL (#wikimedia-operations) [2025-03-06T14:47:23Z] <hashar@deploy2002> ollieshotton, migr, daimona, hashar: Backport for [[gerrit:1125164|Revert "Fix nested refs with the same name but a different group"]], [[gerrit:1123007|Test new term store config in beta (T385592)]], [[gerrit:1124836|Growth: remove unused config wgGENewcomerTasksOresTopicConfigTitle]], [[gerrit:1124893|Drop $wmgCampaignEventsProgramsAndEventsDashboardEnabled (T387025)]] synced to the testservers (h

Mentioned in SAL (#wikimedia-operations) [2025-03-06T14:53:55Z] <hashar@deploy2002> Finished scap sync-world: Backport for [[gerrit:1125164|Revert "Fix nested refs with the same name but a different group"]], [[gerrit:1123007|Test new term store config in beta (T385592)]], [[gerrit:1124836|Growth: remove unused config wgGENewcomerTasksOresTopicConfigTitle]], [[gerrit:1124893|Drop $wmgCampaignEventsProgramsAndEventsDashboardEnabled (T387025)]] (duration: 12m 10s)

Change #1124889 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add note about P&E Dashboard configuration

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

vaughnwalters subscribed.

I am currently able to view event details on the page that had the error. Marking as done / resolved.

Screenshot 2025-03-07 at 3.09.51 PM.png (2,144×1,552 px, 327 KB)