During our SMW\Test\SimplePageRedirectRegressionTest::testDataImport MW 1.23alpha (5b8215c) failed due to #REDIRECT being missing from the $parserOutput->
getText() when using $content->getParserOutput( ... ).
The test passes on MW versions that don't use the ContentHandler and instead use $this->parser->parse( ... ).
Code used in MW 1.23
$revision = Revision::newFromTitle( $this->getTitle(), false, Revision::READ_NORMAL );
$content = $revision->getContent( Revision::RAW );
$this->parserOutput = $content->getParserOutput(
$this->getTitle(),
$revision->getId(),
null,
true
);
- Test output using var_dump for $content->getParserOutput( ...)
- SMW\Test\SimplePageRedirectRegressionTest::testDataImport
This test printed output: string(18) "[[Has type::Page]]"
string(18) "[[Has type::Page]]"
string(33) "[[Category:Simple redirect test]]"
string(33) "[[Category:Simple redirect test]]"
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(33) "[[Category:Simple redirect test]]"
string(40) "Content of NewPageRedirectRegressionTest"
string(40) "Content of NewPageRedirectRegressionTest"
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
Code used prior the ContentHandler
$revision = Revision::newFromTitle( $this->getTitle() );
$this->parserOutput = $this->parser->parse(
$revision->getText(),
$this->getTitle(),
$this->makeParserOptions(),
true,
true,
$revision->getID()
);
- Test output using var_dump using $this->parser->parse( ... )
- SMW\Test\SimplePageRedirectRegressionTest::testDataImport
This test printed output: string(18) "[[Has type::Page]]"
string(18) "[[Has type::Page]]"
string(33) "[[Category:Simple redirect test]]"
string(33) "[[Category:Simple redirect test]]"
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(80) "#REDIRECT [[SimplePageRedirectRegressionTest]] [[Category:Simple redirect test]]"
string(40) "Content of NewPageRedirectRegressionTest"
string(40) "Content of NewPageRedirectRegressionTest"
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
string(141) "This is part of the [[PageRedirectRegressionTest]] [[Category:Regression test]] [[Category:Redirect test]] [[Category:Simple redirect test]] "
"#REDIRECT [[SimplePageRedirectRegressionTest]] is missing from the ContentHandler generated ParserOuptut text object.
Version: unspecified
Severity: blocker