Re: [Wikidata] wikibase docker images and sitelinks
Hi! We're looking into documenting this better but I was also not able to make it work "out of the box". There is a ticket very closely related to this: https://phabricator.wikimedia.org/T205922 Another place to find other people who might have similar problems is the fairly new Wikibase Users' Group Mailing list which you can find at: https://lists.wikimedia.org/mailman/listinfo/wikibaseug You might find also it useful to take a look at: https://www.mediawiki.org/wiki/Manual:Sites_table#Adding_a_new_site. From the way you describe it your second problem is most likely related to the first one. Best, Tom ___ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Re: [Wikidata] wikibase docker images and sitelinks
I'm using the following settings in LocalSettings (this is espeacially useful for dev - probably not good for production): $wgWBClientSettings['siteGlobalID'] = 'enwiki'; So whenever there is a sitelink to enwiki it links to my local wiki. Hope it helps, Eran On Mon, Sep 24, 2018 at 12:55 AM Erik Paulson wrote: > 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 > > > > > > ___ > Wikidata mailing list > Wikidata@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikidata > ___ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
[Wikidata] wikibase docker images and sitelinks
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 ___ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata