Page MenuHomePhabricator

Hooks SkinAfterBottomScripts Not Executed
Closed, DeclinedPublic

Description

Author: nib888

Description:
Since several version the code of the function bottomScripts() has been modified :
the line 'wfRunHooks( 'SkinAfterBottomScripts', array( $this, &$bottomScriptText ) );' was erase and the hooks SkinAfterBottomScripts is now not executed.

I have resolve the problem on my mediawiki by restauring the old version of the function :

global $wgJsMimeType;

$bottomScriptText = "\n\t\t<script type=\"$wgJsMimeType\">if (window.runOnloadHook) runOnloadHook();</script>\n";
wfRunHooks( 'SkinAfterBottomScripts', array( $this, &$bottomScriptText ) );
return $bottomScriptText;

I have show the problem when I have installed the Google Analytics Extension : http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration

BR
Nicolas


Version: 1.9.x
Severity: normal

Details

Reference
bz17402

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:29 PM
bzimport set Reference to bz17402.
bzimport added a subscriber: Unknown Object (MLST).

nib888 wrote:

the function bottomScripts() is defined in the file include/Skin.php

Reassigning: not a bug in the bot API.

This hook is working fine on current MediaWiki version.
Note: it was added in 1.11, so it is no present in 1.9 (this what you put in the version field of this report).