[go: up one dir, main page]

Page MenuHomePhabricator

[Regression] Browser tab title broken for mobile main page ("- Wikipedia")
Closed, DuplicatePublicBUG REPORT

Description

https://en.m.wikipedia.org/wiki/Main_Page

What happens?:

Document title is - Wikipedia.

What should have happened instead?:

The title is expected to be Wikipedia, the free encyclopedia, as controlled by the pagetitle-view-mainpage messsage, and as seen on the equivalent page at the canonical/desktop URL https://en.wikipedia.org/wiki/Main_Page.

If I remember correctly, MobileFrontend does not (intentionally) override this, so I'm guessing it's not that an override fell apart, but rather that a bug caused it to start affecting the logic at all.

I don't know when it regressed, could be a couple days or a couple months.

Event Timeline

With the help of the Wayback Machine I narrowed it down to having regressed between 15 Oct 2020 and 16 Oct 2020, and indeed in the months and years upto that point, it read Wikipedia, the free encyclopedia as presumably set by OutputPage in core.

http://web.archive.org/web/20200101000000*/https://en.m.wikipedia.org/wiki/Main_Page
http://web.archive.org/web/20201015071412/https://en.m.wikipedia.org/wiki/Main_Page
http://web.archive.org/web/20201016005448/https://en.m.wikipedia.org/wiki/Main_Page

The override is in MinervaNeue (now).

pagetitle-view-mainpage is supplanted by MediaWiki:Mobile-frontend-logged-in-homepage-notification, which itself is argument for MediaWiki:Pagetitle. For unregistered users, the first message is indeed empty string (since there's no name to welcome) which is what produces the dangling - Wikipedia. For registered users, it should look correct.

@Jdlrobson: While this is certainly a duplicate, this merge seems to be in error. T255682: Formalize Main page heading behaviour is a task about <h1> tag, this task is about <title> tag in <head>.

My own T277410 filed over the same issue seems to show that the proper task for this duplicate is actually T265892: MediaWiki:Pagetitle-view-mainpage does not behave the same in MinervaNeue skin as it does in other skin.

Yeh there's a fair bit of overlap between those two tasks. Hoping to carve out some time to fix this soon. Basically one patch should fix both issues.

OutputPage::setPageTitle sets mPageTitle which is returned by OutputPage::getPageTitle
It however also calls setHTMLTitle which updates the title in the HEAD.D

SkinMinerva needs to be updated to use OutputPage::setDisplayTitle and OutputPage::getDisplayTitle to fix both bugs.

Change 737112 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Minerva uses core page title handling

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