Hi,
using Wikibase can be a problem if you run php_fpm in a chroot jail. Make sure DNS works properly inside the chroot: https://www.mediawiki.org/wiki/Topic:Ssoxlmc01y03na34
Thanks and cheers,
Till
On 6/13/2014 11:31 AM, Till Kraemer wrote:
Hi,
I'm trying to use Wikibase on my pool wiki and language wikis.
In my pool wiki, I can create properties and items, but I can't add site links to them. ID: "Q1", site id: "cswiki", site link: "article name" gives me the error "The specified article could not be found on the corresponding site." even though that article exists on cswiki.
I also can't access data from the language wikis. If I use {{#property:P1}} in an article on cswiki, nothing shows up.
I downloaded Wikidata-refs-heads-master.tar.gz and extracted it to the extension folder of my pool wiki and language wikis.
My LocalSettings.php of the pool wiki looks like this:
# Wikibase $wgEnableWikibaseRepo = true; $wgEnableWikibaseClient = false; $wmgUseWikibaseRepo = true; $wmgUseWikibaseClient = false; require_once __DIR__ . "/extensions/Wikidata/Wikidata.php"; require_once __DIR__ . "/extensions/Wikidata/extensions/Wikibase/repo/ExampleSettings.php";
# SiteMatrix Extension require_once "$IP/extensions/SiteMatrix/SiteMatrix.php"; $wgLocalDatabases = array( 'cswiki', 'dewiki', 'enwiki', 'eswiki', 'frwiki', 'huwiki', 'hywiki', 'itwiki', 'nlwiki', 'plwiki', 'poolwiki', 'ptwiki', 'ruwiki', 'srwiki', 'svwiki' );
My LocalSettings.php of the language wikis (cs for example) look like this:
# Wikibase Extension $wgEnableWikibaseRepo = false; $wgEnableWikibaseClient = true; $wmgUseWikibaseRepo = false; $wmgUseWikibaseClient = true; require_once __DIR__ . "/extensions/Wikidata/Wikidata.php";
# Settings $wgWBSettings['repoUrl'] = 'http://pool.mypedia.com'; $wgWBSettings['repoScriptPath'] = '/w'; $wgWBSettings['repoArticlePath'] = '/wiki/$1'; $wgWBSettings['siteGlobalID'] = 'cswiki'; $wgWBSettings['repoDatabase'] = 'poolwiki'; $wgWBSettings['changesDatabase'] = 'poolwiki';
# Optional $wgWBSettings['siteGroup'] = 'mypedia'; $wgWBSettings['sort'] = 'code'; //optional $wgWBSettings['sortPrepend'] = array( 'cs' );
In populateSitesTable.php, I changed "https://meta.wikimedia.org/w/api.php" to "http://pool.mypedia.com/w/api.php" and "$validGroups = array( 'wikipedia', 'wikivoyage', 'wikiquote', 'wiktionary','wikibooks', 'wikisource', 'wikiversity', 'wikinews' );" to "$validGroups = array( 'mypedia' );"
Do I need to change "$wikiId = $this->getOption( 'wiki' );" too, since it says "wiki" is expanded to "wikipedia"?
Table "sites" in the poolwiki database looks like this:
site_id | site_global_key | site_type | site_group | site_source | site_language | site_protocol | site_domain | site_data | site_forward | site_config
1 | cswiki | mediawiki | mypedia | local | cs | http:// | com.mypedia.cs. | a:1:{s:5:"paths";a:2:{s:9:"file_path";s:5:"/w/$1";s:9:"page_path";s:8:"/wiki/$1";}} | 0 | a:0:{}
[...]
15 | poolwiki | mediawiki | pool | local | en | http:// | com.mypedia.pool. | a:1:{s:5:"paths";a:2:{s:9:"file_path";s:5:"/w/$1";s:9:"page_path";s:8:"/wiki/$1";}} | 0 | a:0:{}
I changed site_group "wikipedia" to "mypedia" and added data for site_protocol and site_domain by hand.
I noticed that the script path is "/w/$1" here, while $wgScriptPath in LocalSettings.php is actually "/w", could that cause any problems?
And should I change site_group of the pool to mypedia like I did with the language wikis or isn't that necessary?
Wikibase DataModel 0.8, Wikibase Repository 0.5 alpha, WikibaseLib 0.5 alpha and Wikidata show up in Special:Version of the pool wiki.
Wikibase Client 0.5 alpha, Wikibase DataModel 0.8, WikibaseLib 0.5 alpha and Wikidata show up in Special:Version of the language wikis.
Any help would be really appreciated!
Thanks and cheers,
Till