Page MenuHomePhabricator

Action text in <title> was inadvertently removed (OutputPage::mPageTitleActionText)
Closed, ResolvedPublic

Description

Once upon a time, there was some text appended to the <title> like "- preview" or "- history" when you were doing an action to the page. This was implemented by the OutputPage::mPageTitleActionText member, assisted by its getter and setter, and OutputPage::setPageTitle().

Then, in November 2010, a cleanup commit (10ecfeb0) April 2009, commit e4d21170 disabled the functionality completely, presumably by mistake. It was reverted for other reasons, and recommitted as cadc951d.

Now that it did nothing, it only took until October 2011 for all callers to be removed, since after all it did nothing (2d045fa1, 9e230f30, e275ea28, ae45908c). So a feature seems to have been removed by mistake.

But not all is lost! As of July 2018, we were in the middle of advancing the state of MediaWiki development by adding lots more tests, and the issue was discovered. So we can restore the feature if we want, with tests so that it doesn't get removed again by mistake.

Event Timeline

Then, in November 2010, a cleanup commit (10ecfeb0) disabled the functionality completely, presumably by mistake. It was reverted for other reasons, and recommitted as cadc951d.

Unless I'm being completely blind, the code removed was already a no-op ($name isn't passed in by reference, and name isn't used in the setHTMLTitle call. It's also not saved to any member variable)... So it wasn't broken by either of those commits, it was already broken?

I stand corrected, I didn't read closely enough. It was broken even before that, and those commits just removed dead code. It looks like it was actually broken by e4d21170.

Haha, ok. I'm glad I'm not losing it completely :)

Looks like it was never implemented correctly in the first place

Why do you say that? It looks like it would have worked before e4d21170.

It looks like it's been supplanted by other features anyway, though. Editing, previewing, viewing histories, and action=info all seem to have adequate <title>s. So I think the right solution here is just to nuke the dead code.

Change 449022 had a related patch set uploaded (by simetrical; owner: simetrical):
[mediawiki/core@master] Remove long-dead OutputPage methods set/getPageTitleActionText()

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

Change 449022 merged by jenkins-bot:
[mediawiki/core@master] Remove long-dead OutputPage methods set/getPageTitleActionText()

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

Simetrical claimed this task.