Page MenuHomePhabricator

media parser test failures in REL1_39
Open, Needs TriagePublic

Description

Running test Bad images - basic functionality [legacy]... FAILED!
/var/www/wiki-1.39/core/tests/parser/legacyMediaParserTests.txt:149
--- /tmp/mwParser-expectedfgTd1a	2023-06-25 15:01:14.054646273 +0100
+++ /tmp/mwParser-actual0DYfmc	2023-06-25 15:01:14.054646273 +0100
@@ -1,2 +1,2 @@
-<p><a href="/wiki/File:Bad.jpg" title="File:Bad.jpg">File:Bad.jpg</a>
+<p><a href="/wiki/File:Bad.jpg" class="image"><img alt="Bad.jpg" src="http://example.com/images/0/09/Bad.jpg" decoding="async" width="320" height="240" /></a>
 </p>
Running test Bad images - T18039: text after bad image disappears [legacy]... FAILED!
/var/www/wiki-1.39/core/tests/parser/legacyMediaParserTests.txt:160
--- /tmp/mwParser-expectedKplne4	2023-06-25 15:01:14.074646538 +0100
+++ /tmp/mwParser-actual4pmkWw	2023-06-25 15:01:14.074646538 +0100
@@ -1,4 +1,4 @@
 <p>Foo bar
-<a href="/wiki/File:Bad.jpg" title="File:Bad.jpg">File:Bad.jpg</a>
+<a href="/wiki/File:Bad.jpg" class="image"><img alt="Bad.jpg" src="http://example.com/images/0/09/Bad.jpg" decoding="async" width="320" height="240" /></a>
 Bar foo
 </p>
Running test Bad images - in gallery [legacy]... FAILED!
/var/www/wiki-1.39/core/tests/parser/legacyMediaParserTests.txt:177
--- /tmp/mwParser-expected9FmVw7	2023-06-25 15:01:14.086646698 +0100
+++ /tmp/mwParser-actualgIaS8T	2023-06-25 15:01:14.086646698 +0100
@@ -1,6 +1,6 @@
 <ul class="gallery mw-gallery-traditional">
 		<li class="gallerybox" style="width: 155px"><div style="width: 155px">
-			<div class="thumb" style="height: 150px;"><a href="/wiki/File:Bad.jpg" title="File:Bad.jpg">Bad.jpg</a></div>
+			<div class="thumb" style="width: 150px;"><div style="margin:30px auto;"><a href="/wiki/File:Bad.jpg" class="image"><img alt="Bad.jpg" src="http://example.com/images/thumb/0/09/Bad.jpg/120px-Bad.jpg" decoding="async" width="120" height="90" srcset="http://example.com/images/thumb/0/09/Bad.jpg/180px-Bad.jpg 1.5x, http://example.com/images/thumb/0/09/Bad.jpg/240px-Bad.jpg 2x" /></a></div></div>
 			<div class="gallerytext">
 			</div>
 		</div></li>
Running test Bad images - basic functionality [legacy]... FAILED!
/var/www/wiki-1.39/core/tests/parser/mediaParserTests.txt:176
--- /tmp/mwParser-expected9eIxxb	2023-06-25 14:18:37.228692098 +0100
+++ /tmp/mwParser-actualSx1d7C	2023-06-25 14:18:37.228692098 +0100
@@ -1,2 +1,2 @@
-<p><a href="/wiki/File:Bad.jpg" title="File:Bad.jpg">File:Bad.jpg</a>
+<p><span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Bad.jpg" class="mw-file-description"><img alt="Bad.jpg" src="http://example.com/images/0/09/Bad.jpg" decoding="async" width="320" height="240" /></a></span>
 </p>
Running test Bad images - T18039: text after bad image disappears [legacy]... FAILED!
/var/www/wiki-1.39/core/tests/parser/mediaParserTests.txt:190
--- /tmp/mwParser-expectedM7R4Gx	2023-06-25 14:18:37.244692310 +0100
+++ /tmp/mwParser-actualx0Vyls	2023-06-25 14:18:37.244692310 +0100
@@ -1,4 +1,4 @@
 <p>Foo bar
-<a href="/wiki/File:Bad.jpg" title="File:Bad.jpg">File:Bad.jpg</a>
+<span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Bad.jpg" class="mw-file-description"><img alt="Bad.jpg" src="http://example.com/images/0/09/Bad.jpg" decoding="async" width="320" height="240" /></a></span>
 Bar foo
 </p>
Running test Bad images - in gallery [legacy]... FAILED!
/var/www/wiki-1.39/core/tests/parser/mediaParserTests.txt:209
--- /tmp/mwParser-expected3L4r77	2023-06-25 14:18:37.260692522 +0100
+++ /tmp/mwParser-actualXn4RRM	2023-06-25 14:18:37.260692522 +0100
@@ -1,6 +1,6 @@
 <ul class="gallery mw-gallery-traditional">
 		<li class="gallerybox" style="width: 155px">
-			<div class="thumb" style="height: 150px;"><span typeof="mw:Error mw:File"><a href="/index.php?title=Special:Upload&amp;wpDestFile=Bad.jpg" class="new" title="File:Bad.jpg"><span class="mw-broken-media" data-width="120" data-height="120">File:Bad.jpg</span></a></span></div>
+			<div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Bad.jpg" class="mw-file-description"><img alt="Bad.jpg" src="http://example.com/images/thumb/0/09/Bad.jpg/120px-Bad.jpg" decoding="async" width="120" height="90" srcset="http://example.com/images/thumb/0/09/Bad.jpg/180px-Bad.jpg 1.5x, http://example.com/images/thumb/0/09/Bad.jpg/240px-Bad.jpg 2x" /></a></span></div>
 			<div class="gallerytext">
 			</div>
 		</li>

Event Timeline

Reedy renamed this task from mediaParserTests.txt test failures in REL1_39 to media parser test failures in REL1_39.Jun 25 2023, 2:02 PM
Reedy updated the task description. (Show Details)

I guess this is the test result from your local environment.

These tests can fail when $wgLanguageCode in LocalSettings.php is not set to en. I did some cleanup and refactoring of the parser test runner recently, and this issue is fixed in commit b4e797510. I can upload a minimum fix for this in REL1_39 if necessary.

Yeah, almost certainly... It's interesting as REL1_35 is clean (at least on my test environment), but that's quite an old version. But both are set to en-gb.