https://bugzilla.wikimedia.org/show_bug.cgi?id=31179
--- Comment #13 from Aaron Schulz <[email protected]> 2011-10-04 19:55:22 UTC --- Here is a problematic scenario: Situation: page restored when no live page already exists at that title 1) SpecialUndelete::undeleteRevisions() 2) SpecialUndelete::undeleteRevisions() does: $newid = $article->insertOn( $dbw ); A new page row is inserted with page_latest=0, page_len=0, page_is_new=1 This also sets mTitle in the WikiPage to have correct ID. 3) SpecialUndelete::undeleteRevisions() does: $oldcountable = $article->isCountable(); 4) isCountable() calls isRedirect(), which causes loadPageData() to be done on a slave. The data isn't there yet on the slave, so the page is loaded as not existing. loadPageData() does: $this->mTitle->loadFromRow( false ); ...which overrides mTitle in the WikiPage to 0 5) SpecialUndelete::undeleteRevisions() does: $article->updateIfNewerOn( $dbw, $revision, $previousRevId ), Called with $previousRevId = 0 since no page existed at the title before restoring 6) WikiPage::updateIfNewerOn() calls WikiPage::updateRevisionOn() since the page doesn't exist 7) WikiPage::updateRevisionOn() does: $conditions = array( 'page_id' => $this->getId() ); $this->getId() uses mTitle->getArticleID(), which was corrupted as 0. Thus, the UPDATE fails to update the row in (2), and it is stuck with those values -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
