Temporary debug log if Title::getLocalURL is used from render action
Going through calls of this method to verify that dropping the special case will not cause problems proved to be exhausting - too many callers, too many possible chains of calls. Instead, I propose to debug log when this happens and analyze those logs. Bug: T263581 Change-Id: I215c6aebf9f4cc23701911cf86750731858c759c
This commit is contained in:
parent
874b960b82
commit
c954a2bb28
1 changed files with 9 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
use MediaWiki\Interwiki\InterwikiLookup;
|
||||
use MediaWiki\Linker\LinkTarget;
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\User\UserIdentity;
|
||||
use Wikimedia\Assert\Assert;
|
||||
|
|
@ -2301,6 +2302,14 @@ class Title implements LinkTarget, IDBAccessObject {
|
|||
// @todo FIXME: This causes breakage in various places when we
|
||||
// actually expected a local URL and end up with dupe prefixes.
|
||||
if ( $wgRequest->getVal( 'action' ) == 'render' ) {
|
||||
LoggerFactory::getInstance( 'T263581' )
|
||||
->debug(
|
||||
"Title::getLocalURL called from render action",
|
||||
[
|
||||
'title' => $this->getPrefixedDBkey(),
|
||||
'exception' => new Exception()
|
||||
]
|
||||
);
|
||||
$url = $wgServer . $url;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue