Page MenuHomePhabricator

Newly translated sections of articles always placed at the bottom
Closed, ResolvedPublic8 Estimated Story PointsFeature

Description

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

  • Start translating a new section of an article using a mobile device
  • Finish the section and publish
  • Check the published section in that language you translated it to

What happens?:
The published section always appears at the bottom.

What should have happened instead?:
The published section should automatically be arranged in the format of the source article.

An example of this issue can be seen below:

Screenshot_20250211_105903_Chrome.jpg (6×1 px, 382 KB)

https://ig.wikipedia.org/wiki/Suleika_Jaouad
Someone also reported this issue here: https://www.mediawiki.org/wiki/Talk:Content_translation#c-%E3%81%A6%E3%82%90-20250201023100-Section_being_positioned_at_the_bottom

Also mentioned here T279910 as a feature request


Derived Requirement

Ensure that newly translated sections published from the Content Translation tool retain the correct structural position of the section as it appears in the source article. The translated section should not default to the bottom of the target article but instead appear in its proper order relative to other sections.

Test Steps

Test Case 1: Verify section placement matches source article order

  1. On a mobile device, open the Content Translation dashboard.
  2. Start translating a section from an existing article (e.g., a mid-article section).
  3. Complete and publish the translation.
  4. Open the published article in the target language.
  5. ✅❓❌⬜ AC1: Confirm that the translated section appears in the same relative position as in the source article, not at the bottom of the page.

Test Case 2: Validate multiple section translations maintain order

  1. Translate and publish multiple sections from the same source article (e.g., an introduction, body, and conclusion section).
  2. ✅❓❌⬜ AC2: Confirm that each translated section appears in its corresponding order relative to the source article.

QA Results - TestWiki

ACStatusDetails
1T386131#11247929
2T386131#11342871

Details

Related Changes in Gerrit:
SubjectRepoBranchLines +/-
mediawiki/extensions/ContentTranslationmaster+2 -2
mediawiki/extensions/ContentTranslationwmf/1.45.0-wmf.17+2 -2
operations/mediawiki-configmaster+2 -0
mediawiki/extensions/ContentTranslationwmf/1.45.0-wmf.17+3 -3
mediawiki/extensions/ContentTranslationmaster+3 -3
operations/mediawiki-configmaster+2 -0
mediawiki/extensions/ContentTranslationmaster+102 -84
mediawiki/extensions/ContentTranslationmaster+3 K -3 K
mediawiki/extensions/ContentTranslationmaster+219 -40
mediawiki/extensions/ContentTranslationmaster+395 -1
mediawiki/extensions/ContentTranslationmaster+1 -1
mediawiki/extensions/ContentTranslationmaster+651 -63
mediawiki/extensions/ContentTranslationmaster+117 -4
mediawiki/extensions/ContentTranslationmaster+50 -10
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
PWaigi-WMF updated the task description. (Show Details)
Restricted Application added a subscriber: alaa. · View Herald TranscriptJun 2 2025, 1:16 PM
SBisson raised the priority of this task from Low to Medium.Jul 15 2025, 5:35 PM

Change #1172705 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@master] Automatic section positioning based on source article order

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

SBisson changed the subtype of this task from "Bug Report" to "Feature Request".Jul 29 2025, 5:58 PM

Change #1174660 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Add logging in section position calculation

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

Change #1174660 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Add logging in section position calculation

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

Change #1174820 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@master] New section positioning based on section mappings

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

Change #1172705 abandoned by Sbisson:

[mediawiki/extensions/ContentTranslation@master] Automatic section positioning based on source article order

Reason:

New patch: Ica5529d1d1dfd9ebaa8951815e5db5a33c45b37a

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

Nikerabbit changed the task status from Open to In Progress.Aug 12 2025, 7:18 AM

Change #1180818 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Copy "calculateSectionPosition" functionality to frontend

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

Change #1180825 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Use calculateSectionPosition to properly position section placeholder

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

Change #1174820 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] New section positioning based on section mappings (server-side only)

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

Change #1181705 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Use "rawurlencode" instead of "urlencode" when fetching section mappings

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

Change #1181705 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Use "rawurlencode" instead of "urlencode" when fetching section mappings

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

Change #1180818 abandoned by Nik Gkountas:

[mediawiki/extensions/ContentTranslation@master] CX: Copy "calculateSectionPosition" functionality to frontend

Reason:

Section position calculation will remain in server-side, at least for now.

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

Change #1180825 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add findNextSectionForPlaceholder to properly position placeholder

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

Change #1183148 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Add CXServerClient service for server-side requests to cxserver

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

Change #1183660 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250901

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

Change #1183703 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[operations/mediawiki-config@master] ContentTranslation: Add cxserver host for server-side requests

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

Change #1183660 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250901

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

Change #1183148 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Add CXServerClient service for server-side requests to cxserver

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

Change #1183703 merged by jenkins-bot:

[operations/mediawiki-config@master] ContentTranslation: Add cxserver host for server-side requests

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

Mentioned in SAL (#wikimedia-operations) [2025-09-02T14:02:44Z] <kartik@deploy1003> Started scap sync-world: Backport for [[gerrit:1183703|ContentTranslation: Add cxserver host for server-side requests (T386131)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-02T14:09:35Z] <kartik@deploy1003> kartik, ngkountas: Backport for [[gerrit:1183703|ContentTranslation: Add cxserver host for server-side requests (T386131)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Change #1184109 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CxServerClient: Log url instead of relative path upon failure

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

Change #1184112 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[operations/mediawiki-config@master] ContentTranslation: Add cxserver host for server-side requests

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

Change #1184109 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CxServerClient: Log url instead of relative path upon failure

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

Change #1184122 had a related patch set uploaded (by Sbisson; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.17] CxServerClient: Log url instead of relative path upon failure

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

Change #1184122 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.17] CxServerClient: Log url instead of relative path upon failure

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

Mentioned in SAL (#wikimedia-operations) [2025-09-03T07:37:30Z] <kartik@deploy1003> Started scap sync-world: Backport for [[gerrit:1184122|CxServerClient: Log url instead of relative path upon failure (T386131)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-03T07:44:29Z] <kartik@deploy1003> kartik, sbisson: Backport for [[gerrit:1184122|CxServerClient: Log url instead of relative path upon failure (T386131)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-03T07:54:17Z] <kartik@deploy1003> Finished scap sync-world: Backport for [[gerrit:1184122|CxServerClient: Log url instead of relative path upon failure (T386131)]] (duration: 16m 46s)

Change #1184112 merged by jenkins-bot:

[operations/mediawiki-config@master] ContentTranslation: Add cxserver host for server-side requests

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

Mentioned in SAL (#wikimedia-operations) [2025-09-03T07:56:14Z] <kartik@deploy1003> Started scap sync-world: Backport for [[gerrit:1184112|ContentTranslation: Add cxserver host for server-side requests (T386131)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-03T08:03:11Z] <kartik@deploy1003> ngkountas, kartik: Backport for [[gerrit:1184112|ContentTranslation: Add cxserver host for server-side requests (T386131)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Change #1184479 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX section positioning: Fix cxserver requests to include /v2 in the URL

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

Mentioned in SAL (#wikimedia-operations) [2025-09-03T08:42:00Z] <kartik@deploy1003> Finished scap sync-world: Backport for [[gerrit:1184112|ContentTranslation: Add cxserver host for server-side requests (T386131)]] (duration: 45m 46s)

Change #1184481 had a related patch set uploaded (by KartikMistry; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.17] CX section positioning: Fix cxserver requests to include /v2 in the URL

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

Change #1184481 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.17] CX section positioning: Fix cxserver requests to include /v2 in the URL

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

Mentioned in SAL (#wikimedia-operations) [2025-09-03T09:01:43Z] <kartik@deploy1003> Started scap sync-world: Backport for [[gerrit:1184481|CX section positioning: Fix cxserver requests to include /v2 in the URL (T386131)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-03T09:05:54Z] <kartik@deploy1003> kartik: Backport for [[gerrit:1184481|CX section positioning: Fix cxserver requests to include /v2 in the URL (T386131)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Change #1184479 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX section positioning: Fix cxserver requests to include /v2 in the URL

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

Mentioned in SAL (#wikimedia-operations) [2025-09-03T09:21:09Z] <kartik@deploy1003> Finished scap sync-world: Backport for [[gerrit:1184481|CX section positioning: Fix cxserver requests to include /v2 in the URL (T386131)]] (duration: 19m 26s)

Nikerabbit set the point value for this task to 8.Sep 4 2025, 10:57 AM

@SBisson Can you please review the issue I came across below? If you have any questions, please let me know. Thanks!

Test Result - TestWiki

Status: ✅ PASS ❌ FAIL
Environment: TestWiki (mobile skin - Minerva)
OS: macOS Tahoe 26.0.1
Browser: Chrome 140
Device: MBA
Emulated Device: iPhone 14 Pro Max (Console)

Test Artifact(s):

Test Steps

Test Case 1: Verify section placement matches source article order

  1. On a mobile device, open the Content Translation dashboard.
  2. Start translating a section from an existing article (e.g., a mid-article section).
  3. Complete and publish the translation.
  4. Open the published article in the target language.
  5. AC1: Confirm that the translated section appears in the same relative position as in the source article, not at the bottom of the page.

Translated new section "Musical Style", which should appear BEFORE "Discography", on which it appeared in the correct order and not at the bottom

Test Case 2: Validate multiple section translations maintain order

  1. Translate and publish multiple sections from the same source article (e.g., an introduction, body, and conclusion section).
  2. AC2: Confirm that each translated section appears in its corresponding order relative to the source article.

✅ Translated new section "Awards and nomination", which should appear AFTER "Discography", on which it appeared in the correct order and not at the bottom on desktop.

❌ Issue

On desktop, it shows all the sections. When you switch it to mobile, you don't see all the sections unless you click on the section of "Miembros". You also see it in AC1 when translating a new section; it does not appear in mobile.

@GMikesell-WMF the issue you highlighted above with the Northlane article on testwiki was due to bad markup (missing </div>). I fixed it on testwiki and the original Spanish wiki article

@SBisson Ok thanks for the update! I see it now from the video below. I will mark this as Sign-off. Thanks for all the work!

Test Case 2: Validate multiple section translations maintain order

  1. Translate and publish multiple sections from the same source article (e.g., an introduction, body, and conclusion section).
  2. AC2: Confirm that each translated section appears in its corresponding order relative to the source article.

✅ Translated new section "Awards and nomination", which should appear AFTER "Discography", on which it appeared in the correct order and not at the bottom on desktop.

✅ Mobile

On desktop, it shows all the sections. When you switch it to mobile, you don't see all the sections unless you click on the section of "Miembros". You also see it in AC1 when translating a new section; it does not appear in mobile.

Update: Your markup update resolved the issue.

Nikerabbit moved this task from Design Signoff to Product Signoff on the LPL Hypothesis board.
Nikerabbit subscribed.

Thanks!