Page MenuHomePhabricator

Sitenotice can't be dismissed by unregistered users
Closed, ResolvedPublic

Description

Per Brion's bug 9209 comment 4, making the sitenotice dismissable (and loaded via JavaScript) for unregistered users is one of the main requirements of this extension.

I don't know exactly at what point this stopped working, I noticed only now. It was reported in 2012 at [[mw:Extension_talk:DismissableSiteNotice#How_can_anons_dismiss_a_notice.3F]].


Version: unspecified
Severity: major

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:29 AM
bzimport set Reference to bz57732.

I'm doing this right now, thanks to the TLV hackathon - by reintroducing $wgDismissableSiteNoticeForAnons.
I don't like it, but I'm going to keep the current encodeJsCall behavior for anons, in order not to introduce any Google-snippet-related issues.

  • Bug 26875 has been marked as a duplicate of this bug. ***

Change 112951 had a related patch set uploaded by Nemo bis:
Allow anonymous users to dismiss the sitenotice

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

I don't like it, but I'm going to keep the current encodeJsCall behavior for anons, in order not to introduce any Google-snippet-related issues.

That's partly superseded by https://gerrit.wikimedia.org/r/#/c/177589/
Or not! https://gerrit.wikimedia.org/r/#/c/177612/

To the best of my search abilities, these tags are only applicable to the Google Search Appliance, not the the regular crawler.

Change 112951 merged by jenkins-bot:
Allow anonymous users to dismiss the sitenotice

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

Thanks FreedomFighterSparrow and Brion! If you agree, I'd close this bug only after notifying all the (used) [[MediaWiki talk:Sitenotice]] pages in Wikimedia projects, which I'll do when the patch is deployed on all Wikipedias (on the 25th).

This should be deployed now, but I can't confirm the fix on Wikiquote.

The default is "off", to preserve the current Wikimedia behavior. I believe
enabling this on Wikimedia wikis is a separate request...

Right, I forgot the configuration change.

Change 193090 had a related patch set uploaded (by Nemo bis):
Set $wgDismissableSiteNoticeForAnon to true

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

Change 193090 merged by Brion VIBBER:
Set $wgDismissableSiteNoticeForAnon to true

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

I've deployed the config change, please test and confirm it's working as expected.

I'm not totally sure a new configuration variable was needed here, but I'm very glad to see this issue finally resolved. :-)

It's actually an old configuration variable re-introduced...
BTW, doesn't CentralNotice have its own banner-hiding code, and therefore
this can't be tested on WM wikis?

BTW, doesn't CentralNotice have its own banner-hiding code

I don't know. If that interferes with the sitenotice dismissal, that would be a CentralNotice bug in need of a fix. For sure, I'm still unable to dismiss sitenotices as unregistered user on any Wikimedia wiki I tried. :(

Apparently, even though I was worried about the effect on Wikimedia sites, I needn't have - CentralNotice uses its own code (bannerController.js) for hiding banners. Makes sense, as it needs a more complex mechanism - like hiding banners of a specific group (like "donations"), and not all banners whatsoever.

So this task is resolved; but somebody needs to allow the same for CentralNotice. @Nemo_bis, are you willing to open a new bug for that component?

Change 198542 had a related patch set uploaded (by Glaisher):
Fix typo in DismissableSiteNotice configuration

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

Change 198542 merged by jenkins-bot:
Fix typo in DismissableSiteNotice configuration

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

I still don't see the [dismiss] button when logged out. :S

Yes, it works. \o/

I still don't see the [dismiss] button when logged out. :S

Have you tried purging the page?

Oh.. yes. It works now :) I was clearing browser cache this whole time on the main pages of several wikis. It was working on Special: pages.

@gpaumier, I don't think there is a need to announce this in Tech News. The notice I sent to MediaWiki_talk:Sitenotice pages on all wikis already reaches all possible audiences.

@Nemo_bis: @Glaisher added it to the newsletter so I kept it. Feel free to discuss on the talk page; I think it's worth including.

I didn't realize that Nemo mass messaged about it but either way I also think it's worth including in the Tech News.