Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkinTemplateOutputPageBeforeExec hook is being deprecated #69

Open
jdlrobson opened this issue May 19, 2020 · 1 comment
Open

SkinTemplateOutputPageBeforeExec hook is being deprecated #69

jdlrobson opened this issue May 19, 2020 · 1 comment

Comments

@jdlrobson
Copy link

Issue

The SkinTemplateOutputPageBeforeExec hook is being deprecated so that the skin rendering aspect of mediawiki can become more logicless. In this process I am identifying missing hooks and helping extensions migrate to more appropriate hooks (adding them if they don't exist)

https://phabricator.wikimedia.org/T60137 has further information.

Without fulling understanding the code in SemanticBreadcrumbs I see one usage however I'm not 100% sure what it's doing:
https://github.com/SemanticMediaWiki/SemanticBreadcrumbLinks/blob/master/src/HookRegistry.php#L102

Possible solution

Apologies in advance if I'm making any bad assumptions about how SemanticMediaWiki works - please correct me if that's the case!

Based on the following code, it seems that SemanticBreadcrumbs uses this hook to modify the subtitle:

$template->data['subtitle'] .= $this->htmlBreadcrumbLinksBuilder->getHtml();

If that's the case I would recommend using OutputPage::addSubtitle in one of the OutputPage hooks e.g. OutputPageBeforeHTML

Please let me know if that doesn't make sense or is not possible for some reason. I'll be happy to help find / provide other solutions.

UnknownSkyrimPasserby added a commit to UnknownSkyrimPasserby/SemanticBreadcrumbLinks that referenced this issue Feb 18, 2021
Possible solution for: SkinTemplateOutputPageBeforeExec hook is being deprecated SemanticMediaWiki#69.
UnknownSkyrimPasserby added a commit to UnknownSkyrimPasserby/SemanticBreadcrumbLinks that referenced this issue Feb 18, 2021
Possible solution for: SkinTemplateOutputPageBeforeExec hook is being deprecated SemanticMediaWiki#69.
@UnknownSkyrimPasserby
Copy link
Contributor

I made a patch for it #71, can anyone review it? Frankly speaking I don't know PHP and I don't understand how the MW/SMW engine works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants