Last modified: 2013-08-22 14:54:49 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 T43617, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41617 - Undeletion fails
Undeletion fails
Status: VERIFIED FIXED
Product: MediaWiki
Classification: Unclassified
ContentHandler (Other open bugs)
1.21.x
All All
: High critical (vote)
: 1.21.0 release
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-01 04:22 UTC by Aude
Modified: 2013-08-22 14:54 UTC (History)
4 users (show)

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


Attachments

Description Aude 2012-11-01 04:22:05 UTC
http://www.wikidata.org/wiki/Q5084

https://gerrit.wikimedia.org/r/#/c/30597/ breaks undeletion of items

Page ID 196 mismatches the ID 197 provided by the Title object.

Backtrace:

#0 /var/www/common/php-master/includes/Revision.php(188): Revision->__construct(Array)
#1 /var/www/common/php-master/includes/specials/SpecialUndelete.php(598): Revision::newFromArchiveRow(Object(stdClass), Array)
#2 /var/www/common/php-master/includes/specials/SpecialUndelete.php(381): PageArchive->undeleteRevisions(Array, false, '')
#3 /var/www/common/php-master/includes/specials/SpecialUndelete.php(1510): PageArchive->undelete(Array, '', Array, false, Object(User))
#4 /var/www/common/php-master/includes/specials/SpecialUndelete.php(778): SpecialUndelete->undelete()
#5 /var/www/common/php-master/includes/SpecialPage.php(599): SpecialUndelete->execute(NULL)
#6 /var/www/common/php-master/includes/SpecialPageFactory.php(497): SpecialPage->run(NULL)
#7 /var/www/common/php-master/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#8 /var/www/common/php-master/includes/Wiki.php(555): MediaWiki->performRequest()
#9 /var/www/common/php-master/includes/Wiki.php(448): MediaWiki->main()
#10 /var/www/common/php-master/index.php(59): MediaWiki->run()
#11 /var/www/common/live-1.5/index.php(3): require('/var/www/common...')
#12 {main}

with this followup, it now just fails silently, including on wikidata.org :(

https://gerrit.wikimedia.org/r/#/c/30633/

http://www.wikidata.org/wiki/Q5084 (check the deletion log, I created this for test purpose, deleted it and undeleted and it 

It shows "03:57, 1 November 2012 Katie Filbert (WMDE) (Talk | contribs) restored page Q5084 (1 revision restored: test)"

but the page says "This item does not exist. You can search the related logs to find out where it went, or create a new item."

The failure happens on my test instance too, and believe it occurs only with $wgContentHandlerUseDB = true and only with items. 

I am trying this with different versions of the repo and with the Deletion and Undeletion hooks commented out.  With the undeletion hook, it's having trouble with $rev->getContent() and sure it worked before.
Comment 1 Aude 2012-11-01 06:08:06 UTC
This fixes the issue

https://gerrit.wikimedia.org/r/31179

The current use case of Wikidata does not mix non-default content in a namespace (e.g. wikitext in the item namespace), so this will work for now.

To have non-default content models and formats for a new revision or page, we will have to come up with a better solution.  

The code for handling archived revisions and undeletions in core is a bit ugly and we'll have to work around it in some other way.
Comment 2 Andre Klapper 2012-11-01 09:34:33 UTC
Same fix as for bug 41615 which is also marked as blocking.

[Aude: Any chance to mention bug IDs in Gerrit commit messages, if possible? 
Makes searching the other way round easier. Thanks for considering.]
Comment 3 Daniel Kinzler 2012-11-01 11:16:31 UTC
The above fatal error is caused by this revert: I789e45bd. However, undeletion did fail silently before: it would claim to undelete the page, but the page would have no content and no revisions. 

On the database level, this was caused by the revisions being restored with rev_page containing the original page ID instead of the ID of the newly created page.

A fix for both issues is here: I796fe54e
Comment 4 Daniel Kinzler 2012-11-02 11:58:15 UTC
fix merged, closing
Comment 5 denny vrandecic 2013-08-22 14:54:49 UTC
Closed older resolved bugs as verified.

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


Navigation
Links