Page MenuHomePhabricator

Figure out how Wikibase page editability will work with caching pageviews for logged-in users
Open, Needs TriagePublic

Description

Wikibase wants to show “edit” links only to users who (probably) have permission to edit the page. It does this by saving the page in the parser cache with special tags surrounding the “edit” links (<wb:sectionedit>…</wb:sectionedit>) and then using the OutputPageBeforeHTML hook to either strip out just those markers or the markers along with their contents depending on the user of that particular page view. (See OutputPageBeforeHTMLHookHandler::showOrHideEditLinks() and ToolbarEditSectionGenerator. How will this work if page views are cached even for logged-in users, i.e. not every user’s page view will call the OutputPageBeforeHTML hook?

(Note that the client-side JavaScript in Wikibase also uses mw.config.get( 'wgRelevantPageIsProbablyEditable' ) for the same decision, for which see T435927.)