SkinTemplateOutputPageBeforeExec will be deprecated as part of the existing work on Vector as Vector is dropping use of the BaseTemplate altogether.
The use case in Wikibase is a legitimate one, but is currently not done in an obvious way, which led to the recent regression in T252800.
The SkinTemplateOutputPageBeforeExec hook is being deprecated.
Currently Wikidata uses this hook for two things (see [[ https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/fafca1f24bfab9e7e0419f1d9a43503a66b5adb0/client/includes/Hooks/SkinTemplateOutputPageBeforeExecHandler.php#L52 | code reference]] )
# Add this link at the end of the languages portal:
1) Add this link at the end of the# to enable the languages portal on pages which do not have any languages portal: links, however
2) to enable the languages portal on pages which do not have any language links, however
# Proposed solution
The link should be added using BaseTemplateAfterPortlet hook.
The latter case is not supported. This is a decision that skins should make. Vector currently behaves correctly without this code, and I can provide patches for Monobook, CologneBlue, Modern, Timeless if this is considered a blocker for deprecating. (If so please let me know ASAP).