While setting up OAuth , an issue occured - GlobalSettings.php was treating the REST API page as a wiki page, thus it can't find its title because it doesn't exist. Even though BeforePageDisplay is being used. The error persisted.
Description
Description
While setting up OAuth , an issue occured - GlobalSettings.php was treating the REST API page as a wiki page, thus it can't find its title because it doesn't exist. Even though BeforePageDisplay is being used. The error persisted.
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | • Cocopuff2018 | T45 Connect Phorge to SkyWiki through OAuth | ||
Resolved | • Cocopuff2018 | T23 Fix an error regarding GlobalSettings |
Event Timeline
Comment Actions
I believe SkyWiki's GlobalSettings.php is not publicly available, but I'm assuming it's similar to Miraheze's GlobalSettings, where this appears to be the problematic code (lines 18–23):
$wgHooks['BeforePageDisplay'][] = static function ( &$out, &$skin ) { if ( $out->getTitle()->isSpecialPage() ) { $out->setRobotPolicy( 'noindex,nofollow' ); } return true; };
If so, is there any good reason not to replace the hook with $wgNamespaceRobotPolicies, a built-in MediaWiki configuration variable?
$wgNamespaceRobotPolicies[NS_SPECIAL] = 'noindex,nofollow';
Seems like that would accomplish the same purpose.