Last modified: 2014-08-05 10:20:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70649, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68649 - phpunit failure: ParserTests::testParserTest for gallery and files with UploadWizard and data-file-*
phpunit failure: ParserTests::testParserTest for gallery and files with Uploa...
Status: RESOLVED DUPLICATE of bug 67302
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 67216
  Show dependency treegraph
 
Reported: 2014-07-27 00:21 UTC by Nemo
Modified: 2014-08-05 10:20 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
A bunch more similar failures (208.90 KB, text/plain)
2014-07-27 00:26 UTC, Nemo
Details

Description Nemo 2014-07-27 00:21:22 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&amp;wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko &#39;&#39;Pentecoste&#39;&#39;.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
</p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;redlink=1" class="new" title="\'\'Pentecoste\'\' (page does not exist)">\'\'Pentecoste\'\'</a>
</p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;redlink=1" class="new" title="\'\'Pentecoste\'\' (page does not exist)">Pentecoste</a>
</p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;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&amp;wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko &#39;&#39;Pentecoste&#39;&#39;.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 &#39;&#39;Pentecoste&#39;&#39;.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;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|&lt;]]
[[File:Nonexistent|a<i>b</i>c]]', '<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;</a>
<a href="/index.php?title=Special:Upload&amp;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&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
-<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
-<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;</a>
-<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
+'<p><a href="/wiki/Special:UploadWizard?wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
+<a href="/wiki/Special:UploadWizard?wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
+<a href="/wiki/Special:UploadWizard?wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;</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
Comment 1 Nemo 2014-07-27 00:26:54 UTC
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
Comment 2 Nemo 2014-07-27 00:31:04 UTC
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
Comment 3 Nemo 2014-07-29 06:16:22 UTC
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
Comment 4 Antoine "hashar" Musso (WMF) 2014-08-05 10:20:47 UTC
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 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links