Topic on Project:Support desk

Error: Call to a member function getNamespaces() on null

Faulknmd (talkcontribs)


I run a Wiki for an amateur songwriting competition at:

MediaWiki     1.39.3

PHP     8.1.17 (cgi-fcgi)

MySQL     8.0.28-0ubuntu0.20.04.3

ICU     60.2

It stopped working properly a few weeks ago, so I upgraded from MediaWiki 1.26.3 to 1.35.10 without problems and everything was fine.

I then came back to it on Friday in order to upgrade further to 1.39.3.

Unfortunately, having done that (incl. running the update script in a browser), some pages now load as they should, whereas many others return "Error: Call to a member function getNamespaces() on null".

For example, the full error report for is as follows:

[ZHNoFVjgJfmtun3AUscyrAAATq4] /wiki/index.php?title=Home_Composed_Song_Contest_1994 Error: Call to a member function getNamespaces() on null


from /home/faulknmd/

#0 /home/faulknmd/ wfHtml5MediatorParse(string, array, Parser, PPFrame_Hash)

#1 /home/faulknmd/ Parser->extensionSubstitution(array, PPFrame_Hash, boolean)

#2 /home/faulknmd/ PPFrame_Hash->expand(PPNode_Hash_Tree, integer)

#3 /home/faulknmd/ Parser->replaceVariables(string)

#4 /home/faulknmd/ Parser->internalParse(string)

#5 /home/faulknmd/ Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)

#6 /home/faulknmd/ WikitextContentHandler->fillParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, ParserOutput)

#7 /home/faulknmd/ ContentHandler->getParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)

#8 /home/faulknmd/ MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(WikitextContent, Title, integer, ParserOptions, boolean)

#9 /home/faulknmd/ MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)

#10 /home/faulknmd/ MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)

#11 /home/faulknmd/ MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)

#12 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)

#13 /home/faulknmd/ call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)

#14 /home/faulknmd/ MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#15 /home/faulknmd/ PoolWorkArticleView->renderRevision()

#16 /home/faulknmd/ PoolWorkArticleViewCurrent->doWork()

#17 /home/faulknmd/ PoolCounterWork->execute()

#18 /home/faulknmd/ MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreRecord, integer)

#19 /home/faulknmd/ Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)

#20 /home/faulknmd/ Article->view()

#21 /home/faulknmd/ ViewAction->show()

#22 /home/faulknmd/ MediaWiki->performAction(Article, Title)

#23 /home/faulknmd/ MediaWiki->performRequest()

#24 /home/faulknmd/ MediaWiki->main()

#25 /home/faulknmd/ MediaWiki->run()

#26 /home/faulknmd/ wfIndexMain()

#27 {main}

Whereas pages like this are working fine, for example:

Can anyone give me any ideas as to why this might have happened and how it could be fixed? Thanks!


Bawolff (talkcontribs)

Sounds like a bug in Html5mediator extension. Maybe the extension isn't compatible with 1.39, or maybe it needs to be updated to a new version.

Faulknmd (talkcontribs)

Thank you! Html5mediator is indeed no longer supported, which is a bummer, but there we go.

I've removed it and the problematic pages do at least work again now, albeit with the Html5mediator code showing, so that's certainly a big step forward.

Unfortunately the supported alternatives (e.g. MP3MediaHandler, TimedMediaHandler) don't seem to allow the embedding of externally hosted audio files, which is what I was using Html5mediator for, so I guess I can look forward to a lot of time spent uploading mp3s in my near future...

Nevertheless, the biggest part of the problem is solved, so thanks again for that!


Reply to "Error: Call to a member function getNamespaces() on null"