Page MenuHomePhabricator

Don't use ParserAfterParse hook for injecting language links etc into ParserOutput
Closed, ResolvedPublic


We currently use the ParserAfterParse hook to inject language links, page props, etc into the ParserOutput object. This is problematic, because:

  • ParserAfterParse is specific to wikitext parsing. However, injecting language links should work for any content model.
  • ParserAfterParse is also called for system messages used on the edit page, inside Lua, etc. This can lead to performance issues. An attempt to only inject things when a revision ID is known to the parser (I30d12214b046) failed, presumably because of the stashedit magic pre-parsing the page before it gets saved (and this, before a revision id is present).

We should probably hook into a point further up the stack, perhaps use the ContentAlterParserOutput hook for this.

Event Timeline

daniel created this task.May 13 2015, 10:13 AM
daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel added a project: Wikidata.
daniel added a subscriber: daniel.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 13 2015, 10:13 AM
daniel triaged this task as High priority.May 13 2015, 10:14 AM
daniel moved this task from incoming to ready to go on the Wikidata board.May 13 2015, 10:16 AM
hoo closed this task as Resolved.Jun 21 2015, 4:54 PM
hoo claimed this task.
hoo added a subscriber: hoo.