Page MenuHomePhabricator

Bad content model: expected javascript but got wikitext.
Closed, ResolvedPublic

Description

2012-11-01 19:57:15 srv225 enwiki: [b7ada502] /wiki/Special:ComparePages?page1=User%3AMabdul%2Fafc+beta.js&rev1=&page2=User%3ANathan2055%2Fafc.js&rev2=&action=&diffonly=&unhide= Exception from line 463 of /usr/local/apache/common-local/php-1.21wmf2/includes/content/ContentHandler.php: Bad content model: expected javascript but got wikitext.
#0 /usr/local/apache/common-local/php-1.21wmf2/includes/content/ContentHandler.php(570): ContentHandler->checkModelID('wikitext')
#1 /usr/local/apache/common-local/php-1.21wmf2/includes/specials/SpecialComparePages.php(124): ContentHandler->createDifferenceEngine(Object(RequestContext), 518748752, 520943479, NULL, false, false)
#2 [internal function]: SpecialComparePages::showDiff(Array, Object(HTMLForm))
#3 /usr/local/apache/common-local/php-1.21wmf2/includes/HTMLForm.php(410): call_user_func(Array, Array, Object(HTMLForm))
#4 /usr/local/apache/common-local/php-1.21wmf2/includes/specials/SpecialComparePages.php(106): HTMLForm->trySubmit()
#5 /usr/local/apache/common-local/php-1.21wmf2/includes/SpecialPage.php(599): SpecialComparePages->execute(NULL)
#6 /usr/local/apache/common-local/php-1.21wmf2/includes/SpecialPageFactory.php(497): SpecialPage->run(NULL)
#7 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#8 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(554): MediaWiki->performRequest()
#9 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(447): MediaWiki->main()
#10 /usr/local/apache/common-local/php-1.21wmf2/index.php(59): MediaWiki->run()
#11 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#12 {main}


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=50202

Details

Reference
bz41658

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:04 AM
bzimport set Reference to bz41658.
bzimport added a subscriber: Unknown Object (MLST).

On a first glance, this looks like someone comparing two pages with different content models. It's clear that this would cause issues, though perhaps it can be allowed if both content models are text based. Also this should not cause a fatal error. I'll look into it.

should be fixed by I6b385fcd

(In reply to comment #2)

should be fixed by I6b385fcd

Status Merged

Verified in Wikidata demo time