Page MenuHomePhabricator

Console error "Unknown module: wikibase.experts.Lexeme" on File pages in Commons
Closed, ResolvedPublic

Description

I get the following console error on about half of Commons file pages that I visit (in safe mode):

Error: Unknown module: wikibase.experts.Lexeme
    at sortDependencies (load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:8)
    at sortDependencies (load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:9)
    at sortDependencies (load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:9)
    at sortDependencies (load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:9)
    at resolveStubbornly (load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:9)
    at Object.load (load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:21)
    at load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:92
    at load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector:92

For example: https://commons.wikimedia.org/wiki/File:Salt0567_Heratemita_alboplagiata_male.jpg?safemode=1

Confirmed in both Chrome and Safari incognito modes.

Event Timeline

kaldari created this task.Jul 8 2019, 5:18 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptJul 8 2019, 5:18 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald Transcript
kaldari updated the task description. (Show Details)Jul 8 2019, 5:21 PM
kaldari updated the task description. (Show Details)Jul 8 2019, 5:23 PM
Ladsgroup added a subscriber: Ramsey-WMF.

It's very likely to be because of federation, something in Wikibase repo injects all modules to format statement values when the value type is a lexeme while the extension is not installed in another repo. Conceptually, maybe we should add it since formatting value types of lexeme entities might be needed. @Ramsey-WMF knows better though.

@Ladsgroup I believe SDC won't require lexeme entity rendering, so perhaps you could point us in the right direction to turn off the dependency injection you mentioned on Commons, if such a thing is possible.

It is theoretically possible for someone to make a statement on Commons that links to a Lexeme, Sense or Form unless you explicitly forbid it.

Addshore added a subscriber: Addshore.

It is theoretically possible for someone to make a statement on Commons that links to a Lexeme, Sense or Form unless you explicitly forbid it.

Indeed.

The module is defined in https://github.com/wikimedia/mediawiki-extensions-WikibaseLexeme/blob/3cbd1753c909ba1e396425a247be34625bc745ae/WikibaseLexeme.resources.php#L529
This is loaded in https://github.com/wikimedia/mediawiki-extensions-WikibaseLexeme/blob/master/src/Registrar.php#L19 specifically at https://github.com/wikimedia/mediawiki-extensions-WikibaseLexeme/blob/master/src/Registrar.php#L64 which is only loaded when on a repo and wgLexemeEnableRepo is true.
This is in turn loaded by extension.json

It sounds like we need another config setting? resulting in?...:

  • Is this a lexeme repo (with lexeme entities)
  • Is this a repo with lexeme enabled ( can refer to lexeme entities elsewhere?)

Or perhaps the lexeme extension should be enabled here, but the lexeme entity itself actually disabled.

I believe we want to disable Lexeme statements on Commons for now - so some help for our team on how to disable them and how to turn it off (if wgLexemeEnableRepo = false isn't sufficient) would be appreciated.

Change 522467 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikibaseLexeme@master] Avoid handling repo hooks when repo is disbaled

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

The fix was actually very easy.

Statement on Commons that links to a Lexeme, Sense or Form may be useful, especially in the Lingue Libre project, because we don't have items for every words. They should not be disabled.

Change 522467 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Avoid handling repo hooks when repo is disbaled

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

it seems it stopped happening. Right?