Page MenuHomePhabricator

Wish index page incorrectly assumes translation subpage exists
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to Special:WishlistIntake.
  • Create a new wish in a non-English language (e.g., Hebrew).
  • Navigate to the Community Wishlist table where the new wish appears.
  • Click on the wish link from the table.

What happens?:

  • The link takes you to an English translation subpage (e.g., /en) even though no such subpage exists.
  • The original Hebrew page is bypassed.

What should have happened instead?:

  • The link should point to the original wish page in Hebrew if no translation subpage exists.
  • Only when a valid translation subpage exists should the index link to that subpage.

Other information (browser name/version, screenshots, etc.):


Derived Requirement

Ensure that the Wish Index page correctly links to the appropriate wish page based on available translations. If a translation subpage (e.g., /en) does not exist for a wish, the link should direct users to the original language version of the wish. Only when a valid translation subpage exists should the index link to that translated subpage.

Test Result - Beta|Prod

Status: ✅ PASS / ❓Need More Info / ❌ FAIL
Environment: beta/xyzwiki
OS: macOS Tahoe 26.1
Browser: Chrome 141
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Verify that Wish Index links to the original wish page when no translation subpage exists

  1. Navigate to Special:WishlistIntake.
  2. Create a new wish in a non-English language (e.g., Hebrew).
  3. Go to the Community Wishlist table and locate the new wish entry.
  4. Click on the wish title link in the table.
  5. ✅❓❌⬜ AC1: Confirm that the link directs to the original wish page in Hebrew when no English (or other language) translation subpage exists.

Test Case 2: Verify that Wish Index links to the correct translation subpage when one exists

  1. Create or confirm the existence of a wish with a valid English translation subpage (e.g., /en).
  2. Navigate to the Community Wishlist table.
  3. Click on the wish title link in the table.
  4. ✅❓❌⬜ AC2: Confirm that the link directs to the existing translation subpage when available.

QA Results - Meta Beta

ACStatusDetails
1T404770#11329933
2T404770#11329933

Event Timeline

HMonroy changed the task status from Open to In Progress.Sep 17 2025, 10:43 PM
HMonroy claimed this task.

Is this still a problem? I was not able to reproduce it after creating https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/W4

I am still seeing this on a few wishes in https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/Wishes (e.g. UvU - OwO, צבעים, תוספות לפיצה)

mikez-WMF triaged this task as Medium priority.Oct 14 2025, 7:05 PM

English translations are somehow getting stored, so the list=communityrequests-wishes API thinks it's supposed to serve the English variant, but the API doesn't (and shouldn't) know that the page doesn't actually exist.

In the case of https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/W20 we have:

root@BETA[metawiki]> SELECT * FROM communityrequests_translations WHERE crt_entity = 11055;
+------------+----------+-------------------------+-------------------+
| crt_entity | crt_lang | crt_title               | crt_other_project |
+------------+----------+-------------------------+-------------------+
|      11055 | en       | תוספות לפיצה            | NULL              |
|      11055 | he       | תוספות לפיצה            | NULL              |
+------------+----------+-------------------------+-------------------+
2 rows in set (0.001 sec)

The en row should not be there, considering https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/W20/en does not exist.

We need to catch this bug in the act and examine the CommunityRequests logs to find out why the en translation got saved. Specifically, look for Saved translations for entity Community Wishlist/W123 in the logs (replacing 123 with the correct entity ID).

I messed up on deployment-mwlog02 and accidentally deleted the log file that had the info we needed on W20 😦 (I didn't break anything, I don't think… but the record of what happened to CommunityRequests on 2025-10-13 is forever gone).

I've tried repeatedly to repro this on Beta but was unsuccessful. We have not heard accounts of this happening in production, yet.

@GMikesell-WMF or @dom_walden, assuming you can still repro, can you capture a video of when you create the wish that has mysterious auto-

Confirmed, this happens when voting:

$ ssh deployment-mwlog02.deployment-prep.eqiad1.wikimedia.cloud
$ cp /srv/mw-log/archive/communityrequests.log-20251028.gz ~
$ cd ~
$ gunzip communityrequests.log-20251028.gz
$ cat communityrequests.log-20251028 | grep "W28"
2025-10-24 14:04:14.694039 [66f767de-e3ee-4108-86d5-dc343c822c0d] deployment-mediawiki13 metawiki 1.45.0-alpha communityrequests DEBUG: MediaWiki\Extension\CommunityRequests\HookHandler\CommunityRequestsHooks::onParserAfterTidy: Replacing voting strip marker in Community Wishlist/W28/Votes with vote count 1 {"0":"Community Wishlist/W28/Votes","1":1,"context.api_module_name":"edit","context.api_client_useragent":"communityrequests_random_voting (betameta:en; User:Voter1) Pywikibot/10.3.0.dev0 (g19695) requests/2.32.3 Python/3.11.2.final.0"} 
2025-10-24 14:04:16.395771 [66f767de-e3ee-4108-86d5-dc343c822c0d] deployment-mediawiki13 metawiki 1.45.0-alpha communityrequests DEBUG: MediaWiki\Extension\CommunityRequests\HookHandler\CommunityRequestsHooks::onLinksUpdateComplete: Saving [0:Community_Wishlist/W28/Votes] with data: {"status":"in-progress","type":"bug","title":"215\u05e1\u05d9\u05e0\u05d9\u05d2\u05e0\u05d2","focusarea":"FA14","description":null,"audience":"","tags":"search,changelists,wikidata","phabtasks":"","proposer":"Georgemikesell","votecount":1,"created":"2025-10-23T18:23:13Z","updated":"2025-10-23T18:23:14Z","baselang":"he","entitytype":"wish","lang":"en"} ["[0:Community_Wishlist/W28/Votes]","{\"status\":\"in-progress\",\"type\":\"bug\",\"title\":\"215\\u05e1\\u05d9\\u05e0\\u05d9\\u05d2\\u05e0\\u05d2\",\"focusarea\":\"FA14\",\"description\":null,\"audience\":\"\",\"tags\":\"search,changelists,wikidata\",\"phabtasks\":\"\",\"proposer\":\"Georgemikesell\",\"votecount\":1,\"created\":\"2025-10-23T18:23:13Z\",\"updated\":\"2025-10-23T18:23:14Z\",\"baselang\":\"he\",\"entitytype\":\"wish\",\"lang\":\"en\"}"] 
2025-10-24 14:04:16.404149 [66f767de-e3ee-4108-86d5-dc343c822c0d] deployment-mediawiki13 metawiki 1.45.0-alpha communityrequests DEBUG: MediaWiki\Extension\CommunityRequests\Wish\WishStore::save: Saved wish [0:Community_Wishlist/W28] with data {"cr_entity_type":0,"cr_page":11093,"cr_base_lang":"he","cr_actor":212805147,"cr_wish_type":1,"cr_status":7,"cr_focus_area":11054,"cr_created":"20251023182313","cr_updated":"20251024140416","cr_vote_count":1} ["[0:Community_Wishlist/W28]","{\"cr_entity_type\":0,\"cr_page\":11093,\"cr_base_lang\":\"he\",\"cr_actor\":212805147,\"cr_wish_type\":1,\"cr_status\":7,\"cr_focus_area\":11054,\"cr_created\":\"20251023182313\",\"cr_updated\":\"20251024140416\",\"cr_vote_count\":1}"] 
2025-10-24 14:04:16.407312 [66f767de-e3ee-4108-86d5-dc343c822c0d] deployment-mediawiki13 metawiki 1.45.0-alpha communityrequests DEBUG: MediaWiki\Extension\CommunityRequests\AbstractWishlistStore::saveTranslations: Saved translations for entity [0:Community_Wishlist/W28] with data {"crt_entity":11093,"crt_lang":"en","crt_title":"215\u05e1\u05d9\u05e0\u05d9\u05d2\u05e0\u05d2"} ["[0:Community_Wishlist/W28]","{\"crt_entity\":11093,\"crt_lang\":\"en\",\"crt_title\":\"215\\u05e1\\u05d9\\u05e0\\u05d9\\u05d2\\u05e0\\u05d2\"}"]

On the last line, we see this results in an English translation erroneously being saved. I can repro on my local, too.

Change #1199537 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CommunityRequests@master] CommunityRequestsHooks: always use base lang when casting votes

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

@HMonroy Hope you don't mind me snatching this task! I understood from today's check-in that no one was working on this.

Change #1199537 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] CommunityRequestsHooks: always use base lang when casting votes

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

@HMonroy Hope you don't mind me snatching this task! I understood from today's check-in that no one was working on this.

Don't mind at all. Good find :)

HMonroy changed the task status from In Progress to Open.Oct 29 2025, 10:28 PM
HMonroy moved this task from Feedback and Review to QA on the Community-Tech (Sea Lion Squad) board.

@MusikAnimal We'll check back on Monday to see if it created anything or not and I'll test the rest.

UPDATE 11/3- As seen AC2, waiting for 5 days, it did not create an en subpage. I will move this now to Sign-off. Thanks for all your work!

Test Result - Meta Beta

Status: ✅ PASS
Environment: Meta Beta
OS: macOS Tahoe 26.1
Browser: Chrome 141
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/W31

Test Steps

Test Case 1: Verify that Wish Index links to the original wish page when no translation subpage exists

  1. Navigate to Special:WishlistIntake.
  2. Create a new wish in a non-English language (e.g., Hebrew).
  3. Go to the Community Wishlist table and locate the new wish entry.
  4. Click on the wish title link in the table.
  5. AC1: Confirm that the link directs to the original wish page in Hebrew when no English (or other language) translation subpage exists.

Test Case 2: Verify that Wish Index links to the correct translation subpage when one exists

  1. Create or confirm the existence of a wish with a valid English translation subpage (e.g., /en).
  2. Navigate to the Community Wishlist table.
  3. Click on the wish title link in the table.
  4. AC2: Confirm that the link directs to the existing translation subpage when available.

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated Other Assignee, added: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.