Page MenuHomePhabricator

ImportTest::testHandlePageContainsRedirect failure with non-wikitext content in main namespace
Closed, InvalidPublic

Description

ImportTest::testHandlePageContainsRedirect with data set #0 ('<mediawiki>
<page>

		<title>Test</title>
		<ns>0</ns>
		<id>21</id>
		<redirect title="Test22"/>
		<revision>
			<id>20</id>
			<timestamp>2014-05-27T10:00:00Z</timestamp>
			<contributor>
				<username>Admin</username>
				<id>10</id>
			</contributor>
			<comment>Admin moved page [[Test]] to [[Test22]]</comment>
			<text xml:space="preserve" bytes="20">#REDIRECT [[Test22]]</text>
			<sha1>tq456o9x3abm7r9ozi6km8yrbbc56o6</sha1>
			<model>wikitext</model>
			<format>text/x-wiki</format>
		</revision>

</page>
</mediawiki>', 'Test22')
This test printed output: Revision 20 using content model wikitext cannot be stored on "Test" on this wiki, since that model is not supported on that page.


Version: unspecified
Severity: normal

Details

Reference
bz72214

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:47 AM
bzimport set Reference to bz72214.
bzimport added a subscriber: Unknown Object (MLST).

This really doesn't have anything to do with bug 73283, other than the tests being in the same file.

This is a result of bug 45750. Obviously the test is assuming it is running on a wiki where the content model in mainspace is "wikitext". Presumably there are other tests that assume this as well; I wonder if we should make it a requirement for running the tests that pages in the main namespace have "wikitext" content model?

Daimona subscribed.

Closing old task that can no longer be reproduced with the given information (tried $wgNamespaceContentModels[NS_MAIN] = CONTENT_MODEL_JSON;, too).