Page MenuHomePhabricator

MobileFrontend abuses SkinPreloadExistence hook
Closed, ResolvedPublic2 Estimated Story Points

Description

	public static function onSkinPreloadExistence( array &$titles, Skin $skin ) {
		$context = MobileContext::singleton();
		if ( $context->shouldDisplayMobileView() && !$context->isBlacklistedPage() ) {
			$skin->getOutput()->setTarget( 'mobile' );
		}
		return true;
	}

The hook is documented as "Supply titles that should be added to link existence cache before the page is rendered". MobileFrontend is abusing it to do something totally different.

Event Timeline

The hook is documented as "Supply titles that should be added to link existence cache before the page is rendered". MobileFrontend is abusing it to do something totally different.

Apart from invalidating the contract of that hook is this blocking work / causing any issues in the cluster right now?

It wasted about 15 minutes of my time when I was hunting down a production fatal.

dr0ptp4kt set the point value for this task to 2.Jun 6 2016, 4:33 PM

Change 295770 had a related patch set uploaded (by Jdlrobson):
Don't abuse SkinPreloadExistence to set mobile target

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

Change 295770 merged by jenkins-bot:
Don't set RL target in SkinPreloadExistence handler

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