Page MenuHomePhabricator

Document $wgWBRepoSettings['statementSections'] in /docs/options in Wikibase
Closed, ResolvedPublic1 Estimated Story Points

Description

$wgWBRepoSettings['statementSections'] was introduced as part of T117421 but was never documented.

Some example settings can be found in T123112 and also in production.

Documentation should exist for this setting.

Event Timeline

Hi,

thank you for you answer! Unfortunately I do not get it fully. In different places it seams that the configuration is slightly different. I now put:

${DOLLAR}wgWBRepoSettings['statementSections'] = array(
        'wikidatawiki' => array(
        'item' => array(
                'statements' => null,
                'identifiers' => array(
                        'type' => 'dataType',
                        'dataTypes' => array( 'external-id' ),
                ),
        ),
        ),
);

in the LocalSettings.php.template file. But this seams not to work ....

Where is this file https://noc.wikimedia.org/conf/InitialiseSettings.php.txt located?

Merci
D063520

Where is this file https://noc.wikimedia.org/conf/InitialiseSettings.php.txt located?

This is just a text file showing what is set in WMF production.

For a regular wikibase this will work

$wgWBRepoSettings['statementSections'] = array(
        'item' => array(
                'statements' => null,
                'identifiers' => array(
                        'type' => 'dataType',
                        'dataTypes' => array( 'external-id' ),
                ),
        ),
);

If you are using the docker images and the template file then you need the ${DOLLAR} too.
Also note, in order for settings changes like this to work with the docker images you will need to create a NEW container, restarting the old one will not work.
Giving https://addshore.com/2018/06/customizing-wikibase-config-in-the-docker-compose-example/ a read should help, note the section about reloading a service.

Mhmmmm ..... still not working somehow, I do:

  1. Add this:
# Add this to separate the identifiers in a separate section
${DOLLAR}wgWBRepoSettings['statementSections'] = array(
        'item' => array(
                'statements' => null,
                'identifiers' => array(
                        'type' => 'dataType',
                        'dataTypes' => array( 'external-id' ),
                ),
        ),
);

to the config file LocalSettings.php.template which is mounted like this:

image: wikibase/wikibase:1.33-bundle
links:
  - mysql
ports:
# CONFIG - Change the 8181 here to expose Wikibase & MediaWiki on a different port
 - "8181:80"
volumes:
  - mediawiki-images-data:/var/www/html/images
  - quickstatements-data:/quickstatements/data
  - ./images:/var/www/html/resources/assets/images
  - ./LocalSettings.php.template:/LocalSettings.php.template
  1. Relaod the image using:
docker-compose up --no-deps -d wikibase
  1. Checking the service doesn't show any change.

Maybe I'm doing something stupid ?!?!?

NOTE: the other configs like the logo where changed without "docker-compose up --no-deps -d wikibase" but just by restarting the containers.

just by restarting the containers.

Which command?

The best way to check is check the values of LocalSettings.php in the container and see if the settings appear there.
Even once the setting is updated it could be that things are cached and you won't see changes until you do a purge of the pages.

Addshore moved this task from Incoming to Ready to estimate on the Wikidata-Campsite board.

Hi I guess the mistake was that the change has not to be done in the:

LocalSettings.php

but in:

extensions/Wikibase/repo/config/Wikibase.example.php

right? Also he is caching. You are right. How can I purge the cache? The one of the browser seams not to suffice .....

Addshore set the point value for this task to 1.Dec 10 2019, 1:18 PM
Addshore moved this task from Ready to estimate to Ready to pick up on the Wikidata-Campsite board.

Perfect! Thank you!

Last point related to this. There seams to be missing some localizations. In german for the Identifier section there is written:
⧼wikibase-statementsection-identifiers⧽

Perfect! Thank you!

Last point related to this. There seams to be missing some localizations. In german for the Identifier section there is written:
⧼wikibase-statementsection-identifiers⧽

Sounds like this needs to be added to Wikibase.
Currently this lives in the WikimediaMessages extension for WIkimedia use only
https://github.com/wikimedia/mediawiki-extensions-WikimediaMessages/search?utf8=%E2%9C%93&q=wikibase-statementsection-identifiers&type=

I'll file a ticket

Change 559183 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Document $wgWBRepoSettings['statementSections']

https://gerrit.wikimedia.org/r/559183

Change 559183 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Document $wgWBRepoSettings['statementSections']

https://gerrit.wikimedia.org/r/559183

For your information, I just added a brief explanation of this feature in the "Advanced Configuration" page