Hello
When trying to import an XML file created by "php maintenance/dumpBackup.php --current", I get the following error. What could it mean?
Fatal error: Call to a member function getNamespace() on a non-object in /usr/share/mediawiki1.5/includes/Article.php on line 936
I'm running mediawiki 1.5.8 and the export ist from 1.5.6.
bye,
-christian-
On Tue, Jun 13, 2006 at 04:32:20PM +0200, Christian Hammers wrote:
Fatal error: Call to a member function getNamespace() on a non-object in /usr/share/mediawiki1.5/includes/Article.php on line 936
The problem was apparently that there was UTF-8 encoded title strings in the XML.
To spot such problems I would propose to add some status output similar to:
--- includes/SpecialImport.php.orig 2006-06-13 17:00:47.476636412 +0200 +++ includes/SpecialImport.php 2006-06-13 17:03:56.866428299 +0200 @@ -203,6 +203,7 @@
$article = new Article( $this->title ); $pageId = $article->getId(); + printf("Importing %s:%s<br>\n", $this->title->getNamespace(), $this->title->getText()); if( $pageId == 0 ) { # must create the page... $pageId = $article->insertOn( $dbw );
tschüss,
-christian-
Christian Hammers wrote:
On Tue, Jun 13, 2006 at 04:32:20PM +0200, Christian Hammers wrote:
Fatal error: Call to a member function getNamespace() on a non-object in /usr/share/mediawiki1.5/includes/Article.php on line 936
The problem was apparently that there was UTF-8 encoded title strings in the XML.
That's normal. Do you mean *non*-UTF-8 encoded title strings?
-- brion vibber (brion @ pobox.com)
On Tue, Jun 13, 2006 at 10:37:34AM -0700, Brion Vibber wrote:
Christian Hammers wrote:
On Tue, Jun 13, 2006 at 04:32:20PM +0200, Christian Hammers wrote:
Fatal error: Call to a member function getNamespace() on a non-object in /usr/share/mediawiki1.5/includes/Article.php on line 936
The problem was apparently that there was UTF-8 encoded title strings in the XML.
That's normal. Do you mean *non*-UTF-8 encoded title strings?
Sorry for the confusion, what I meant was non-US-ASCII chars like German Umlauts äöüß which were encoded as two-byte UTF-8 chars.
Once I changed e.g. "ö" to "oe" in all <title> contents, the import succeeded.
Such characters in the body texts were ok, of course.
bye,
-christian-
Christian Hammers wrote:
On Tue, Jun 13, 2006 at 10:37:34AM -0700, Brion Vibber wrote:
Christian Hammers wrote:
On Tue, Jun 13, 2006 at 04:32:20PM +0200, Christian Hammers wrote:
Fatal error: Call to a member function getNamespace() on a non-object in /usr/share/mediawiki1.5/includes/Article.php on line 936
The problem was apparently that there was UTF-8 encoded title strings in the XML.
That's normal. Do you mean *non*-UTF-8 encoded title strings?
Sorry for the confusion, what I meant was non-US-ASCII chars like German Umlauts äöüß which were encoded as two-byte UTF-8 chars.
That's normal then. This should not cause any problems whatsoever.
Once I changed e.g. "ö" to "oe" in all <title> contents, the import succeeded.
This should absolutely not be necessary. Are you certain that those characters *were* encoded correctly?
-- brion vibber (brion @ pobox.com)
On Wed, Jun 14, 2006 at 12:49:38AM -0700, Brion Vibber wrote:
Christian Hammers wrote:
On Tue, Jun 13, 2006 at 10:37:34AM -0700, Brion Vibber wrote:
Christian Hammers wrote:
On Tue, Jun 13, 2006 at 04:32:20PM +0200, Christian Hammers wrote:
Fatal error: Call to a member function getNamespace() on a non-object in /usr/share/mediawiki1.5/includes/Article.php on line 936
The problem was apparently that there was UTF-8 encoded title strings in the XML.
That's normal. Do you mean *non*-UTF-8 encoded title strings?
Sorry for the confusion, what I meant was non-US-ASCII chars like German Umlauts äöüß which were encoded as two-byte UTF-8 chars.
That's normal then. This should not cause any problems whatsoever.
Once I changed e.g. "ö" to "oe" in all <title> contents, the import succeeded.
This should absolutely not be necessary. Are you certain that those characters *were* encoded correctly?
Indeed, some titles had correct UTF8 byte sequences for the German Umlauts and some not: NetzwerkgerÀte (0xc3 0xa4 for Netzwerkgeräte - correct) Bï¿œronetz (0xef 0xbf 0xbd for Büronetz - incorrect)
bye,
-christian-
mediawiki-l@lists.wikimedia.org