Viewing certain pages on the wiki I get the following backtrace:
[de56350818345e7fbbe6a9e0] /wiki/MediaWiki:Common.css MWUnknownContentModelException from line 306 of /tera/tera/WebRoot/w/includes/content/ContentHandler.php: The content model '' is not registered on this wiki. See https://www.mediawiki.org/wiki/Content_handlers to find out which extensions handle this content model.
Backtrace:
#0 /tera/tera/WebRoot/w/includes/Storage/RevisionStore.php(930): ContentHandler::getForModelID(string) #1 /tera/tera/WebRoot/w/includes/Storage/RevisionStore.php(865): MediaWiki\Storage\RevisionStore->loadSlotContent(MediaWiki\Storage\SlotRecord, NULL, NULL, string, integer) #2 [internal function]: MediaWiki\Storage\RevisionStore->MediaWiki\Storage{closure}(MediaWiki\Storage\SlotRecord) #3 /tera/tera/WebRoot/w/includes/Storage/SlotRecord.php(308): call_user_func(Closure, MediaWiki\Storage\SlotRecord) #4 /tera/tera/WebRoot/w/includes/Storage/RevisionRecord.php(173): MediaWiki\Storage\SlotRecord->getContent() #5 /tera/tera/WebRoot/w/includes/Revision.php(937): MediaWiki\Storage\RevisionRecord->getContent(string, integer, NULL) #6 /tera/tera/WebRoot/w/includes/parser/Parser.php(3639): Revision->getContent() #7 /tera/tera/WebRoot/w/includes/parser/Parser.php(3551): Parser->statelessFetchTemplate(Title, Parser) #8 /tera/tera/WebRoot/w/includes/parser/Parser.php(3485): Parser->fetchTemplateAndTitle(Title) #9 /tera/tera/WebRoot/w/includes/parser/Parser.php(3243): Parser->getTemplateDom(Title) #10 /tera/tera/WebRoot/w/includes/parser/Preprocessor_DOM.php(1277): Parser->braceSubstitution(array, PPFrame_DOM) #11 /tera/tera/WebRoot/w/includes/parser/Parser.php(2942): PPFrame_DOM->expand(DOMElement, integer) #12 /tera/tera/WebRoot/w/includes/parser/Parser.php(1293): Parser->replaceVariables(string) #13 /tera/tera/WebRoot/w/includes/parser/Parser.php(443): Parser->internalParse(string) #14 /tera/tera/WebRoot/w/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php(459): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer) #15 /tera/tera/WebRoot/w/includes/Hooks.php(177): SyntaxHighlight::onContentGetParserOutput(CssContent, Title, integer, ParserOptions, boolean, ParserOutput) #16 /tera/tera/WebRoot/w/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL) #17 /tera/tera/WebRoot/w/includes/content/AbstractContent.php(510): Hooks::run(string, array) #18 /tera/tera/WebRoot/w/includes/poolcounter/PoolWorkArticleView.php(144): AbstractContent->getParserOutput(Title, integer, ParserOptions) #19 /tera/tera/WebRoot/w/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork() #20 /tera/tera/WebRoot/w/includes/page/Article.php(604): PoolCounterWork->execute() #21 /tera/tera/WebRoot/w/includes/actions/ViewAction.php(68): Article->view() #22 /tera/tera/WebRoot/w/includes/MediaWiki.php(500): ViewAction->show() #23 /tera/tera/WebRoot/w/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title) #24 /tera/tera/WebRoot/w/includes/MediaWiki.php(861): MediaWiki->performRequest() #25 /tera/tera/WebRoot/w/includes/MediaWiki.php(524): MediaWiki->main() #26 /tera/tera/WebRoot/w/index.php(42): MediaWiki->run() #27 {main}
I did run the update.php script without errors. I am stumped as to what is causing this.
Configuration:
MW 1.31.0 PHP 7.1.18 MariaDB 10.2.14 ICU 60.2
I got past the problem. It appears that MW 1.31 is not as permissive about the value of rev_content_model in the revision table. I had entries in the table which were 0, and MW 1.30 did not have a problem with it. However, 1.31 only accepts a value of NULL, otherwise it barfs.
Anyhow, I fixed it by forcing the 0 values in the revision table to their default value. The logic seems to be to be to use the content model from the revision if it is set to non-null, otherwise use the value in the page table. I suspect that earlier versions of MW accepted a revision content model of 0 as the same as NULL.
David Bohman
Thanks a lot for sharing your solution to the problem. However, this sounds like a bug to me that should be fixed.
I however do not know how you ended up with 0 instead of NULL and if this could also have happened to other users of MW using the special page in the past to change the content model.
I understand that some developers are on this list too who can easily at least assess if there is an issue. Let's wait for their reply.
Cheers Karsten
Am 21.06.2018 um 02:19 schrieb David Bohman:
I got past the problem. It appears that MW 1.31 is not as permissive about the value of rev_content_model in the revision table. I had entries in the table which were 0, and MW 1.30 did not have a problem with it. However, 1.31 only accepts a value of NULL, otherwise it barfs.
Anyhow, I fixed it by forcing the 0 values in the revision table to their default value. The logic seems to be to be to use the content model from the revision if it is set to non-null, otherwise use the value in the page table. I suspect that earlier versions of MW accepted a revision content model of 0 as the same as NULL.
David Bohman _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
So this is not an issue after all? No? Cheers Karsten
Am 21.06.2018 um 10:24 schrieb [[kgh]]:
Thanks a lot for sharing your solution to the problem. However, this sounds like a bug to me that should be fixed.
I however do not know how you ended up with 0 instead of NULL and if this could also have happened to other users of MW using the special page in the past to change the content model.
I understand that some developers are on this list too who can easily at least assess if there is an issue. Let's wait for their reply.
Cheers Karsten
Am 21.06.2018 um 02:19 schrieb David Bohman:
I got past the problem. It appears that MW 1.31 is not as permissive about the value of rev_content_model in the revision table. I had entries in the table which were 0, and MW 1.30 did not have a problem with it. However, 1.31 only accepts a value of NULL, otherwise it barfs.
Anyhow, I fixed it by forcing the 0 values in the revision table to their default value. The logic seems to be to be to use the content model from the revision if it is set to non-null, otherwise use the value in the page table. I suspect that earlier versions of MW accepted a revision content model of 0 as the same as NULL.
David Bohman _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I am not certain exactly how it happened. There was no indication in the recent versions of MW that there was a problem with the database.
What took a bit to figure out is that the problem was with the values in the revision table. When I looked at the info page for the affected pages, the content model was valid. The values in the page table in the database were fine too.
Of course the software cannot catch every bogus value in the database, but perhaps the diagnostic could be clearer that the revision table is the source of the difficulty.
David
On Thu, Jun 21, 2018 at 1:24 AM [[kgh]] mediawiki@kghoffmeyer.de wrote:
Thanks a lot for sharing your solution to the problem. However, this sounds like a bug to me that should be fixed.
I however do not know how you ended up with 0 instead of NULL and if this could also have happened to other users of MW using the special page in the past to change the content model.
I understand that some developers are on this list too who can easily at least assess if there is an issue. Let's wait for their reply.
Cheers Karsten
Am 21.06.2018 um 02:19 schrieb David Bohman:
I got past the problem. It appears that MW 1.31 is not as permissive
about
the value of rev_content_model in the revision table. I had entries in
the
table which were 0, and MW 1.30 did not have a problem with it. However, 1.31 only accepts a value of NULL, otherwise it barfs.
Anyhow, I fixed it by forcing the 0 values in the revision table to their default value. The logic seems to be to be to use the content model from the revision if it is set to non-null, otherwise use the value in the
page
table. I suspect that earlier versions of MW accepted a revision content model of 0 as the same as NULL.
David Bohman
mediawiki-l@lists.wikimedia.org