Page MenuHomePhabricator

Broken file thumbnails are no longer redlinked on skins other than Minerva
Closed, ResolvedPublicBUG REPORT

Description

Steps to reproduce

  1. Add a non-existing file as a thumbnail (e.g. [[File:No such file|thumb]]).
  2. Preview it.

Actual result

The link to the non-existing file is black (both in dark and light mode).

Expected result

The link is red, just like any other (file or non-file) link to non-existing pages.

Note: This seems to work fine in Minerva skin, which uses its own styling for images (e.g. doesn't use the media ResourceLoader SkinModule).

QA steps

Requirement

Broken file thumbnails should appear as redlinks across all skins, including Vector, not just Minerva. This ensures consistent styling for links to non-existent files.

BDD

Feature: Broken file thumbnail link styling

Scenario: Broken thumbnail link is red across all skins
Given I visit a page with a non-existent file thumbnail
When I view the page in light mode
Then the link to the file should appear in red

Scenario: Broken thumbnail link is red in dark mode
Given I view the page in dark mode
When the page contains a broken file thumbnail
Then the link should appear in red and the image alt text should remain legible

Scenario: Broken thumbnail is styled consistently across skins
Given I view the page in Minerva and Vector skins
Then the broken file thumbnail is red in both skins

Test Steps

Test Case 1: Link for broken file is red in Vector skin (light mode)

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/T395206
  2. Switch to light mode
  3. AC1: Confirm that "No such file" link is red (indicating a redlink)

Test Case 2: Link for broken file is red in Vector skin (dark mode)

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/T395206
  2. Switch to dark mode
  3. AC2: Confirm that "No such file" link is red and visible
  4. AC3: Confirm that image placeholder and text are legible in dark mode

Test Case 3: Link for broken file is red in Legacy Vector skin

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/T395206?useskin=vector
  2. AC4: Confirm that "No such file" link is red in both themes
  3. AC5: Confirm that image placeholder and text are legible

QA Results - Beta

QA Results - Prod

Other information

Event Timeline

Tacsipacsi changed the task status from Open to In Progress.

Change #1150061 had a related patch set uploaded (by Tacsipacsi; author: Tacsipacsi):

[mediawiki/core@master] fix(thumbnails): Do not override broken link colors

https://gerrit.wikimedia.org/r/1150061

Jdlrobson-WMF renamed this task from Broken file thumbnails are no longer redlinked to Broken file thumbnails are no longer redlinked in Vector 2022.May 28 2025, 3:04 PM
Jdlrobson-WMF updated the task description. (Show Details)

@Jdlrobson-WMF re the title change, FYI I can also reproduce this in skins other than V2022 (checked with V2010, Timeless, Monobook)

Jdlrobson-WMF renamed this task from Broken file thumbnails are no longer redlinked in Vector 2022 to Broken file thumbnails are no longer redlinked in all skins except Minerva.May 28 2025, 3:12 PM
Jdlrobson-WMF updated the task description. (Show Details)

Change #1150061 merged by jenkins-bot:

[mediawiki/core@master] fix(thumbnails): Do not override broken link colors

https://gerrit.wikimedia.org/r/1150061

Tacsipacsi renamed this task from Broken file thumbnails are no longer redlinked in all skins except Minerva to Broken file thumbnails are no longer redlinked on skins other than Minerva.May 28 2025, 6:17 PM
Tacsipacsi updated the task description. (Show Details)
Edtadros updated the task description. (Show Details)
Edtadros subscribed.

Test Result - Beta

Status: ❌ FAIL
Environment: beta
OS: macOS Sequoia 15.5
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Steps

Test Case 1: Link for broken file is red in Vector skin (light mode)

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/T395206
  2. Switch to light mode
  3. AC1: Confirm that "No such file" link is red (indicating a redlink)

screenshot 377.png (1×1 px, 279 KB)

Test Case 2: Link for broken file is red in Vector skin (dark mode)

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/T395206
  2. Switch to dark mode
  3. AC2: Confirm that "No such file" link is red and visible
  4. AC3: Confirm that image placeholder and text are legible in dark mode

screenshot 379.png (1×1 px, 283 KB)

Test Case 3: Link for broken file is red in Legacy Vector

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/T395206?useskin=vector
  2. AC4: Confirm that "No such file" link is red in both themes
  3. AC5: Confirm that image placeholder and text are legible

screenshot 380.png (1×1 px, 363 KB)

Huh, seems like the QA failures might be a Parsoid-related issue? I can reproduce the failures using https://en.wikipedia.beta.wmflabs.org/wiki/T395206?useparsoid=1, but I can't using https://en.wikipedia.beta.wmflabs.org/wiki/T395206?useparsoid=0.

Correct. Yep. Thanks for linking that @A_smart_kitten

@Edtadros for future testing you probably want to disable Parsoid in Special:Preferences on beta cluster - doing that all of these will pass.

A_smart_kitten reassigned this task from Jdlrobson-WMF to Tacsipacsi.

temporarily reopening as IMO this fix needs a backport to REL1_44 - I'll cherry-pick it in Gerrit now :)

Change #1152809 had a related patch set uploaded (by A smart kitten; author: Tacsipacsi):

[mediawiki/core@REL1_44] fix(thumbnails): Do not override broken link colors

https://gerrit.wikimedia.org/r/1152809

Change #1152809 merged by jenkins-bot:

[mediawiki/core@REL1_44] fix(thumbnails): Do not override broken link colors

https://gerrit.wikimedia.org/r/1152809

Test Result - Beta

Status: ✅ PASS
Environment: testwiki
OS: macOS Sequoia 15.5
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Steps

Test Case 1: Link for broken file is red in Vector skin (light mode)

  1. Visit https://test.wikipedia.org/wiki/Great_Molasses_Flood#Flood
  2. Switch to light mode
  3. AC1: Confirm that "No such file" link is red (indicating a redlink)

screenshot 13.png (960×1 px, 555 KB)

Test Case 2: Link for broken file is red in Vector skin (dark mode)

  1. Visit https://test.wikipedia.org/wiki/Great_Molasses_Flood#Flood
  2. Switch to dark mode
  3. AC2: Confirm that "No such file" link is red and visible
  4. AC3: Confirm that image placeholder and text are legible in dark mode

screenshot 14.png (960×1 px, 561 KB)

Test Case 3: Link for broken file is red in Legacy Vector

  1. Visit https://test.wikipedia.org/wiki/Great_Molasses_Flood?useskin=vector
  2. AC4: Confirm that "No such file" link is red in both themes
  3. AC5: Confirm that image placeholder and text are legible

screenshot 15.png (1×1 px, 627 KB)