Wikidata / Wikidata-Toolkit

Java library to interact with Wikibase
https://www.mediawiki.org/wiki/Wikidata_Toolkit
Apache License 2.0
375 stars 99 forks source link

Why there is a limit of 250 characters for label? #291

Closed stan256 closed 6 years ago

stan256 commented 6 years ago

Hello! While I am copy some document from public wikibase to my local one, I am getting an exception (org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException: [modification-failed] Must be no more than 250 characters long) for too big labels. This problem happens because my local base configuration or why? I tried to add item with much more bigger label to my base manually and it worked? Why than wikidata toolkit throws it ?

Thanks!

Tpt commented 6 years ago

It is an error returned by the Wikibase API (probably the action=wbeditentity method). It's not something done directly by the WikidataToolkit. Maybe some of the ways to edit entity contents do not enforce this size limit.

stan256 commented 6 years ago

Update: this is really a configurable variable. The default is 250, but you can change it in config file of your local base - LocalSettings.php https://www.mediawiki.org/wiki/Wikibase/Installation/Advanced_configuration#Configuration_2 https://phabricator.wikimedia.org/diffusion/EWBA/browse/master/docs/options.wiki

Your variable should to have a view something like: $wgWBClientSettings['multilang-limits'] = array( 'length' => 800 );