Page MenuHomePhabricator

VE auto citation is broken in hewiki
Closed, ResolvedPublicBUG REPORT

Description

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

  • Go to virtual editor in any page in hewiki
  • Select "Cite"
  • Copy&paste some URL to the automatic citation

What happens?: Error message

What should have happened instead?: Should fetch metadata of author, site etc and create a citation template

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

Other information (browser name/version, screenshots, etc.): The problem is that mw.config.get( 'wgVisualEditorConfig' ).fullRestbaseUrl is not initialized. I am going to add a workaround in the wiki JS to set it up soon

Event Timeline

My current speculation:

  • VE perspective:
'restbaseUrl' => $useRestbase ? $coreConfig->get( 'VisualEditorRestbaseURL' ) : false,
'fullRestbaseUrl' => $useRestbase ? $coreConfig->get( 'VisualEditorFullRestbaseURL' ) : false,

so I think useRestbase became from true to false resulting in false. (in VE code)

  • Cite perspective: (modules/ve/ve.ui.CitoidInspector.js)
this.fullRestbaseUrl = mw.config.get( 'wgCitoidConfig' ).fullRestbaseUrl ||
	mw.config.get( 'wgVisualEditorConfig' ).fullRestbaseUrl;

I think we relay on the fallback of VE which is not valid. (e.g wgCitoidConfig seems to be invalid in both hewiki and enwiki).

If (any I didn't follow it for long time) parsoid is going to be written in php and Cite relied on parsoid so far - need to override the defaults in Cite. e.g to fix extension.json?

Mvolz triaged this task as Unbreak Now! priority.Dec 17 2022, 12:32 PM

Sounds related to the changes from T320529: Configure VE backend to use Parsoid directly, instead of calling RESTbase. I guess it's been broken since Tuesday :/

Thank you for figuring out the workaround, it looks like the problem is mitigated, so we'll figure out a proper fix on Monday.

hewiki is the only production wiki the new config that has Citoid. The problem can also be reproduced on https://test.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&veaction=edit.

Some people in hewiki report on exception in VE of HttpException from Rest: https://he.wikipedia.org/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%93%D7%9C%D7%A4%D7%A7_%D7%99%D7%99%D7%A2%D7%95%D7%A5#%D7%AA%D7%A7%D7%9C%D7%94_%D7%A2%D7%9D_%D7%94%D7%AA%D7%A8%D7%90%D7%AA_%22%D7%A0%D7%AA%D7%A4%D7%A1_%D7%97%D7%A8%D7%99%D7%92%22

I don't know if that exception comes following my workaround or was happening before (e.g due to the rest changes from last week). Anyhow I modified the workaround to use wgCitoidConfig instead of wgVisualEditorConfig as can be seen in https://he.wikipedia.org/w/index.php?title=%D7%9E%D7%93%D7%99%D7%94_%D7%95%D7%99%D7%A7%D7%99:Common.js&diff=35274624&oldid=35257951

I was not able to reproduce the HttpException hence debugging this issue blindly based on guesses.

Change 869226 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] Specify Citoid RESTBase URL separately

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

Change 869226 merged by jenkins-bot:

[operations/mediawiki-config@master] Specify Citoid RESTBase URL separately

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

Mentioned in SAL (#wikimedia-operations) [2023-01-03T21:34:01Z] <taavi@deploy1002> Started scap: Backport for [[gerrit:869226|Specify Citoid RESTBase URL separately (T325425)]], [[gerrit:874855|Use new DiscussionTools heading markup on group1 wikis (T314714)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-03T21:35:51Z] <taavi@deploy1002> taavi and matmarex: Backport for [[gerrit:869226|Specify Citoid RESTBase URL separately (T325425)]], [[gerrit:874855|Use new DiscussionTools heading markup on group1 wikis (T314714)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-01-03T21:46:13Z] <taavi@deploy1002> Finished scap: Backport for [[gerrit:869226|Specify Citoid RESTBase URL separately (T325425)]], [[gerrit:874855|Use new DiscussionTools heading markup on group1 wikis (T314714)]] (duration: 12m 12s)