Page MenuHomePhabricator

Deprecate SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook
Closed, ResolvedPublic

Description

Usages: https://codesearch.wmflabs.org/extensions/?q=SkinTemplateBuildNavUrlsNav_urlsAfterPermalink&i=nope&files=&repos=

Hook;

// Use the copy of revision ID in case this undocumented, shady hook tries to mess with internals.
$this->getHookRunner()->onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink( $this, $modifiedNavUrls, $revid, $revid );

This hook only exists to aid using BaseTemplateToolbox, in a situation where the hook user needs to check the revision to decide whether to add items into NavUrls/BaseTemplateToolbox or not. (for instance CiteThisPage, previously used it to check if title exists, albeit there are better ways of doing so)

The hook it's supposed to provide rev id for will soon be deprecated (T253416), and so this helper hook should be deprecated too.

The replacement for BaseTemplateToolbox (SidebarBeforeOutput hook) is sufficient to provide what both hooks used to provide, already demonstrated in b9bdc3fc19f1 for CiteThisPage extension and in the yet-to-be merged r601942
for WikibaseRepo

To do

Related Objects

Event Timeline

Ammarpad created this task.Jun 4 2020, 7:53 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 4 2020, 7:53 AM
Ammarpad updated the task description. (Show Details)Jun 4 2020, 8:00 AM
Ammarpad updated the task description. (Show Details)Jun 4 2020, 8:24 AM
Ammarpad updated the task description. (Show Details)Jun 4 2020, 9:36 AM
Jdlrobson edited projects, added Wikidata; removed CiteThisPage.
Ammarpad updated the task description. (Show Details)Jun 5 2020, 2:48 AM
Jdlrobson changed the task status from Open to Stalled.Jun 5 2020, 9:54 PM

Stalled on T253416

Ammarpad claimed this task.Jun 8 2020, 6:23 AM
Jdlrobson changed the task status from Stalled to Open.Jun 11 2020, 8:21 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson triaged this task as High priority.Jun 11 2020, 10:10 PM
Jdlrobson added a project: patch-welcome.
Jdlrobson updated the task description. (Show Details)

The remaining extensions will be notified by the deprecation notice (as they are not deployed using Wikimedia release cycles). This can now be deprecated.

https://codesearch.wmflabs.org/extensions/?q=SkinTemplateBuildNavUrlsNav_urlsAfterPermalink&i=nope&files=&repos=

Jdlrobson updated the task description. (Show Details)Jun 11 2020, 10:30 PM

Change 605306 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Deprecate SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook

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

Jdlrobson closed this task as Resolved.Jun 12 2020, 9:24 PM
Jdlrobson updated the task description. (Show Details)

Thank you @Ammarpad !

Change 605306 merged by jenkins-bot:
[mediawiki/core@master] Deprecate SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook

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