Page MenuHomePhabricator

ArticleAfterFetchContent and ArticleAfterFetchContentObject hooks... one is deprecated... the other's not.
Closed, ResolvedPublic

Description

Hi,

For MediaWiki 1.28.0

This page lists ArticleAfterFetchContent as deprecated:

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

This page doesn't list ArticleAfterFetchContentObject as deprecated:

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

The same is documented in docs/hooks.txt.

However, I receive a deprecation warning when using ArticleAfterFetchContentObject, and fixed that by using ArticleAfterFetchContent instead.

Is the documentation reversed? Or the implementation?

Thanks,
Peter

Event Timeline

Pfarrar created this task.Jan 5 2017, 4:32 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 5 2017, 4:32 PM
maiden_taiwan renamed this task from ArticleAfterFetchContent and ArticleAfterFetchContentObject hooks... one is depricated... the other's not. to ArticleAfterFetchContent and ArticleAfterFetchContentObject hooks... one is deprecated... the other's not..Jan 5 2017, 5:06 PM
maiden_taiwan added a subscriber: maiden_taiwan.
Restricted Application added a project: Documentation. · View Herald TranscriptJan 15 2017, 3:05 AM
TTO added subscribers: Reedy, TTO.EditedJan 15 2017, 3:14 AM

@Reedy deprecated ArticleAfterFetchContentObject in 97d9916a3d16.

ArticleAfterFetchContent also appears to be deprecated in 1.28, and it has actually been removed in master (yet it still appears in hooks.txt, which we'd better fix - and there was no release note either!).

Reedy added a comment.Jan 15 2017, 7:00 AM

Hmm. I don't think ArticleAfterFetchContentObject should've been deprecated... I'm not sure why it's run via ContentHandler::runLegacyHooks() either, so I guess that patch wants a partial revert, and a backport to 1.28

Change 332120 had a related patch set uploaded (by Reedy):
Un-deprecate ArticleAfterFetchContentObject hook

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

Change 332121 had a related patch set uploaded (by Reedy):
Un-deprecate ArticleAfterFetchContentObject hook

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

@Reedy deprecated ArticleAfterFetchContentObject in 97d9916a3d16.
ArticleAfterFetchContent also appears to be deprecated in 1.28, and it has actually been removed in master (yet it still appears in hooks.txt, which we'd better fix - and there was no release note either!).

https://gerrit.wikimedia.org/r/#/c/332150/ for T154498, which already noted this omission

ArticleAfterFetchContent (Still mentioned in hooks.txt, code removed, but not in RELEASE-NOTES or HISTORY)

Change 332121 merged by jenkins-bot:
Un-deprecate ArticleAfterFetchContentObject hook

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

Change 332120 merged by jenkins-bot:
Un-deprecate ArticleAfterFetchContentObject hook

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

TTO closed this task as Resolved.Jan 17 2017, 12:54 AM
TTO assigned this task to Reedy.

I think this is fixed now from our end. Update to 1.28.1 when it is released.

Change 577329 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hooks.txt wasn't updated, still says its deprecated

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

DannyS712 reopened this task as Open.Mar 5 2020, 7:38 PM
DannyS712 added a project: User-DannyS712.
DannyS712 added a subscriber: DannyS712.

@TTO @Reedy hooks.txt wasn't updated to remove the deprecation notice. Can you take a look at the patch I just submitted?

Reedy closed this task as Resolved.Mar 5 2020, 9:55 PM

@TTO @Reedy hooks.txt wasn't updated to remove the deprecation notice. Can you take a look at the patch I just submitted?

It was. Noting this was originally done in 1.28, the comment says 1.32, and it was re-added in https://github.com/wikimedia/mediawiki/commit/4835a75ec56444c61c5d0cfbc9e98ceb420fc513

My apologies. I couldn't find anything in the release notes that it was deprecated again

Change 577329 abandoned by DannyS712:
Hooks.txt: Update that ArticleAfterFetchContentObject was un-deprecated

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

Reedy added a comment.Mar 5 2020, 9:59 PM

My apologies. I couldn't find anything in the release notes that it was deprecated again

It happens. Always worth looking at the code incase :)