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.