Jump to content

Topic on Talk:Wikibase/Docker

86.21.245.213 (talkcontribs)

I would like to link Wikidata items on my local wikibase to pages on my Wiki. I understand that I need to run the addSite script. I have done that but I cannot seem to find the right settings for the SiteID for it to be recognised.


I have tried both AddSite and importSites using these settings:

<sites version="1.0" xmlns="http://www.mediawiki.org/xml/sitelist-1.0/">

   <site type="mediawiki">

       <globalid>mywiki</globalid>

       <group>mywikigroup</group>

       <path type="page_path">http://192.168.xx.yy/wiki/</path>

       <path type="file_path">http://192.168.xx.yy/</path>

   </site>

</sites>

When I try to Set Item Sitelink I get:

The site ID "mywiki" is unknown. Please use an existing site ID, such as "enwiki".


Please can you describe how I can determine and set the globalid / SiteID. I am running a wikibase docker implementation.

Valerie Wollinger (WMDE) (talkcontribs)

@86.21.245.213:

Hey, thank you for letting us know. We will find out how to help you best in this regard and come back to you soon!

86.21.245.213 (talkcontribs)

Hi,

Ok, awesome thank you.


The OAUTH setup for QuickStatements needs to be described too. I needed to propose a consumer, grab the keys, approve the proposal, paste the keys into various places, restart, then I realised that oauth.ini did not exist. Grabbed a copy of that from a previous release and placed in /quickstatements/data.


I had to hard code the credentials into oauth.ini as the environment variables in .env were not picked up but something else is wrong:

<br /> <b>Fatal error</b>: Uncaught Exception: Error retrieving token1: {&amp;quot;error&amp;quot;:&amp;quot;mwoauth-callback-not-oob-or-prefix&amp;quot;,&amp;quot;message&amp;quot;:&amp;quot;oauth_callback must be set, and must be set to \&amp;quot;oob\&amp;quot; (case-sensitive), or the configured callback must be a prefix of the supplied callback.&amp;quot;,&amp;quot;callback&amp;quot;:&amp;quot;192.168.xx.yyy:8840\/api.php&amp;quot;} in /var/www/html/magnustools/public_html/php/oauth.php:289

Stack trace:

#0 /var/www/html/quickstatements/public_html/api.php(123): MW_OAuth-&gt;doAuthorizationRedirect('192.168.xx.yyy:...')

#1 {main} thrown in <b>/var/www/html/magnustools/public_html/php/oauth.php</b> on line <b>289</b><br />


All looks ok at mediawiki OAuth though.


Would be awesome to get this sorted for when 1.39 Wiki for Docker is packaged, if not sooner. Thanks for this though, amazing stuff.

Reply to "How to AddSite"