Page MenuHomePhabricator

Errors when enabling wikibase on socialwiki.top (due to non-set language code in ULS?)
Closed, InvalidPublic

Description

I'm trying to enable wikibase client on my wiki to link different language version of a page on the same wiki but I have those errors.

this window popping up when I try to add a link from the left bar.

https://i.ibb.co/dk2BvrV/sysop-wikibase-client-add-link.png

This is the configs I have set

$wgEnableWikibaseRepo = false;
$wgEnableWikibaseClient = true;
require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
$wgWBClientSettings['repoUrl'] = 'https://socialwiki.top';
$wgWBClientSettings['repoScriptPath'] = '';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['repositories']['']['repoDatabase'] = 'wikidb';
$wgWBClientSettings['siteLinkGroups'] = [ 'mywikigroup' ];
$wgWBClientSettings['siteGlobalID'] = 'en';
$wgWBClientSettings['siteGlobalID'] = 'fr';

I've updated everything correctly, installed composer from binary, mediawiki version is 1.34.2, wikibase is the version for this version, php 7.2.32 on ubuntu 18.04 with nginx.
I also have the UniversalLanguageSelector extension, it seems to interact with.

Event Timeline

Aklapper changed the task status from Open to Stalled.Jul 17 2020, 1:01 PM

Hi @Dnsbl1, thanks for taking the time to report this! Unfortunately this Wikimedia Phabricator task lacks some information.
If you have time and can still reproduce the situation: Please add a more complete description to this task. That should be

  • a clear list of exact steps to reproduce the situation, step by step, so that nobody needs to guess or interpret how you performed each step,
  • what happens after performing these steps to reproduce,
  • what you expected to happen instead,
  • a full link to a web address where the issue can be seen.

Thanks!

Also tried this config

    $wgEnableWikibaseRepo = false;
    $wgEnableWikibaseClient = true;
    require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";
    require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
    $wgWBClientSettings['repoUrl'] = 'https://socialwiki.top';
    $wgWBClientSettings['repoScriptPath'] = '';
    $wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
    $wgWBClientSettings['repositories']['']['repoDatabase'] = 'wikidb';
    $wgWBClientSettings['repositories']['']['changesDatabase'] = 'wikidb';
    $wgWBClientSettings['siteLinkGroups'] = [ 'mywikigroup' ];
    $wgWBClientSettings['siteGlobalID'] = 'en';
    $wgWBClientSettings['siteGlobalID'] = 'fr';
	
	$wgWBRepoSettings['siteLinkGroups'] = [ 'socialwiki' ];
	$wgWBClientSettings['siteLinkGroups'] = [ 'socialwiki' ];
	
	$wgLocalDatabases = [ 'enwiki', 'frwiki' ];
$wgWBRepoSettings['localClientDatabases'] = array(
    'en' => 'enwiki',
    'fr' => 'frwiki'
);

@Aklapper

I followed the documentation here from top to bottom https://www.mediawiki.org/wiki/Wikibase/Installation
I wanted to install wikibase client to add links to different languages page like here https://www.mediawiki.org/wiki/Wikibase/Installation#/media/File:Wikibase_setup_wbclient_add_langlinks.png

I have the latteral menu setted but I can't add links.

Exemple of the page to create links https://socialwiki.top/wiki/Special:NewItem?site=wikidb&page=Main Page
Throwing errors like this on chrome based browsers

Uncaught TypeError: (language || this.language || "").toLowerCase is not a function

   at WebFonts.getFont (<anonymous>:14:999)

   at HTMLFormElement.<anonymous> (<anonymous>:16:677)

   at Function.each (load.php?lang=fr&modules=jquery,oojs-ui-core,oojs-ui-widgets|jquery.ui&skin=vector&version=jzg07:4)

   at jQuery.fn.init.each (load.php?lang=fr&modules=jquery,oojs-ui-core,oojs-ui-widgets|jquery.ui&skin=vector&version=jzg07:2)

   at WebFonts.parse (<anonymous>:16:424)

   at WebFonts.init (<anonymous>:15:106)

   at new WebFonts (<anonymous>:14:618)

   at HTMLBodyElement.<anonymous> (<anonymous>:20:774)

   at Function.each (load.php?lang=fr&modules=jquery,oojs-ui-core,oojs-ui-widgets|jquery.ui&skin=vector&version=jzg07:4)

   at jQuery.fn.init.each (load.php?lang=fr&modules=jquery,oojs-ui-core,oojs-ui-widgets|jquery.ui&skin=vector&version=jzg07:2)

I expected to create a page with an other language code to link it on the lateral bar menu to set alternative language pages.

I just want to be able to show different language pages tbh, the wikibase method sounds like the best but if there is another way with links updating automatically to all pages I'd be glad to use this instead.

Reedy renamed this task from Enable wikibase on socialwiki.top to Errors when enabling wikibase on socialwiki.top.Jul 17 2020, 1:34 PM

This seems to be handled in https://www.mediawiki.org/wiki/Topic:Vq9ijfh3j9xl5n7v - not sure why this was posted also here?

Aklapper renamed this task from Errors when enabling wikibase on socialwiki.top to Errors when enabling wikibase on socialwiki.top (due to non-set language code in ULS?).Jul 17 2020, 1:48 PM
Aklapper changed the task status from Stalled to Open.

Isn't language set by this?

$wgWBClientSettings['siteGlobalID'] = 'en';
$wgWBClientSettings['siteGlobalID'] = 'fr';

If anyone is following this, I just switched to the SemanticInterlanguageLinks extension which was just perfect for me, and it works.

Nikerabbit subscribed.

I have opened a new issue for the ULS error: T265325: TypeError: (intermediate value).toLowerCase is not a function

However, I doubt it has anything to do with the inability to set a language. I do not see clear steps to reproduce or any clear error message, so I am closing this task.