Page MenuHomePhabricator

FlowFixInconsistentBoards.php should purge cache
Open, Needs TriagePublic

Description

In T371582: [Flow] The Forum des nouveaux is broken, we run into a case in which a title was inconsistent between flowdb and MW Core's DB. The FlowFixInconsistentBoards.php detected (and fixed) that issue correctly:

[urbanecm@mwmaint1002 ~]$ mwscript extensions/Flow/maintenance/FlowFixInconsistentBoards.php --wiki=frwiki
INCONSISTENT: Core title for 's1q99xy15k6y1544' is 'Wikipédia:Forum des nouveaux/Archives Flow', but Flow title is 'Wikipédia:Forum des nouveaux'
FIXED: Updated 's1q99xy15k6y1544' to match core title, 'Wikipédia:Forum des nouveaux/Archives Flow'
[urbanecm@mwmaint1002 ~]$

However, the page remained to be inaccessible. Future investigation revealed that the incorrect title was kept in the workflow cache (see T371582#10034787 for more details). Once the following code was executed in a shell.php session to purge the cache, the page started to work again:

> $c = require "$IP/extensions/Flow/container.php";
> $storage = $c['storage']
> $wikipage = \MediaWiki\MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle(Title::newFromText('Wikipédia:Forum_des_nouveaux/Archives_Flow'))
> $content = $wikipage->getContent()
> $workflowId = $content->getWorkflowId()
> $workflowStorage = $storage->getStorage('Workflow')
> $workflowStorage->cachePurge($workflow)

The FlowFixInconsistentBoards.php script from StructuredDiscussions should presumably purge the cache as well. Maybe it needs to also purge some other caches, not sure.