Last modified: 2014-08-05 10:20:47 UTC
These gallery tests don't like Special:Upload being replaced by Special:UploadWizard and data-file-* attributes being added. I thought there was some discussion already about this, but no bug was found for this test. 15) ParserTests::testParserTest with data set #121 ('4. Indent-Pre and extension tags', ' a <gallery> File:foobar.jpg </gallery>', ' a <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> <div class="gallerytext"> </div> </div></li> </ul> ', '', '') 4. Indent-Pre and extension tags Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ ' a <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> + <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" data-file-width="1941" data-file-height="220" /></a></div></div> <div class="gallerytext"> </div> </div></li> </ul> ' /srv/vagrant/mediawiki/tests/phpunit/includes/parser/NewParserTest.php:767 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:133 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160 16) ParserTests::testParserTest with data set #305 ('Link with double quotes in title part (literal) and alternate part (interpreted)', '[[File:Denys Savchenko \'\'Pentecoste\'\'.jpg]] [[\'\'Pentecoste\'\']] [[\'\'Pentecoste\'\'|Pentecoste]] [[\'\'Pentecoste\'\'|\'\'Pentecoste\'\']]', '<p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a> </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="\'\'Pentecoste\'\' (page does not exist)">\'\'Pentecoste\'\'</a> </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="\'\'Pentecoste\'\' (page does not exist)">Pentecoste</a> </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="\'\'Pentecoste\'\' (page does not exist)"><i>Pentecoste</i></a> </p>', '', '') Link with double quotes in title part (literal) and alternate part (interpreted) Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'<p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a> +'<p><a href="/wiki/Special:UploadWizard?wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a> </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a> </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a> </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a> </p>' /srv/vagrant/mediawiki/tests/phpunit/includes/parser/NewParserTest.php:767 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:133 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160 17) ParserTests::testParserTest with data set #306 ('Broken image links with HTML captions (bug 39700)', '[[File:Nonexistent|<script></script>]] [[File:Nonexistent|100px|<script></script>]] [[File:Nonexistent|<]] [[File:Nonexistent|a<i>b</i>c]]', '<p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a> <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a> <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a> <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a> </p>', '', '') Broken image links with HTML captions (bug 39700) Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'<p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a> -<a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a> -<a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a> -<a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a> +'<p><a href="/wiki/Special:UploadWizard?wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a> +<a href="/wiki/Special:UploadWizard?wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a> +<a href="/wiki/Special:UploadWizard?wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a> +<a href="/wiki/Special:UploadWizard?wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a> </p>' /srv/vagrant/mediawiki/tests/phpunit/includes/parser/NewParserTest.php:767 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:133 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160
Created attachment 16046 [details] A bunch more similar failures The discussion I remembered was this comment by Brion http://lists.wikimedia.org/pipermail/wikitech-l/2014-July/077481.html
Also affects a Cite test: 135) CiteParserTests::testParserTest with data set #7 ('<references> after <gallery> (bug 6164)', '<ref>one</ref> <gallery>Image:Foobar.jpg</gallery> <references/>', '<p><sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup> </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> <div class="gallerytext"> </div> </div></li> </ul> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">one</span> </li> </ol> ', '', '') <references> after <gallery> (bug 6164) Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ '<p><sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup> </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> + <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" data-file-width="1941" data-file-height="220" /></a></div></div> <div class="gallerytext"> </div> </div></li> </ul> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">one</span> </li> </ol> ' /srv/vagrant/mediawiki/tests/phpunit/includes/parser/NewParserTest.php:767 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiTestCase.php:133 /srv/vagrant/mediawiki/tests/phpunit/MediaWikiPHPUnitCommand.php:42 /srv/vagrant/mediawiki/tests/phpunit/phpunit.php:160
Of course there is even more if one enables non-Wikimedia extensions, for instance data-bs-title attribute like <a href="/wiki/Special:BlankPage#autocomment" title="Special:BlankPage" data-bs-title="Special:BlankPage"> added probably by https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation/blob/master/includes/CoreHooks.php#L315
The issue is MultimediaViewer using a hook to inject data which I reported as bug 67302. Marking this bug as a duplicate. *** This bug has been marked as a duplicate of bug 67302 ***