OutputPageBeforeHTMLHookHandler retrieves termbox entries for entity pages from the OutputPage (see OutputPageBeforeHTMLHookHandler::getEntityTermsListHtml). If this OutputPage property is empty we fall back to retrieving the full entity to extract the terms from that.
OutputPageBeforeHTMLHookHandler::getEntity claims that in this case // The parser cache content is too old to contain the terms list items, but given this was added years ago (in 4b52cd637a1 in 2016), this surely isn't the case anymore.
To do:
- Make sure the wikibase-terms-list-items property is actually set in all relevant cases
- Remove the fallback handling from OutputPageBeforeHTMLHookHandler and EntityViewPlaceholderExpander