Last modified: 2014-08-20 19:19:02 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 T70501, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68501 - PHP Fatal error: Call to a member function exists() on a non-object in maintenance/cleanupTitles.php
PHP Fatal error: Call to a member function exists() on a non-object in maint...
Status: VERIFIED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.23.1
All Linux
: Normal normal (vote)
: 1.23.x release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-24 08:50 UTC by Dick
Modified: 2014-08-20 19:19 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
legoktm.wikipedia: Backport_to_Stable+


Attachments

Description Dick 2014-07-24 08:50:27 UTC
I'm getting the following when I try to solve SpecialPages:BadTitle-problem:

root@mediawiki mediawiki/maintenance# php cleanupTitles.php --fix
Checking and fixing bad titles...
Processing page...
page 44 (Trusted) doesn't match self.
renaming 44 (500,'Trusted') to (0,'Trusted')
page 45 (Trusted) doesn't match self.
renaming 45 (3000,'Trusted') to (0,'Trusted')
A database query error has occurred.
Query: UPDATE  `page` SET page_namespace = '0',page_title = 'Trusted' WHERE page_id = '45'
Function: TitleCleanup::moveInconsistentPage
Error: 1062 Duplicate entry '0-Trusted' for key 'name_title' (localhost)

root@mediawiki mediawiki/maintenance# php cleanupTitles.php --fix
Checking and fixing bad titles...
Processing page...
page 45 (Trusted) doesn't match self.
PHP Fatal error:  Call to a member function exists() on a non-object in /usr/share/mediawiki/maintenance/cleanupTitles.php on line 153

Actually the first run seems to run OK, but the second run gives the fatal error.
Line 153 shows:                         if ( $verified->exists() ) {

Happens also on a 1.23.1-installation.
Comment 1 Gerrit Notification Bot 2014-08-12 18:47:07 UTC
Change 153644 had a related patch set uploaded by IAlex:
Correctly handle incorrect namespace in cleanupTitles.php

https://gerrit.wikimedia.org/r/153644
Comment 2 Gerrit Notification Bot 2014-08-14 16:58:29 UTC
Change 153644 merged by jenkins-bot:
Correctly handle incorrect namespace in cleanupTitles.php

https://gerrit.wikimedia.org/r/153644
Comment 3 Dick 2014-08-18 08:31:33 UTC
Gerrit, thanx. Guess this one will also be fixed in 1.23.3-patchset to be released at the last Wednesday of August. I'll try to grab the patch though to verify it's fixed.
Comment 4 Andre Klapper 2014-08-18 09:02:10 UTC
The patch was only merged into git master (=development) branch in Gerrit.
I have now set a "Backport_to_Stable?" request flag here, so maintainers can decide whether it should also be merged into the 1.23.x branch.
Comment 5 Dick 2014-08-18 10:33:41 UTC
Ok, thanx.

root@mediawiki mediawiki/maintenance# php cleanupTitles.php -fix
Checking and fixing bad titles...
Processing page...
page 45 (Trusted) doesn't match self.
renaming 45 (3000,'Trusted') to (0,'Broken/Trusted')
mediawiki 2014-08-18 10:30:34:  41.84% done on page; ETA 2014-08-18 10:30:34 [100/239] 760.19/sec <1.00% updated>
mediawiki 2014-08-18 10:30:34:  83.68% done on page; ETA 2014-08-18 10:30:34 [200/239] 1090.63/sec <0.50% updated>
Finished page... 1 of 205 rows updated

Looks better now after manually modifying cleanupTitles.php and adding the changed code to it.
Comment 6 Dick 2014-08-18 13:58:20 UTC
In other environment:

root@mediawiki mediawiki/maintenance# php cleanupTitles.php -fix
Checking and fixing bad titles...
Processing page...
page 45 (Trusted) doesn't match self.
renaming 45 (3000,'Trusted') to (0,'Broken/Trusted')
mediawiki 2014-08-18 13:55:15:  23.20% done on page; ETA 2014-08-18 13:55:15 [100/431] 2032.69/sec <1.00% updated>
mediawiki 2014-08-18 13:55:15:  46.40% done on page; ETA 2014-08-18 13:55:15 [200/431] 2719.57/sec <0.50% updated>
mediawiki 2014-08-18 13:55:15:  69.61% done on page; ETA 2014-08-18 13:55:15 [300/431] 3320.24/sec <0.33% updated>
mediawiki 2014-08-18 13:55:15:  92.81% done on page; ETA 2014-08-18 13:55:15 [400/431] 3780.72/sec <0.25% updated>
mediawiki 2014-08-18 13:55:15: 116.01% done on page; ETA 2014-08-18 13:55:15 [500/431] 4098.77/sec <0.20% updated>
Finished page... 1 of 531 rows updated


Weird the 116%. ;-)
Looks another bug (should be 531 instead of 431?).
Comment 7 Gerrit Notification Bot 2014-08-20 17:43:28 UTC
Change 155305 had a related patch set uploaded by Umherirrender:
Correctly handle incorrect namespace in cleanupTitles.php

https://gerrit.wikimedia.org/r/155305
Comment 8 Gerrit Notification Bot 2014-08-20 19:16:50 UTC
Change 155305 merged by jenkins-bot:
Correctly handle incorrect namespace in cleanupTitles.php

https://gerrit.wikimedia.org/r/155305
Comment 9 Kunal Mehta (Legoktm) 2014-08-20 19:19:02 UTC
Will also be included in the next 1.23.x release.

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


Navigation
Links