Page MenuHomePhabricator

Remove BaseTemplateToolbox hook
Closed, ResolvedPublic2 Estimated Story Points

Description

This hook was hard deprecated in 1.35 and we should look to remove it in 1.37
https://codesearch.wmflabs.org/search/?q=BaseTemplateToolbox&i=nope&files=&repos=

Also impacted:

Event Timeline

Could someone update this page?

https://www.mediawiki.org/wiki/Manual:Hooks/BaseTemplateToolbox

It would be especially good to know what is meant to be used instead of this hook.

See also the doxygen pages in the new hook system, which does not yet have a migration note (doc.wm.o link). This would normally be provided a line of text via the @deprecated annotation.

Change 608245 had a related patch set uploaded (by Yaron Koren; owner: Yaron Koren):
[mediawiki/extensions/Mpdf@master] Switch BaseTemplateToolbox to SidebarBeforeOutput hook for MW 1.35+

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Mpdf/ /608245

Change 608245 merged by jenkins-bot:
[mediawiki/extensions/Mpdf@master] Switch BaseTemplateToolbox to SidebarBeforeOutput hook for MW 1.35+

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Mpdf/ /608245

@Jdlrobson - thanks for updating the wiki page.

I believe this is now fixed for the Cargo and Mpdf extensions. They both still use the BaseTemplateToolbox hook, but only for versions of MediaWiki below 1.35.

Jdlrobson triaged this task as Medium priority.Sep 4 2020, 9:28 PM

Change 639208 had a related patch set uploaded (by Pwirth; owner: Pwirth):
[mediawiki/extensions/BlueSpiceUEModuleHTML@REL1_35] Replace usage of deprecated hook BaseTemplateToolbox

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

Change 639208 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceUEModuleHTML@REL1_35] Remove usage of deprecated hook BaseTemplateToolbox

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

Change 643817 had a related patch set uploaded (by Robert Vogel; owner: Pwirth):
[mediawiki/extensions/BlueSpiceUEModuleHTML@master] Remove usage of deprecated hook BaseTemplateToolbox

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

Change 643817 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceUEModuleHTML@master] Remove usage of deprecated hook BaseTemplateToolbox

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

Note this will be removed within the next 2 weeks.

Change 708593 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/core@master] Remove BaseTemplateToolbox hook

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

cjming moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2020-21) board.
cjming subscribed.

Change 708593 merged by jenkins-bot:

[mediawiki/core@master] Remove BaseTemplateToolbox hook

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

nray reassigned this task from nray to cjming.
nray subscribed.

It seems that this hook is already gone from MediaWiki 1.35, in spite of being documented as deprecated. The extension PerformanceInspector does not work under PHP 1.35.3 because PerformanceInspectorHooks::onBaseTemplateToolbox is never called, despite having "BaseTemplateToolbox": [ "PerformanceInspectorHooks::onBaseTemplateToolbox" ], in extension.json.

It seems that this hook is already gone from MediaWiki 1.35, in spite of being documented as deprecated. The extension PerformanceInspector does not work under PHP 1.35.3 because PerformanceInspectorHooks::onBaseTemplateToolbox is never called, despite having "BaseTemplateToolbox": [ "PerformanceInspectorHooks::onBaseTemplateToolbox" ], in extension.json.

The hook was always skin specific. It's called in 1.35 but only in skins using BaseTemplate which was why it was deprecated. I suspect it works fine in Monobook skin in 1.35 for example?

See https://phabricator.wikimedia.org/T253686 for performance inspector which is not going to be fixed apparently.