Page MenuHomePhabricator

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


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".


תרגום דף – ויקיפדיה(1).png (771×1 px, 154 KB)

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 :)

Event Timeline

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

santhosh triaged this task as Medium priority.

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