Last modified: 2013-04-13 07:21:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48397, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46397 - Moving pages is completely broken in 1.21wmf12
Moving pages is completely broken in 1.21wmf12
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Highest critical (vote)
: ---
Assigned To: Aaron Schulz
: 46403 46411 (view as bug list)
Depends on:
Blocks: wmf-deployment 37209
  Show dependency treegraph
Reported: 2013-03-21 02:00 UTC by Roan Kattouw
Modified: 2013-04-13 07:21 UTC (History)
19 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Roan Kattouw 2013-03-21 02:00:33 UTC
Trying to move any page to a title that didn't previously exist causes an exception in 1.21wmf12.

I captured the following backtrace from nlwikimedia, using a debugging hack that includes $title->getPrefixedText() (which turned out to be the title the page was being moved to) in the exception message. I could also reproduce this my trying to move [[Test]] to [[Test2]] on .

2013-03-21 01:51:52 mw1055 nlwikimedia: [458e1031] /w/index.php?title=Speciaal:PaginaHernoemen&action=submit   Exception from line 71 of /usr/local/apache/common-local/php-1.21wmf12/includes/LinksUpdate.php: The Title object for Wikimedia:De kroeg/Archief/2007 did not provide an article ID. Perhaps the page doesn't exist?
#0 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/ParserOutput.php(474): LinksUpdate->__construct(Object(Title), Object(ParserOutput), true)
#1 /usr/local/apache/common-local/php-1.21wmf12/includes/content/AbstractContent.php(242): ParserOutput->getSecondaryDataUpdates(Object(Title), true)
#2 /usr/local/apache/common-local/php-1.21wmf12/includes/WikiPage.php(2066): AbstractContent->getSecondaryDataUpdates(Object(Title), NULL, true, Object(ParserOutput))
#3 /usr/local/apache/common-local/php-1.21wmf12/includes/Title.php(3847): WikiPage->doEditUpdates(Object(Revision), Object(User), Array)
#4 /usr/local/apache/common-local/php-1.21wmf12/includes/Title.php(3683): Title->moveToInternal(Object(Title), '', false)
#5 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(462): Title->moveTo(Object(Title), true, '', false)
#6 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(97): MovePageForm->doSubmit()
#7 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPage.php(613): MovePageForm->execute(NULL)
#8 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPageFactory.php(487): SpecialPage->run(NULL)
#9 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#10 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(565): MediaWiki->performRequest()
#11 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(458): MediaWiki->main()
#12 /usr/local/apache/common-local/php-1.21wmf12/index.php(59): MediaWiki->run()
#13 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#14 {main}
Comment 1 Greg Grossmeier 2013-03-21 04:29:05 UTC
If this isn't able to be fixed by tomorrow afternoon, let's roll back the wmf12 deploy.

Tim: Since you're awake first, can you debug and update us here, please?
Comment 2 Greg Grossmeier 2013-03-21 04:31:47 UTC
Chris: Is this functionality covered in our test suite? If not, let's put it in the backlog.
Comment 3 MZMcBride 2013-03-21 06:25:38 UTC
On, moved "Title A" to "Title B". "Title A" now has an incorrect page_latest, an incorrect page_len, and an incorrect page_is_redirect:

mysql> select * from page where page_title = 'Title_A' and page_namespace = 0\G
*************************** 1. row ***************************
          page_id: 6762
   page_namespace: 0
       page_title: Title_A
     page_counter: 0
 page_is_redirect: 0
      page_is_new: 1
      page_random: 0.523019457806
     page_touched: 20130321061504
      page_latest: 0
         page_len: 0
1 row in set (0.00 sec)
Comment 4 Rob Lanphier 2013-03-21 06:31:18 UTC
*** Bug 46403 has been marked as a duplicate of this bug. ***
Comment 5 Tim Starling 2013-03-21 06:40:47 UTC
This is most likely due to Iea16d672 (thanks Robla for pointing me in this direction). 

Title::moveToInternal() moves the page and then calls $nt->resetArticleID($oldid) to reset the article ID. Then a new WikiPage is constructed with the title $nt, and updates are called on this WikiPage object. Before Iea16d672, $newpage->getId() would have returned the new ID due to it being stored in $nt->mArticleId, but after Iea16d672, $newpage->getId() calls $newpage->loadPageData(), which fetches the page_id from the *slave* database. Of course, it is not in the slave yet, since the update query and the select query are separated by microseconds.

It is easy to reproduce locally with $wgAllDBsAreLocalhost = true, with zero master load.
Comment 6 Tim Starling 2013-03-21 06:43:08 UTC
(In reply to comment #5)
> It is easy to reproduce locally with $wgAllDBsAreLocalhost = true, with zero
> master load.

That is to say, the update transaction is still open, so even a separate master connection does not see the new page_id. It's not necessary to actually have replication to see the issue.

I have rolled back all wikis to MW 1.21wmf11 and thus will lower the priority.
Comment 7 Aaron Schulz 2013-03-21 07:08:02 UTC
Also see
Comment 8 Liangent 2013-03-21 09:37:19 UTC
*** Bug 46411 has been marked as a duplicate of this bug. ***
Comment 9 MZMcBride 2013-03-21 23:10:59 UTC
Roan wrote <>, which was self-merged and then deployed by Chris S. to (cf. <>).
Comment 10 Aaron Schulz 2013-03-21 23:35:26 UTC
One more change needed:
Comment 11 Aude 2013-03-22 03:01:13 UTC
see also
Comment 12 Aaron Schulz 2013-03-22 17:29:31 UTC
(In reply to comment #10)
> One more change needed:


(In reply to comment #11)
> see also

That bug is still present.
Comment 13 Aaron Schulz 2013-03-22 17:52:47 UTC
I don't get this error, but some people are still getting "LinkCache doesn't know about this title".
Comment 14 Aaron Schulz 2013-03-22 21:14:13 UTC
Fixed with a revert in

Note You need to log in before you can comment on or make changes to this bug.