Last modified: 2014-11-12 18:09:10 UTC
When the web-based installer is used, a default main page is created. When later this becomes a Wikibase repo, this main page "thinks" it is an item. The error message should make the user notice this. Instead, it says something hard to debug... failed to deserialize Backtrace: #0 /srv/testrepo/w/extensions/Wikibase/lib/includes/entity/EntityFactory.php(139): Wikibase\EntityFactory->unserializedData(''''MediaWiki ha...', 'application/jso...') #1 /srv/testrepo/w/extensions/Wikibase/repo/includes/content/ItemHandler.php(86): Wikibase\EntityFactory->newFromBlob('item', ''''MediaWiki ha...', 'application/jso...') #2 /srv/testrepo/w/includes/Revision.php(1005): Wikibase\ItemHandler->unserializeContent(''''MediaWiki ha...', 'application/jso...') #3 /srv/testrepo/w/includes/Revision.php(946): Revision->getContentInternal() #4 /srv/testrepo/w/includes/WikiPage.php(616): Revision->getContent(1) #5 /srv/testrepo/w/includes/WikiPage.php(448): WikiPage->getContent() #6 [internal function]: WikiPage->isRedirect() #7 /srv/testrepo/w/includes/Article.php(1944): call_user_func_array(Array, Array) #8 /srv/testrepo/w/includes/Wiki.php(364): Article->__call('isRedirect', Array) #9 /srv/testrepo/w/includes/Wiki.php(364): Article->isRedirect() #10 /srv/testrepo/w/includes/Wiki.php(295): MediaWiki->initializeArticle() #11 /srv/testrepo/w/includes/Wiki.php(555): MediaWiki->performRequest() #12 /srv/testrepo/w/includes/Wiki.php(448): MediaWiki->main() #13 /srv/testrepo/w/index.php(59): MediaWiki->run() #14 {main}
Some action needs to be taken to prevent this. The reason the wiki thinks it's an item is because it's in an item NS and does not have any page specific content model set. The reason it's not set is because if it's the default, it will not be set, which is the case before you set up the repo. This is a general problem for people changing the default content model of a namespace containing pages of it's default content model, and thus not specific to Wikibase. A way to fix this would be creating a maintenance script that explicitly sets all content models for pages in a namespace, so the type can safely be switched over.
Or a script that moves all pages out of the offending-to-be namespace before switching it. A Wikibase installer script could also resolve that (among other things), how it is done in SMW e.g.
Adding many blockers of bug 38638 to the list of "easy" bugs, to mark them as candidates for [[mw:Google Code-in]] tasks (gci2013). If you think this bug is not suitable, remove the keyword.