Page MenuHomePhabricator

Purge page tab not working
Open, Needs TriagePublic


Trying to either install the Purge extension or the Purge gadget, which is supposed to add a menu or tab item to easily purge a page. Both the extension and the gadget work fine in the vector skin, but they do not work in the timeless skin. It seems that the Timeless skin is not recognizing the Hooks/SkinTemplateNavigation .

Issue(s) likely either some combination of/something between a total lack of support and it technically being supported and just showing up in the wrong place(s).


Event Timeline

Isarra created this task.Jan 18 2019, 9:41 PM
ashley added a subscriber: ashley.Feb 10 2019, 9:17 PM

the Purge extension

Assuming we are talking about the one documented on, it should be noted that it doesn't currently follow all the best practises (for example, the extension's code is in the PHP setup file and there is no extension.json file at all). What I think is the problem here, though, is the extension's usage of the SkinTemplateNavigation hook as opposed to the SkinTemplateNavigation::Universal hook. I've some extensions which add new content action links for users (if they have the required user rights etc.) and those extensions use the SkinTemplateNavigation::Universal hook and they show up just fine on Timeless in MW 1.32.

the Purge gadget

Which gadget/hosted where? mw.util.addPortletLink should work just fine, provided that the dependency is met (mediawiki.util ResourceLoader module is loaded) and that the target ID is correct (#p-views for Timeless). Example code:

mw.loader.using( 'mediawiki.util', function() {
		mw.config.get( 'wgServer' ) + mw.config.get( 'wgScript' ) +
			'?title=' + encodeURIComponent( mw.config.get( 'wgPageName' ) ) +
} );

Furthermore, as of MW 1.31 or 1.32 (I forgot which), the usability of such gadgets is somewhat degraded anyway due to the core change which requires manual confirmation (=clicking that button) of the purge action for purge is now considered a write action and thus it requires a POST request and GET requests aren't supported anymore.