Page MenuHomePhabricator

Citoid's automatic reference feature is broken in multiple wikis
Closed, ResolvedPublicBUG REPORT

Description

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

  • Edit any article in VE on one of the following wikis: dewiki, ruwiki, nowiki, nlwiki (probably many many others too)
  • Press the "Insert citation" button

What happens?:

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

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

Fixed w/ config in

  • ar
  • de
  • en
  • es
  • fa
  • fr
  • ja
  • nl
  • nn
  • no
  • pl
  • pt
  • ru
  • sv
  • uk

Event Timeline

Change #1113884 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/Citoid@master] Revert "Warn if 'preprint', 'dataset', or 'standard' key is missing"

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

jhsoby triaged this task as High priority.Jan 23 2025, 11:30 PM

Setting to High since this impacts a large number of wikis – could potentially even be UBN?

Also on frwiki, the “automatic” menu is grayed out.

Setting to High since this impacts a large number of wikis – could potentially even be UBN?

Bah. And there's no backport window until Monday. :/

Tech news item on how to fix the config:
Which... also doesn't go out until Monday. T383666

Change #1113884 merged by jenkins-bot:

[mediawiki/extensions/Citoid@master] Revert "Warn if 'preprint', 'dataset', or 'standard' key is missing"

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

Change #1113948 had a related patch set uploaded (by Mvolz; author: Jon Harald Søby):

[mediawiki/extensions/Citoid@wmf/1.44.0-wmf.13] Revert "Warn if 'preprint', 'dataset', or 'standard' key is missing"

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

Fixed with config change on ja, es, de, fr, no, ru, Sjoerd did it else on nl (ty!) but yes it will be every wiki aside from en wiki because the tech notice hasn't gone out yet.

This comment was removed by Mvolz.
Mvolz updated the task description. (Show Details)

Thanks for the help with this, @Mvolz!

I'm wondering what would happen if we removed line 53 from ve.ui.Citoid.init.js. Would it have any ill effects? Without that line, I think your initial change would have had the desired effect (add a warning, but don't disable the automatic tab). That could be a potential quick fix.

Another potential solution that would probably require a little bit more work would be to split requiredMappings in that file in two – requiredMappings which are actually required, and suggestedMappings which are not actually blockers to adding the automatic config, but would be nice to have. That would also give both communities and developers a grace period for adding in new mappings more gradually.

I'm just spitballing here, really. What do you think?

Esanders updated the task description. (Show Details)

Change #1113948 merged by jenkins-bot:

[mediawiki/extensions/Citoid@wmf/1.44.0-wmf.13] Revert "Warn if 'preprint', 'dataset', or 'standard' key is missing"

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

Mentioned in SAL (#wikimedia-operations) [2025-01-24T12:33:39Z] <lucaswerkmeister-wmde@deploy2002> Started scap sync-world: Backport for [[gerrit:1113948|Revert "Warn if 'preprint', 'dataset', or 'standard' key is missing" (T384661)]]

Mentioned in SAL (#wikimedia-operations) [2025-01-24T12:38:33Z] <lucaswerkmeister-wmde@deploy2002> mvolz, lucaswerkmeister-wmde: Backport for [[gerrit:1113948|Revert "Warn if 'preprint', 'dataset', or 'standard' key is missing" (T384661)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-01-24T12:46:43Z] <lucaswerkmeister-wmde@deploy2002> Finished scap sync-world: Backport for [[gerrit:1113948|Revert "Warn if 'preprint', 'dataset', or 'standard' key is missing" (T384661)]] (duration: 13m 04s)

Disclaimer: I am not citoid-savvy at all

I checked citoid's dashboards on logstash and grafana but I sadly was not able to find a panel indicating that something is wrong, so it feels like we are missing some observability and potentially alerting here. My suggestion is that it would be worth investing some time in improving citoid's observability, which could even be as simple as adding/editing panels in in the existing dashboards, and assist us in detecting service reliability issues sooner.

Mvolz raised the priority of this task from High to Unbreak Now!.

Disclaimer: I am not citoid-savvy at all

I checked citoid's dashboards on logstash and grafana but I sadly was not able to find a panel indicating that something is wrong, so it feels like we are missing some observability and potentially alerting here. My suggestion is that it would be worth investing some time in improving citoid's observability, which could even be as simple as adding/editing panels in in the existing dashboards, and assist us in detecting service reliability issues sooner.

T385161 might have helped in this particular case, but it would also result in false positives. Console messages were also the expected result if the change has been as desired.

The issue is that this is something that is not enabled on every wiki because it is enabled with a config message. This change caused the config message to be deregistered, but this is the norm on some wikis. I'm not sure what could be put in place to catch this.

Thanks for the help with this, @Mvolz!

I'm wondering what would happen if we removed line 53 from ve.ui.Citoid.init.js. Would it have any ill effects? Without that line, I think your initial change would have had the desired effect (add a warning, but don't disable the automatic tab). That could be a potential quick fix.

Another potential solution that would probably require a little bit more work would be to split requiredMappings in that file in two – requiredMappings which are actually required, and suggestedMappings which are not actually blockers to adding the automatic config, but would be nice to have. That would also give both communities and developers a grace period for adding in new mappings more gradually.

I'm just spitballing here, really. What do you think?

For re-enabling the console messages, this is an option. Another option is to allow wikis to set a fall back template, so that this fails gracefully (for those that have it enabled): T384709

There is tension here which is that we want wikis to support the new types in a nice way (a fallback doesn't necessarily support all the parameters).

Breaking things ensures better data quality, but obviously we want things to be backwards compatible, allow people time to update, and also fail gracefully.