Newly created wishes in non-English languages do not immediately render with correct RTL and localized labels until cache is purged
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
GMikesell-WMF
Sep 16 2025, 5:56 PM
Referenced Files
F66724181: FA_Hebrew.mp4
Oct 3 2025, 5:44 PM
F66724229: FA_RTL.mp4
Oct 3 2025, 5:44 PM
F66720398: Hebrew_FA.mp4
Oct 2 2025, 6:17 PM
F66717455: 2025-10-01_12-13-18.mp4
Oct 1 2025, 8:32 PM
F66714774: 2025-09-30_15-36-41.mp4
Sep 30 2025, 10:50 PM
F66714767: 2025-09-30_15-36-08.mp4
Sep 30 2025, 10:50 PM
F66714765: 2025-09-30_15-32-52.mp4
Sep 30 2025, 10:50 PM
F66711253: 2025-09-29_13-39-39.mp4
Sep 29 2025, 9:27 PM

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).
  • After submission, view the wish on the wish index page or its dedicated wish page, than click "Support Wish".

What happens?:
The wish appears, but it does not immediately render in the correct language direction (RTL for Hebrew).

What should have happened instead?:
As soon as the wish is created, it should display immediately with the correct language direction (RTL for Hebrew) and with localized labels, without requiring a cache purge.

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


Derived Requirement

Ensure that newly created wishes in non-English languages (e.g., Hebrew) are immediately rendered correctly without requiring a cache purge:

  • Wishes must respect language direction (e.g., RTL for Hebrew, Arabic).
  • Wishes must display localized labels according to the selected language.
  • Rendering should update instantly upon creation, both in:
    • The wish index page
    • The dedicated wish page
  • Cache invalidation or equivalent mechanism must be applied so the latest localization is visible without manual purge.
Test Steps

Test Case 1: Wish Creation in RTL Language

  1. Navigate to Special\:WishlistIntake.
  2. Create a new wish in Hebrew.
  3. Submit and view the wish on the wish index page.
  4. ✅❓❌⬜ AC1: The wish text is displayed in RTL format immediately (no purge required) and the labels (e.g., “Support Wish”) are shown in Hebrew.

Test Case 2: Dedicated Wish Page Rendering

  1. From the index, click into the dedicated wish page of the newly created Hebrew wish.
  2. ✅❓❌⬜ AC2: The wish content is displayed in RTL correctly and all UI labels appear in Hebrew (localized).

Test Case 3: Support Wish Button

  1. On the dedicated wish page, click Support Wish.
  2. ✅❓❌⬜ AC3: The button text is localized.

QA Results - Meta Beta

ACStatusDetails
1T404748#11226990
2T404748#11242417
3T404748#11226990

Event Timeline

MusikAnimal triaged this task as High priority.EditedSep 16 2025, 6:19 PM

Not a blocker to deployment, but this should be fixed.

The problem: By the time we get to CommunityRequestsHooks::RevisionDataUpdates – which is where we change the page language to the user's language – the parser output is already cached. Ideally we'd set the page language earlier in the process, which is what we tried to do originally but I couldn't get it to work.

So, we can just go the cheap route here. After an entity is saved in the LinksUpdateComplete hook handler, we can call WikiPage::updateParserCache() on that page (and/or WikiPage::doPurge() if that's also necessary). It may be that this requires a refresh, which maybe we can't do from the hook handlers, but at least then any subsequent visit to the entity page will have the correct parser output.

I can't repro on my local, but I'm going to unlick anyway to shift focus to the higher-priority task T404763: Display list of wishes in focus area page

Not a blocker to deployment, but this should be fixed.

The problem: By the time we get to CommunityRequestsHooks::RevisionDataUpdates – which is where we change the page language to the user's language – the parser output is already cached. Ideally we'd set the page language earlier in the process, which is what we tried to do originally but I couldn't get it to work.

So, we can just go the cheap route here. After an entity is saved in the LinksUpdateComplete hook handler, we can call WikiPage::updateParserCache() on that page (and/or WikiPage::doPurge() if that's also necessary). It may be that this requires a refresh, which maybe we can't do from the hook handlers, but at least then any subsequent visit to the entity page will have the correct parser output.

I'll take a stab at it since there aren't a lot of high priority bugs left. Worst case we can go "the cheap route" until we figure out something better.

dmaza changed the task status from Open to In Progress.Sep 17 2025, 1:58 PM
dmaza claimed this task.

Change #1190292 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/extensions/CommunityRequests@master] Update parser cache after saving entity

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

Change #1190292 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Update parser cache after saving entity

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

@dmaza Can you please review AC2? Thanks!

Test Result - Meta Beta

Status: ✅ PASS ❌ FAIL
Environment: Meta Beta
OS: macOS Tahoe 26.0
Browser: Chrome 140
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Wish Creation in RTL Language

  1. Navigate to Special\:WishlistIntake.
  2. Create a new wish in Hebrew.
  3. Submit and view the wish on the wish index page.
  4. AC1: The wish text is displayed in RTL format immediately (no purge required) and the labels (e.g., “Support Wish”) are shown in Hebrew.
WishFocus

Test Case 2: Dedicated Wish Page Rendering

  1. From the index, click into the dedicated wish page of the newly created Hebrew wish.
  2. AC2: The wish content is displayed in RTL correctly and all UI labels appear in Hebrew (localized).

If the preference is Hebrew, when you click on it on the table, shouldn't it show in RTL

WishFocus

Test Case 3: Support Wish Button

  1. On the dedicated wish page, click Support Wish.
  2. AC3: The button text is localized.

@dmaza Can you please review AC2? Thanks!

yeah I see it. That's not supposed to happen. I'll take a look.

Change #1192598 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/extensions/CommunityRequests@master] Call WikiPage::doPurge to try and clear cache after language is set

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

Change #1192598 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Call WikiPage::doPurge to try and clear cache after language is set

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

@dmaza Please review Focus and the new error that came up, thanks!

Test Case 2: Dedicated Wish Page Rendering

  1. From the index, click into the dedicated wish page of the newly created Hebrew wish.
  2. AC2: The wish content is displayed in RTL correctly and all UI labels appear in Hebrew (localized).
✅Wish❌Focus

❌ New Error when Page language is Hebrew and Table language is Hebrew. The Title is no longer a link. If you want me to create a separate task, please let me know or if here is fine.

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

[mediawiki/extensions/CommunityRequests@wmf/1.45.0-wmf.21] Call WikiPage::doPurge to try and clear cache after language is set

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

Change #1192655 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@wmf/1.45.0-wmf.21] Call WikiPage::doPurge to try and clear cache after language is set

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

Mentioned in SAL (#wikimedia-operations) [2025-10-01T01:41:35Z] <musikanimal@deploy2002> Started scap sync-world: Backport for [[gerrit:1192655|Call WikiPage::doPurge to try and clear cache after language is set (T404748)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-01T01:46:42Z] <musikanimal@deploy2002> musikanimal: Backport for [[gerrit:1192655|Call WikiPage::doPurge to try and clear cache after language is set (T404748)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-01T01:52:21Z] <musikanimal@deploy2002> Finished scap sync-world: Backport for [[gerrit:1192655|Call WikiPage::doPurge to try and clear cache after language is set (T404748)]] (duration: 10m 47s)

@dmaza Please review Focus and the new error that came up, thanks!
❌ New Error when Page language is Hebrew and Table language is Hebrew. The Title is no longer a link. If you want me to create a separate task, please let me know or if here is fine.

Yes, please, a new task would be great. That issue looks unrelated to the work done here.

@dmaza Please review Focus and the new error that came up, thanks!
❌ New Error when Page language is Hebrew and Table language is Hebrew. The Title is no longer a link. If you want me to create a separate task, please let me know or if here is fine.

Yes, please, a new task would be great. That issue looks unrelated to the work done here.

@dmaza I created T406173: Wish title is not a link when Page language and Table language are both Hebrew regarding the separate issue. The current issue still exists, but it has also been compounded by another one, as seen in the FA video. Not only does it not render to RTL, but the OwO - UwU FA card disappears. I'm not sure if you want me to create another task for that one, too. Just let me know.

Test Case 2: Dedicated Wish Page Rendering

  1. From the index, click into the dedicated wish page of the newly created Hebrew wish.
  2. AC2: The wish content is displayed in RTL correctly and all UI labels appear in Hebrew (localized).
✅Wish❌Focus

@dmaza Ran a new one and when creating it and FA, it did not render to RTL. Along with just keeping 2 FA cards besides the 4 that are shown and Title not linked of course.

Test Case 2: Dedicated Wish Page Rendering

  1. From the index, click into the dedicated wish page of the newly created Hebrew wish.
  2. AC2: The wish content is displayed in RTL correctly and all UI labels appear in Hebrew (localized).
Focus Area

@dmaza As for the RTL, once there was an ?action=purge, this clear up the old bug and any new Hebrew wish now renders to RTL instantly, as seen below. It was noticed that it will show in English but when switching to Hebrew in the index table, it will not show up unless your purge. I created T406368: Focus Area index cards require cache purge before new entities appear when table is in Hebrew. I will mark this task as Resolved. Thanks for all your work!

RTL
Missing FA Card unless Purged
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.