Page MenuHomePhabricator

Cannot associate edit with event cross-wiki
Open, Stalled, Needs TriagePublicBUG REPORT

Description

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

  • Create an event on wiki X
  • Make an edit on wiki Y
  • While on wiki X, make a request to associate the edit with the event, e.g. within MediaWiki:
new mw.Rest().put(
	`/campaignevents/v0/event_registration/12345/edits/OTHERWIKIID/REVID`,
	{ token: mw.user.tokens.get( 'csrfToken' ) }
);

What happens?:
The response is 202 accepted, but the edit does not get associated. An error like the following is logged in mw-error.log:

2025-11-17 21:55:40 33180882e4b9 my_wiki: [001a9d479ad059677bcdf55c] [no req]   InvalidArgumentException: Mismatching wiki ID rev=secondwiki, this=
#0 /var/www/html/w/extensions/CampaignEvents/src/EventContribution/EventContributionComputeMetrics.php(161): MediaWiki\Revision\RevisionRenderer->getRenderedRevision()
#1 /var/www/html/w/extensions/CampaignEvents/src/EventContribution/EventContributionComputeMetrics.php(142): MediaWiki\Extension\CampaignEvents\EventContribution\EventContributionComputeMetrics->countInternalLinksInRevision()
#2 /var/www/html/w/extensions/CampaignEvents/src/EventContribution/EventContributionComputeMetrics.php(106): MediaWiki\Extension\CampaignEvents\EventContribution\EventContributionComputeMetrics->getInternalLinksDelta()
#3 /var/www/html/w/extensions/CampaignEvents/src/EventContribution/EventContributionJob.php(48): MediaWiki\Extension\CampaignEvents\EventContribution\EventContributionComputeMetrics->computeEventContribution()
#4 /var/www/html/w/includes/JobQueue/JobRunner.php(367): MediaWiki\Extension\CampaignEvents\EventContribution\EventContributionJob->run()
#5 /var/www/html/w/includes/JobQueue/JobRunner.php(325): MediaWiki\JobQueue\JobRunner->doExecuteJob()
#6 /var/www/html/w/includes/JobQueue/JobRunner.php(220): MediaWiki\JobQueue\JobRunner->executeJob()
#7 /var/www/html/w/maintenance/runJobs.php(93): MediaWiki\JobQueue\JobRunner->run()
#8 /var/www/html/w/maintenance/includes/MaintenanceRunner.php(696): RunJobs->execute()
#9 /var/www/html/w/maintenance/doMaintenance.php(88): MediaWiki\Maintenance\MaintenanceRunner->run()
#10 /var/www/html/w/maintenance/runJobs.php(136): require_once(string)
#11 {main}

What should have happened instead?:
The edit should be associated.

Event Timeline

This seems really hard to fix right now given core limitations: T410328, T410329. Perhaps we should consider removing cross-wiki support from the endpoint...

vaughnwalters subscribed.

This seems really hard to fix right now given core limitations: T410328, T410329. Perhaps we should consider removing cross-wiki support from the endpoint...

Why is this currently working on betacluster cross wiki in the UI though? I would think if it is not working in the API it should also not work when associating an edit cross wiki using the UI?

This seems really hard to fix right now given core limitations: T410328, T410329. Perhaps we should consider removing cross-wiki support from the endpoint...

Why is this currently working on betacluster cross wiki in the UI though? I would think if it is not working in the API it should also not work when associating an edit cross wiki using the UI?

When you use the UI (post-edit dialog) you are not associating an edit on a different wiki: you're associating an edit on the current wiki.

This seems really hard to fix right now given core limitations: T410328, T410329. Perhaps we should consider removing cross-wiki support from the endpoint...

Why is this currently working on betacluster cross wiki in the UI though? I would think if it is not working in the API it should also not work when associating an edit cross wiki using the UI?

When you use the UI (post-edit dialog) you are not associating an edit on a different wiki: you're associating an edit on the current wiki.

Ahhh, I see. Thank you for the clarification.

If this is hard to fix, then preventing cross-wiki support from the endpoint seems better than leaving the status quo.

If this is hard to fix, then preventing cross-wiki support from the endpoint seems better than leaving the status quo.

Yeah, I think ideally I'd love to hear more on the feasibility of the subtasks, but dropping support sounds good if there is no clear path to implement it.

Daimona changed the task status from Open to Stalled.EditedDec 17 2025, 5:26 PM

Blocked pending cross-team discussion on T410327#11394517 (in January).