Last modified: 2014-07-28 11:57:59 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 T34876, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32876 - Undefined index: id & timestamp
Undefined index: id & timestamp
Status: ASSIGNED
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: This, that and the other (TTO)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-08 19:23 UTC by John McClure
Modified: 2014-07-28 11:57 UTC (History)
4 users (show)

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


Attachments

Description John McClure 2011-12-08 19:23:43 UTC
Notice: Undefined index: id in C:\SMWPLUS\htdocs\mediawiki\includes\Import.php on line 548

Notice: Undefined index: timestamp in C:\SMWPLUS\htdocs\mediawiki\includes\Import.php on line 551

these messages above are generated with a very simple <page> element one without an <id> or <timestamp> child element.
Comment 1 John McClure 2011-12-08 19:24:14 UTC
I have strict errror reporting turned on.
Comment 2 Mark A. Hershberger 2011-12-09 15:22:31 UTC
Could you provide a sample file to produce the E_STRICT errors?
Comment 3 Kelson [Emmanuel Engelhart] 2013-06-16 13:08:39 UTC
I have had a similar experience with:
php importDump.php ukwikimedia-20130608-pages-logging.xml.gz
(...)
5397 (370.49 revs/sec)
5398 (370.50 revs/sec)
5399 (370.52 revs/sec)
PHP Notice:  Undefined index: params in /var/www/wiki/w/includes/Import.php on line 545
PHP Notice:  Undefined index: logtitle in /var/www/wiki/w/includes/Import.php on line 546
WikiRevision given a null title in import. You may need to adjust $wgLegalTitleChars.
Backtrace:
#0 /var/www/wiki/w/includes/Import.php(546): WikiRevision->setTitle(NULL)
#1 /var/www/wiki/w/includes/Import.php(528): WikiImporter->processLogItem(Array)
#2 /var/www/wiki/w/includes/Import.php(466): WikiImporter->handleLogItem()
#3 /var/www/wiki/w/maintenance/importDump.php(286): WikiImporter->doImport()
#4 /var/www/wiki/w/maintenance/importDump.php(245): BackupReader->importFromHandle(Resource id #75)
#5 /var/www/wiki/w/maintenance/importDump.php(95): BackupReader->importFromFile('/tmp/ukwikimedi...')
#6 /var/www/wiki/w/maintenance/doMaintenance.php(110): BackupReader->execute()
#7 /var/www/wiki/w/maintenance/importDump.php(291): require_once('/var/www/wiki/w...')
#8 {main}

In my case, it seems the XML file has an entry (corrupted?) with a NULL title. To workaround this, I just return if non title in ImportDump.php

==
	private function processLogItem( $logInfo ) {
                if ( ! $logInfo['logtitle'] ) {
                   return;
                }
==
Comment 4 Ariel T. Glenn 2013-06-20 07:07:38 UTC
They aren't corrupted, they're gone:

   <logitem>
    <id>5406</id>
    <timestamp>2013-02-01T16:58:20Z</timestamp>
    <contributor>
      <username>Andrew Gray</username>
      <id>370</id>
    </contributor>
    <type>delete</type>
    <action>revision</action>
    <text deleted="deleted" />
  </logitem>
  <logitem>
    <id>5407</id>
    <timestamp>2013-02-01T17:03:42Z</timestamp>
    <contributor>
      <username>Andrew Gray</username>
      <id>370</id>
    </contributor>
    <type>delete</type>
    <action>delete</action>
    <text deleted="deleted" />
  </logitem>
  <logitem>
    <id>5408</id>
    <timestamp>2013-02-01T17:03:51Z</timestamp>
    <contributor>
      <username>Andrew Gray</username>
      <id>370</id>
    </contributor>
    <comment>1 revision restored</comment>
    <type>delete</type>
    <action>restore</action>
    <text deleted="deleted" />
  </logitem>

Obviously the failure to handle these gracefully is a bug.
Comment 5 This, that and the other (TTO) 2014-07-28 11:57:59 UTC
WikiImporter doesn't know the meaning of grace...

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


Navigation
Links