Page MenuHomePhabricator

Suppress a Wikidata value in a Wikipedia article that uses a 'Wikidata by default' infobox _without overwriting it_ in the article Wikitext
Open, Needs TriagePublic


Sometimes you insert an infobox in a Wikipedia article and you want to suppress a Wikidata value without overwriting it in the article Wikitext.

In other words: A 'Wikidata by default' infobox triggers a Wikidata value, but sometimes, you just don't want to have that specific statement in your infobox in that specific article.

The current workaround is as follows (see this example):
– Insert an infobox in a Wikipedia article.
– The infobox automatically displays a value from Wikidata.
– Overwrite that value by inserting an invisible custom value such as a non-breaking speace.
– The infobox then displays a line with an empty value.

Proposed solution:
– There should be a command such as FETCH_WIKIDATA=no that can be inserted into the infobox Wikitext to suppress the Wikidata value without having to overwrite it.
– The infobox then does not display a line with not content but just behaves as if there were no value on Wikidata.

Current documentation: :d:Wikidata:Infobox_Tutorial#Wikidata by default infobox

Related thread on German Wikipedia: :de:Wikipedia:Fragen zur Wikipedia#Über Wikidata in Vorlage automatisches eingebundenes Bild unterdrücken

Thank you for your patience if this bug is already solved somehow, or if my description is difficult to understand.

Event Timeline

Gnom1 created this task.Feb 10 2019, 2:54 PM
Izno added subscribers: RexxS, Izno.Feb 10 2019, 3:23 PM

Module:WikidataIB should already do this I think? @RexxS

Gnom1 updated the task description. (Show Details)Feb 10 2019, 3:31 PM
Gnom1 updated the task description. (Show Details)Feb 11 2019, 11:07 AM
RexxS added a comment.Feb 11 2019, 5:34 PM

If you use the WikidataIB module, you have to specify |fetchwikidata=ALL in the article to enable fetching info from Wikidata. That ensures that in each article, there has to be an active effort to "opt-in" to the use of Wikidata.

There is then the opportunity at the article level to specify |suppressfields=fieldname that will completely suppress any value in the field called 'fieldname' in that article.

This is all documented at - hope that helps.

Gnom1 added a comment.Feb 11 2019, 5:39 PM

Just to make sure: I am looking for a solution that works not for the infobox template in general, but only in one specific Wikipedia article.

I am saying this because I don't understand the document that you pointed me to... Maybe you can show me how your solution works by modifying the example German Wikipedia article that I pointed to in the bug description?

RexxS added a comment.Feb 11 2019, 7:03 PM

I can't do that because your infobox fetches references directly from Wikidata, which isn't realistic to implement on English Wikipedia, so I haven't implemented it.

However, you can see how it works by looking at for example. It fetches values from Wikidata (but uses a locally-supplied value for the image caption). It uses the infobox .

You can see the effect of suppressing the birth date value at (second infobox).

If you think that you are likely to want to use Module:WikidataIB as a replacement on de-wiki, then I could implement returning references, but you'll need to understand the documentation. Can you tell me what you don't understand in the present documentation so that I can fix it?

Gnom1 added a comment.Feb 12 2019, 8:31 AM

Well – how can I suppress the Wikidata value for "screenshot" in the article :de:Signal (Messenger) without having to overwrite it with a non-breaking space?

RexxS added a comment.Feb 12 2019, 2:35 PM

You use an infobox based on a module that permits suppression of named fields.

Gnom1 added a comment.Feb 12 2019, 4:04 PM

I'm sorry since I don't know how infoboxes technically work, I can't do that. So we do have a bug here that requires fixing, right?

RexxS added a comment.Feb 13 2019, 5:01 PM

We have functionality that you'd like to have, but that is not implemented at present. I wouldn't call that a bug.