Page MenuHomePhabricator

CentralNotice: $wgNoticeCloseButton shouldn't load closeWindow19x19.png from upload.wikimedia.org
Closed, ResolvedPublic

Description

A bit odd to see it load an image from a url.

$wgNoticeCloseButton = '//upload.wikimedia.org/wikipedia/foundation/2/20/CloseWindow19x19.png';

The image is part of MediaWiki core, so there's a stable url it could use to load it from the local wiki (it's in skins/common/).

But instead of loading it from the local wiki, or from bits.wikimedia.org, or Wikimedia Commons, it loads it from foundationwiki.

Let's not do that. Since skins/common has been deprecated, this should just be added to the extension.

Better yet, why is it configurable? Sounds like it shouldn't be an <img> either, but just somewhere in a CSS background-image, with @embed for automatic optimised loading via ResourceLoader (embedded in CSS, no extra http request).


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:52 AM
bzimport set Reference to bz70462.
bzimport added a subscriber: Unknown Object (MLST).
Krinkle created this task.Sep 5 2014, 9:03 PM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald TranscriptOct 21 2015, 7:19 AM

I will like to work on this bug, is it still open?

This comment was removed by rosalieper.
rosalieper set Security to None.
rosalieper added a comment.EditedOct 21 2015, 7:27 PM

I can't find any global variable called $wgNoticeCloseButton, where can i find it in the CentralNotice extension?

Change 247962 had a related patch set uploaded (by Rosalieper):
$wgNoticeCloseButton shouldn't load closeWindow19x19.png from upload.wikimedia.org

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

Change 247990 had a related patch set uploaded (by Rosalieper):
$wgNoticeCloseButton shouldn't load closeWindow19x19.png from upload.wikimedia.org

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

Change 247962 abandoned by Rosalieper:
$wgNoticeCloseButton shouldn't load closeWindow19x19.png from upload.wikimedia.org

Reason:
not to be used again. New PS created.

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

KTC added a subscriber: KTC.Oct 22 2015, 12:12 PM

Even if you make the change here, it's not going to make any differences to those banners that are inserting the image manually through its own code.

Change 247990 merged by jenkins-bot:
Make $wgNoticeCloseButton not load closeWindow19x19.png from upload.wikimedia.org

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

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptAug 29 2016, 9:43 PM

It seems this is still being loaded in Beta Labs. Has this change made it into the relevant branches since last year?

The meta.beta site has an up-to-date CentralNotice, with the closeWindow png change merged. The "add a close box" feature works by substituting code directly into the banner content, however. I'm assuming the remaining traffic is coming from legacy banners, and that we'll have to update these by hand.

Krinkle added a comment.EditedAug 29 2016, 10:23 PM

Thanks. I fixed the immediate problem by fixing the three currently active Beta banners (for browser tests). Replace the <img border=0 src=... alt=..> with <div class="cn-closeButton">Close</div>. (diff 1/3)

Krinkle closed this task as Resolved.Oct 26 2016, 12:25 AM