Page MenuHomePhabricator

Show Item labels on Newcomer Homepage
Closed, ResolvedPublic

Description

Currently the newcomer homepage shows editors their most viewed Items they've edited, but they appear as QIDs instead of their Labels.

https://www.wikidata.org/wiki/Special:Homepage

We need to update the QIDs to their labels

image.png (712×436 px, 39 KB)

Acceptance Criteria

  • The items on the Newcomer Homepage are shown by their labels
  • tests are updated accordingly

Newcomer homepage repo: https://github.com/wikimedia/mediawiki-extensions-GrowthExperiments

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

This task and T429345: Update text on Newcomer Homepage require a wikidata specific implementation of the newcomer homepage. I've stop worked on this ticket to address this in T429345 and recommend that this task not be picked up until T429345 is done

Change #1329305 had a related patch set uploaded (by Sadiya.mohammed13; author: Sadiya.mohammed13):

[mediawiki/extensions/GrowthExperiments@master] Show Item labels on newcomer homepage

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

Change #1329305 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Show Item labels on newcomer homepage

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

Etonkovidova subscribed.

@Sadiya.Mohammed_WMDE - when checking today wikidata wmf.21 (the patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/1329305 is supposed to be deployed to wmf.21), I did not see the labels displayed in the Impact module. Below is the screenshot from my test account:

Screenshot 2026-09-24 at 5.51.12 PM.png (2,372×1,640 px, 285 KB)

What I did to test

  • browser refreshing page did not help
  • ?action=purge Special:Homepage did not do anything
  • the items have English label, Q567189 has
  • the API response includes only QIDs:
"topViewedArticles": {
   "Q76385": {
     "imageUrl": "//thumb.wikimedia.org/wikipedia/commons/thumb/1/1d/Ulrike_Folkerts_beim_SWR_Sommerfestival_2013_in_Mainz_zur_Tatortpremiere.jpg/40px-Ulrike_Folkerts_beim_SWR_Sommerfestival_2013_in_Mainz_zur_Tatortpremiere.jpg?utm_source=www.wikidata.org&utm_campaign=rest&utm_content=thumbnail",
     "firstEditDate": "2018-01-10",
     "newestEdit": "20180110230023",
     "views": {
       "2026-07-29": 1,
       "2026-08-11": 1,
       "2026-08-12": 1,
       "2026-08-16": 1,
       "2026-08-19": 1,
       "2026-08-29": 2,
       "2026-08-31": 1,
       "2026-09-03": 1,
       "2026-09-12": 1,
       "2026-09-15": 1,
       "2026-09-16": 1,
       "2026-09-17": 1
     },
     "viewsCount": 13,
     "pageviewsUrl": "https://pageviews.wmcloud.org/?project=www.wikidata.org&userlang=en&start=2026-07-26&end=2026-09-17&pages=Q76385"
   }

On test.wikidata.org and wikidata.beta.wmcloud.org I edited a QID page displayed on Special:Homepage, hoping to trigger cache refresh, but the items in the Impact module still display QUID instead of labels.

Thank you @Etonkovidova We'll check on the proposed solution again and see what is still missing and get back to you soon.

Change #1346025 had a related patch set uploaded (by Sadiya.mohammed13; author: Sadiya.mohammed13):

[mediawiki/extensions/GrowthExperiments@master] Fix Wikidata labels in newcomer impact module

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

Change #1346025 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix Wikidata labels in newcomer impact module

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

Change #1348726 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] UserDatabaseHelper: Consider all content namespaces

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

@mahmoud.abdelsattar.wmde I have finalised the patch that ensures GrowthExperiments considers any content namespace.

@mahmoud.abdelsattar.wmde let us know if you were able to merge the change locally and test.

Hello @DMburugu and @Urbanecm_WMF .. thank you for providing the patch, I've tested it locally and it still not showing all the namespaces as before.
Is there something missing?
Note: I tested the Special:Homepage and Special:Impact/{Username} pages.

I'm confused... I thought the patch worked when I shared it via the call? Are you saying the initial version and the final one behave differently on your local system?

@Urbanecm_WMF When we tested it, it worked (maybe it was caching, even when I cleared it), but now it doesn't for both versions.

@Urbanecm_WMF When we tested it, it worked (maybe it was caching, even when I cleared it), but now it doesn't for both versions.

Weird... I'll take a look then.

FWIW it works on Wikidata for me now:

image.png (1,538×1,182 px, 255 KB)

The problem/difference is that local setup apparently uses different namespace IDs than Wikidata production.

FWIW it works on Wikidata for me now:

image.png (1,538×1,182 px, 255 KB)

The problem/difference is that local setup apparently uses different namespace IDs than Wikidata production.

Yeah. Wikidata uses the main namespace for Items and other Wikibase installations have a dedicated Item namespace by default.

@Arian_Bozorg on production or when testing the patch locally?

@Arian_Bozorg on production or when testing the patch locally?

Hello @DMburugu The scope of the task is actually done, and we can consider this task to be "Resolved".

The patch for covering all the namsespaces was not working, which is a side issue not in the scope of the current task (it was a workaround proposal from @Urbanecm_WMF to make the items to be working locally).

DMburugu claimed this task.

Hello @DMburugu The scope of the task is actually done, and we can consider this task to be "Resolved".

I'll resolve this based on your feedback. Glad we could work together on this.