Jakob_WMDE moved this task from Doing to Peer Review on the Wikidata-Campsite 
(Wikidata-Campsite-Iteration-∞) board.
Jakob_WMDE added a comment.


  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 
<https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/e97a0d3d0e425453353d887bfa7d4e75e949a7ab/repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php#L164>
 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 
<https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/e97a0d3d0e425453353d887bfa7d4e75e949a7ab/repo/includes/Hooks/OutputPageEntityIdReader.php#L41>
 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.

TASK DETAIL
  https://phabricator.wikimedia.org/T261747

WORKBOARD
  https://phabricator.wikimedia.org/project/board/3539/

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jakob_WMDE
Cc: ItamarWMDE, Jakob_WMDE, Pablo-WMDE, Lydia_Pintscher, WMDE-leszek, Aklapper, 
Akuckartz, Iflorez, darthmon_wmde, alaa_wmde, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Jonas, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to