Erik Paulson
2018-09-23 21:55:05 UTC
Hello -
I've got a very basic wikibase up and running, using this tutorial:
https://medium.com/@thisismattmiller/wikibase-for-research-infrastructure-part-1-d3f640dfad34
The tutorial along with the docker images make getting up and running
pretty easy - So I've got a small base loaded - 7 properties, a couple of
"core items", and then about 2000 jazz musicians. All seems mostly fine - I
can query it via SPARQL, edit items in wikibase, and create pages in the
wiki. The sample code is a touch out of date because the wikidata client
library used for the examples has evolved a bit, but it wasn't too hard to
figure out.
However, I can't seem to create a link from the item to a page in my wiki -
I don't appear to be have a site that I can link against. When I try to use
this page:
http://localhost:8181/wiki/Special:SetSiteLink
whatever i try, it tells me that my site ID is unknown, and that I should
try a known site like 'enwiki' (which also fails). I've tried just about
every variation of siteID that I can think of.
Trying to add a site link in the wikidata item page for an item fails too -
when I try to add a link, I'm never presented with a list of sites to
potentially link to in the 'Wikipedia' box (and in the
wikinews/wikivoyage/etc sitelink boxes)
The wikibase installation page at
https://www.mediawiki.org/wiki/Wikibase/Installation#There_are_no_sites_I_can_set_in_a_new_item
suggests running these commands:
php lib/maintenance/populateSitesTable.php
php repo/maintenance/rebuildItemsPerSite.php
So I docker exec'ed into the wikibase container and ran them. Now, I'm
presented with site link options - but all to wikipedia.org sites, not my
local site.
I've tried inserting a row into the 'sites' table in MySQL to something
that points to the local site, but still no dice.
Can someone point me at what I'm missing?
Related: the docker-compose system that comes up also brings up a regular
mediawiki site, and it seemingly has the wikibase-client extension running,
because I can reference my local wikibase data and pull out properties for
items - for example, I can make a page for 'Teddy Edwards', and use this
syntax and get a result:
{{#statements:P7|from=Q1932}}
P7 in the tutorial is the URL for an image from the linkedjazz site. (Teddy
Edwards is assigned Q1932 in the tutorial I'm following)
However, because I can't make a sitelink from
http://localhost:8181/wiki/Item:Q1932 to
http://localhost:8181/wiki/Teddy_Edwards.
And (I think) because of the lack of that sitelink, the wikibase client
only works with the |from syntax - if I put in my Teddy_Edwards article
just a {{#statements:P7}} line, I get no results when it's rendered.
Am I correct that this second problem is tied to my first problem?
Thanks in advance for any suggestions,
-Erik
I've got a very basic wikibase up and running, using this tutorial:
https://medium.com/@thisismattmiller/wikibase-for-research-infrastructure-part-1-d3f640dfad34
The tutorial along with the docker images make getting up and running
pretty easy - So I've got a small base loaded - 7 properties, a couple of
"core items", and then about 2000 jazz musicians. All seems mostly fine - I
can query it via SPARQL, edit items in wikibase, and create pages in the
wiki. The sample code is a touch out of date because the wikidata client
library used for the examples has evolved a bit, but it wasn't too hard to
figure out.
However, I can't seem to create a link from the item to a page in my wiki -
I don't appear to be have a site that I can link against. When I try to use
this page:
http://localhost:8181/wiki/Special:SetSiteLink
whatever i try, it tells me that my site ID is unknown, and that I should
try a known site like 'enwiki' (which also fails). I've tried just about
every variation of siteID that I can think of.
Trying to add a site link in the wikidata item page for an item fails too -
when I try to add a link, I'm never presented with a list of sites to
potentially link to in the 'Wikipedia' box (and in the
wikinews/wikivoyage/etc sitelink boxes)
The wikibase installation page at
https://www.mediawiki.org/wiki/Wikibase/Installation#There_are_no_sites_I_can_set_in_a_new_item
suggests running these commands:
php lib/maintenance/populateSitesTable.php
php repo/maintenance/rebuildItemsPerSite.php
So I docker exec'ed into the wikibase container and ran them. Now, I'm
presented with site link options - but all to wikipedia.org sites, not my
local site.
I've tried inserting a row into the 'sites' table in MySQL to something
that points to the local site, but still no dice.
Can someone point me at what I'm missing?
Related: the docker-compose system that comes up also brings up a regular
mediawiki site, and it seemingly has the wikibase-client extension running,
because I can reference my local wikibase data and pull out properties for
items - for example, I can make a page for 'Teddy Edwards', and use this
syntax and get a result:
{{#statements:P7|from=Q1932}}
P7 in the tutorial is the URL for an image from the linkedjazz site. (Teddy
Edwards is assigned Q1932 in the tutorial I'm following)
However, because I can't make a sitelink from
http://localhost:8181/wiki/Item:Q1932 to
http://localhost:8181/wiki/Teddy_Edwards.
And (I think) because of the lack of that sitelink, the wikibase client
only works with the |from syntax - if I put in my Teddy_Edwards article
just a {{#statements:P7}} line, I get no results when it's rendered.
Am I correct that this second problem is tied to my first problem?
Thanks in advance for any suggestions,
-Erik