Page MenuHomePhabricator

In article previews on Special:NewPagesFeed, the table of contents for the article appears in the interface language of its latest editor instead of the content language
Closed, ResolvedPublicBUG REPORT

Description

Originally reported at w:en:Wikipedia:Village pump (technical).

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

A working example created by @PrimeHunter exists on testwiki: w:test:NewPagesFeed language test.

  • On w:test:Special:Preferences, set your interface language to a language other than English, e.g. Danish.
  • Create a new page containing the __TOC__ magic word and at least one heading, so that a table of contents will be rendered.
  • Revert your language setting and find the entry for your test page on w:test:Special:NewPagesFeed.

What happens?:
The page preview on Special:NewPagesFeed includes the heading of the table of contents in the language you had set before creating the page. In the case of Danish, look for the word "Indholdsfortegnelse".

What should have happened instead?:
The page preview should include the heading of the table of contents in the content language of the page. In the case of English, that should be the word "Contents".

Software version (skip for WMF-hosted wikis like Wikipedia): N/A

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

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Xaosflux subscribed.

Screen shot.

image.png (449×1 px, 60 KB)

The "Indholdsfortegnelse" part came from the rendered page previously, not from the wikitext. Suppose this is purely a pagetriage problem, in that pagetriage should only create its snippets based on the project's default language.

A null edit also changes the snippet to the editor's interface language at the time. If you experiment with w:test:NewPagesFeed language test then please return it to Danish to avoid confusion for others.

Izno subscribed.

If this issue is new, I would guess it is caused by the changes to how the parser generates the TOC, so tag for two of the relevant projects?

Jdlrobson subscribed.

This will need a fix in either PageTriage or Parser.

Change 944763 had a related patch set uploaded (by MPGuy2824; author: MPGuy2824):

[mediawiki/extensions/PageTriage@master] Use server's language while compiling article snippets

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

MPGuy2824 changed the task status from Open to In Progress.Aug 2 2023, 6:36 AM
MPGuy2824 claimed this task.
MPGuy2824 moved this task from Other bugs to Code Review on the PageTriage board.

Change 944763 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Use server's language while compiling article snippets

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