Page MenuHomePhabricator

SandboxLink redlink style broken
Closed, ResolvedPublicBUG REPORT

Assigned To
None
Authored By
Ammarpad
Feb 13 2026, 7:56 AM
Referenced Files
F72083831: image.png
Feb 13 2026, 7:19 PM
F72083833: image.png
Feb 13 2026, 7:19 PM
F72083842: image.png
Feb 13 2026, 7:19 PM
F72083837: image.png
Feb 13 2026, 7:19 PM
F72083829: image.png
Feb 13 2026, 7:19 PM
F72083823: image.png
Feb 13 2026, 7:19 PM
F72083817: image.png
Feb 13 2026, 7:19 PM
F72083840: image.png
Feb 13 2026, 7:19 PM

Description

The 'sandbox' link added by the extension should have the default new class (redlink) in legacy vector, monobook and skins where they used this styling.

Spun from T408968

Event Timeline

Ammarpad renamed this task from redlink vector 22 to SandboxLink redlink style broken.Feb 13 2026, 7:57 AM

Change #1239149 had a related patch set uploaded (by Ammarpad; author: Jdlrobson):

[mediawiki/extensions/SandboxLink@master] "new" class should apply to link NOT list item

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

Tested the patch on several skins:
(demo wikis: before: https://patchdemo.wmcloud.org/wikis/c93b0ed9a0, after: https://patchdemo.wmcloud.org/wikis/844a4c67e5)

Vector 2022Vector 2010MinervaTimelessMonobook
Before
image.png (1,903×1,008 px, 106 KB)
image.png (1,903×1,008 px, 93 KB)
image.png (1,903×1,008 px, 82 KB)
image.png (1,920×1,008 px, 114 KB)
image.png (1,920×1,008 px, 104 KB)
After
image.png (1,903×1,008 px, 108 KB)
image.png (1,903×1,008 px, 96 KB)
image.png (1,903×1,008 px, 84 KB)
image.png (1,920×1,008 px, 116 KB)
image.png (1,920×1,008 px, 106 KB)

So it appears that it fixes the bug on Vector 2022, Vector 2010, and Monobook; and has no effect on Timeless (which was not affected by the bug) and on Minerva (still bugged).

I don't know why the link color stopped appearing correctly in so many skins recently. It definitely worked in 2014 when I wrote this code (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SandboxLink/+/157296/5/SandboxLinkHooks.php#66). The link-class option may not have existed at the time, or maybe it wasn't widely supported by skins, but it seems more correct to use that today.

One last note, I noticed something weird on Minerva: when hovering the link with the mouse cursor, it displays a red underline before the patch, but not after. This seems like it intended to support the old code (with class) – although it didn't work correctly – but does not support the new code (with link-class). It doesn't really work anyway, so I don't mind this.

Minerva
Before
image.png (1,083×382 px, 37 KB)
After
image.png (1,083×382 px, 40 KB)

Change #1239149 merged by jenkins-bot:

[mediawiki/extensions/SandboxLink@master] "new" class should apply to link NOT list item

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