Page MenuHomePhabricator

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


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

$wgNoticeCloseButton = '//';

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, 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).

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

This comment was removed by rosalieper.

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

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

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

not to be used again. New PS created.

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

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.

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)