Page MenuHomePhabricator

Flow-ified talk pages appear as redlinks even when the Flow board has content.
Closed, DuplicatePublic

Description

We converted officewiki talk pages to Flow, moving/archiving the existing wikitext and putting a "Previous discussion was archived at ..." link to it in the Flow board header.

However, links to these discussion pages appeared as redlinks, falsely indicating the page doesn't exist. Here are two examples, however once you follow the redlink, you see the Flow board's content and the wiki no longer displays the redlink.

  • on a #REDIRECT page, the link to the proper Flow board is red.
  • on a user page, the [Discussion] tab link to the User_talk page is red.

Note that when you follow these links, Flow creates a page revision (ensureFlowRevision) and so the link to the Flow board is no longer red. Heisenbug.

Event Timeline

Spage raised the priority of this task from to Medium.
Spage updated the task description. (Show Details)
Spage changed Security from none to None.
Spage subscribed.

@EBernhardson comments "i think the problem is [the archive script] pushes these into deferred updates, and that must not have been run"

Ran the following on terbium through eval.php to fix the issue:

<?php

$o = Flow\Container::get( 'occupation_controller' ); 
foreach ( $wgFlowOccupyNamespaces as $ns ) { 
        echo "\n\nChecking namespace $ns\n"; 
        $it = new Flow\Utils\NamespaceIterator( wfGetDB( DB_SLAVE ), $ns-1 ); 
        foreach ( $it as $t ) { 
                $t = $t->getTalkPage(); 
                if ( $t->isSubpage() ) { 
                        continue;
                }
                $a = new Article( $t ); 
                $w = Flow\Container::get( 'factory.loader.workflow' )
                        ->createWorkflowLoader( $t )
                        ->getWorkflow(); 
                if ( $w->isNew() ) {
                        echo "Did not locate workflow for: ", $w->getArticleTitle(), "\n"; 
                } else { 
                        echo "Fixed: ", $w->getArticleTitle(), "\n"; 
                        $o->ensureFlowRevision( $a, $w ); 
                } 
        } 
}

I think the root problem here is that the listener that runs ensureFlowRevision does it via deferred updates, the maintenance script needs to make sure it runs all these deferred updates instead of queueing them up through the whole conversion and then dropping them on the floor.