Page MenuHomePhabricator

Remove $wgTitle fallback from EditPage in MW1.33
Open, NormalPublic

Description

EditPage.php
	public function getContextTitle() {
		if ( is_null( $this->mContextTitle ) ) {
			wfDebugLog(
				'GlobalTitleFail',
				__METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.'
			);
			global $wgTitle;
			return $wgTitle;
		} else {
			return $this->mContextTitle;
		}
	}
RELEASE-NOTES-1.30
* Creating an EditPage instance without calling EditPage::setContextTitle() should
  be avoided and will be deprecated in a future release.
RELEASE-NOTES-1.32
* (T176526) EditPage::getContextTitle() falling back to $wgTitle when the
  context title is unset is now deprecated; anything creating an EditPage
  instance should set the context title via ::setContextTitle().

rMW5cd20435dc1a: EditPage: Try to avoid using $wgTitle

Once that rolls out, we should check the logs, deprecate and eventually remove the $wgTitle fallback.

Event Timeline

legoktm@mwlog1001:/srv/mw-log/archive$ zgrep "::getContextTitle" GlobalTitleFail.log-20180611.gz 
2018-06-10 07:57:37 [WxzZ8QpAME4AAKaItQ0AAAAO] mw1243 frwikisource 1.32.0-wmf.7 GlobalTitleFail INFO: EditPage::getContextTitle called by EditPage->edit/EditPage->showEditForm/EditPage->showStandardInputs/EditPage->getCancelLink/EditPage->getContextTitle with no title set.  
2018-06-10 11:32:36 [Wx0MVApAICsAAHzyZ@sAAACG] mw1322 enwikisource 1.32.0-wmf.7 GlobalTitleFail INFO: EditPage::getContextTitle called by ProofreadPage\Page\PageEditAction->show/EditPage->edit/EditPage->showEditForm/EditPage->setHeaders/EditPage->getContextTitle with no title set.  
2018-06-10 11:44:06 [Wx0PBgpAIC4AACpNmKwAAACE] mw1325 enwikisource 1.32.0-wmf.7 GlobalTitleFail INFO: EditPage::getContextTitle called by EditPage->edit/EditPage->showEditForm/EditPage->showStandardInputs/EditPage->getCancelLink/EditPage->getContextTitle with no title set.  
2018-06-10 19:02:42 [Wx110QpAAEMAAAGufZIAAAAJ] mw1272 frwikisource 1.32.0-wmf.7 GlobalTitleFail INFO: EditPage::getContextTitle called by EditPage->edit/EditPage->showEditForm/EditPage->showStandardInputs/EditPage->getCancelLink/EditPage->getContextTitle with no title set.

This only happens on wikis with ProofreadPage enabled seemingly.

Change 439988 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] EditPage::getContextTitle(): Deprecate falling back to $wgTitle

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

Change 439988 merged by jenkins-bot:
[mediawiki/core@master] EditPage::getContextTitle(): Deprecate falling back to $wgTitle

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

Legoktm updated the task description. (Show Details)Jun 14 2018, 3:43 PM
Jdforrester-WMF changed the task status from Open to Stalled.Jun 14 2018, 4:59 PM
Jdforrester-WMF removed a project: Patch-For-Review.

Now deprecated; removal is Stalled awaiting MW1.33.

Aklapper renamed this task from Remove $wgTitle fallback from EditPage to Remove $wgTitle fallback from EditPage in MW1.33.Jun 15 2018, 10:35 AM
Krinkle changed the task status from Stalled to Open.Mar 8 2019, 2:07 AM
Krinkle added a subscriber: Krinkle.

0 results for +channel:GlobalTitleFail AND "getContextTitle" over the last 30 days in WMF Logstash.

Change 498640 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/core@master] Remove $wgTitle fallback from MW 1.33

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