Page MenuHomePhabricator

dumpBackup.php exception: TypeError: XmlDumpWriter::canonicalTitle(): Argument #1 ($title) must be of type Title, null given
Closed, ResolvedPublicBUG REPORT

Description

MediaWiki1.39.4
PHP8.0.28 (cgi-fcgi)
MySQL8.0.28-0ubuntu0.20.04.3
CommentStreams8.0-dev (6b3a3ed)

When doing dumpBackup.php with CommentStreams enabled, I get the exception:

2023-07-30 18:56:12 vps###### my_site_: [7bb73dbe9364462616363b12] [no req]   TypeError: XmlDumpWriter::canonicalTitle(): Argument #1 ($title) must be of type Title, null given, called in /home/my_user/mysite.com/w/extensions/CommentStreams/includes/MainHooks.php on line 417
#0 /home/my_user/mysite.com/w/extensions/CommentStreams/includes/MainHooks.php(417): XmlDumpWriter::canonicalTitle(NULL)
#1 /home/my_user/mysite.com/w/includes/HookContainer/HookContainer.php(160): MediaWiki\Extension\CommentStreams\MainHooks->onXmlDumpWriterOpenPage(XmlDumpWriter, string, stdClass, Title)
#2 /home/my_user/mysite.com/w/includes/HookContainer/HookRunner.php(4518): MediaWiki\HookContainer\HookContainer->run(string, array)
#3 /home/my_user/mysite.com/w/includes/export/XmlDumpWriter.php(267): MediaWiki\HookContainer\HookRunner->onXmlDumpWriterOpenPage(XmlDumpWriter, string, stdClass, Title)
#4 /home/my_user/mysite.com/w/includes/export/WikiExporter.php(551): XmlDumpWriter->openPage(stdClass)
#5 /home/my_user/mysite.com/w/includes/export/WikiExporter.php(493): WikiExporter->outputPageStreamBatch(Wikimedia\Rdbms\MysqliResultWrapper, stdClass)
#6 /home/my_user/mysite.com/w/includes/export/WikiExporter.php(315): WikiExporter->dumpPages(string, boolean)
#7 /home/my_user/mysite.com/w/includes/export/WikiExporter.php(175): WikiExporter->dumpFrom(string)
#8 /home/my_user/mysite.com/w/maintenance/includes/BackupDumper.php(363): WikiExporter->allPages()
#9 /home/my_user/mysite.com/w/maintenance/dumpBackup.php(82): BackupDumper->dump(integer, integer)
#10 /home/my_user/mysite.com/w/maintenance/includes/MaintenanceRunner.php(309): DumpBackup->execute()
#11 /home/my_user/mysite.com/w/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()
#12 /home/my_user/mysite.com/w/maintenance/dumpBackup.php(144): require_once(string)
#13 {main}

Event Timeline

Aklapper renamed this task from dumpBackup.php exception to dumpBackup.php exception: TypeError: XmlDumpWriter::canonicalTitle(): Argument #1 ($title) must be of type Title, null given.Jul 30 2023, 8:16 PM

Change 947936 had a related patch set uploaded (by Cicalese; author: Cicalese):

[mediawiki/extensions/CommentStreams@master] Fix error dumping page with comments

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

Thank you for reporting this error. I was not able to reproduce it locally, but I put a bit more error checking that should catch it. Could you please test the patch to see if it takes care of the error for you? Thank you.

cicalese changed the subtype of this task from "Task" to "Bug Report".Aug 11 2023, 2:48 AM

Change 947936 merged by jenkins-bot:

[mediawiki/extensions/CommentStreams@master] Fix error dumping page with comments

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

cicalese claimed this task.