Page MenuHomePhabricator

make the Property namespace on Wikidata a content namespace
Closed, ResolvedPublic3 Estimated Story Points

Description

Problem:
Right now the main (Item), Lexeme and Entity Schema namespaces are configured as content namespaces on Wikidata. Properties are also content so the Property namespace should also be configured to be a content namespace.

Acceptance criteria:

  • the Property namespace's configuration is changed to be a content namespace

Open questions:

  • Any potential unwanted side-effects we should be aware of?

Event Timeline

Any potential unwanted side-effects we should be aware of?

Judging by T195321, we might need to coordinate this with the Search team. (Or maybe not, if properties are already in the “content” index?)

I also don’t know how we’ll update the number of content pages in the site statistics – I think updateArticleCount.php is too slow, it would miss page creations that happened while the script was running. Can we just manually issue an SQL statement that adds the number of properties to the counter?

I also don’t know how we’ll update the number of content pages in the site statistics – I think updateArticleCount.php is too slow, it would miss page creations that happened while the script was running. Can we just manually issue an SQL statement that adds the number of properties to the counter?

initSiteStats.php is run every day. See T315121: After new wikis are created/imported from Incubator, statistics should be updated

Note on CirrusSearch and the search indices: this should have no impact as Properties are already part of wgNamespacesToBeSearchedDefault and thus already considered "content" for CirrusSearch so moving this namespace (120) to wgContentNamespaces will be a noop for CirrusSearch.

There are two issues that I noted during the page-count problems the other month, and neither are a blocker here but if we're changing content namespaces it might be a good time to think about them -

  • Special:Statistics and the main page display a count of pages in content namespaces: however it currently says 'data items' and I think most people assume this means Q-items rather than Q-items + lexemes etc. So this may be worth rephrasing.
  • The Special:Random search defaults to all content namespaces - I think we discussed this a couple of months back on the Telegram chat? Q-items are still overwhelmingly going to be the most common type of thing here (about 150x more common than lexemes, 9500x more common than properties) but "random item" might still need rephrased, or else the sidebar link changed to be namespace-specific.

There are two issues that I noted during the page-count problems the other month, and neither are a blocker here but if we're changing content namespaces it might be a good time to think about them -

  • Special:Statistics and the main page display a count of pages in content namespaces: however it currently says 'data items' and I think most people assume this means Q-items rather than Q-items + lexemes etc. So this may be worth rephrasing.

https://www.wikidata.org/wiki/Template:Numberofarticles should be used instead but we need a bot to regularly update it.

  • The Special:Random search defaults to all content namespaces - I think we discussed this a couple of months back on the Telegram chat? Q-items are still overwhelmingly going to be the most common type of thing here (about 150x more common than lexemes, 9500x more common than properties) but "random item" might still need rephrased, or else the sidebar link changed to be namespace-specific.

This can be fixed by changing https://www.wikidata.org/w/index.php?title=MediaWiki:Randompage-url&action=edit to "Special:Random/" (note the slash) which will redirect to a random item (and not property or lexeme).

Task Breakdown Note

  • This change takes place in InitialiseSettings.php in mediawiki-config
  • Property should be added to the variable wgContentNamespaces

Change 862247 had a related patch set uploaded (by Guergana Tzatchkova; author: Guergana Tzatchkova):

[operations/mediawiki-config@master] Add Property (120) to Wikidata content Namespace

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

Change 862247 merged by jenkins-bot:

[operations/mediawiki-config@master] Add Property (120) to Wikidata content Namespace

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

Mentioned in SAL (#wikimedia-operations) [2022-12-05T14:08:59Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:862247|Add Property (120) to Wikidata content Namespace (T321282)]]

Mentioned in SAL (#wikimedia-operations) [2022-12-05T14:18:02Z] <samtar@deploy1002> samtar and gtzatchkova: Backport for [[gerrit:862247|Add Property (120) to Wikidata content Namespace (T321282)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet

To test check here (a query to wikidata's siteinfo namespaces) that 120 has the attribute content set to true

Mentioned in SAL (#wikimedia-operations) [2022-12-05T14:25:59Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:862247|Add Property (120) to Wikidata content Namespace (T321282)]] (duration: 16m 59s)