Page MenuHomePhabricator

Investigate Special:Undelete state
Closed, ResolvedPublic

Description

The Special:Undelete page seems to be having several issues including:

  • reference section not visible (T259541)
  • edit links visible although not expected to be there (T228147)
  • "termbox" section is showing some "odd" string (T261511)

See e.g. on https://www.wikidata.org/w/index.php?title=Special:Undelete&target=Q97146929&timestamp=20200823011433.

Expected outcome: Rootcause determined, check if the shared reasons, and update the related bug report tickets accordingly

Relevant MediaWiki rights:

  • Delete and undelete specific revisions of pages (deleterevision)
  • Delete pages (delete)
  • Undelete a page (undelete)

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptSep 1 2020, 12:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Maintenance_bot moved this task from incoming to in progress on the Wikidata board.Sep 1 2020, 1:15 PM
Lydia_Pintscher updated the task description. (Show Details)

TL;DR teach OutputPageBeforeHTMLHookHandler::onOutputPageBeforeHTML and OutputPageEntityIdReader::getEntityIdFromOutputPage about Special:Undelete and things should work.

The three problems (edit links, references, termbox placeholder) mentioned in the description indeed appear to share the same root cause. The issue is that OutputPageBeforeHTMLHookHandler and some related code are not running on Special:Undelete because it's not an entity "article" page.

The first bit of code that needs fixing is the guard in OutputPageBeforeHTMLHookHandler::onOutputPageBeforeHTML which checks for isArticle which is false for Special:Undelete. Removing this line unlocks the hidden edit links, but leaves references and termbox placeholder string still broken.

The second problem lies in OutputPageEntityIdReader::getEntityIdFromOutputPage which is another guard against non-entity pages. By removing this check as well, the page looks as it's supposed to.

It looks like these two pieces of code actually want to check the same thing. Maybe they could even share code.

Jakob_WMDE closed this task as Resolved.Sep 15 2020, 9:32 AM