"Main Page" is frequently shown when auto-adapting templates that use {{PAGENAME}}, instead of the actual page name
Closed, ResolvedPublic

Description

To reproduce:

  • Translate "Helene J. Kantor" from English to Hebrew. Give the target article the title "Hebrew Helene J. Kantor".
  • Adapt the first infobox template (Infobox scientist). Don't click it again, because we don't need the template editor.

Observed: The auto-adapted template says "Main Page".
Expected: The auto-adapted template should say "Hebrew Helene J. Kantor".

Screenshot:

Explanation: The template in the Hebrew Wikipedia shows the name of the scientist at the top. It can be provided as a name (שם) parameter, and if it's not provided, then the page title is shown as the default, using the MediaWiki core magic word {{PAGENAME}}. This technique is used by many infoboxes in Wikipedia in many languages.

When the template is initially auto-adapted, it is probably rendered using Parsoid, which doesn't know that the page title will be "Hebrew Helene J. Kantor", and renders {{PAGENAME}} as the string "Main Page" as a default (it's just a guess, so please correct me if I'm wrong).

An empty box that says "Main Page" is weird and confusing to editors. The future page title is known to CX, and should be sent to Parsoid so it could render {{PAGENAME}} correctly.

Tagging also Parsoid because I'm not sure that it's actually possible to "send" a not-yet-existing page name to Parsoid. If it's not possible, then I guess it should be :)

Amire80 created this task.Dec 29 2016, 7:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 29 2016, 7:47 PM

Change 332380 had a related patch set uploaded (by Santhosh):
Fix 'Main Page' appearing while auto-adapting templates

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

santhosh triaged this task as Normal priority.Jan 16 2017, 6:56 PM
santhosh claimed this task.

Change 332380 merged by jenkins-bot:
Fix 'Main Page' appearing while auto-adapting templates

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