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

Details

Reference
bz57732
bzimport set Reference to bz57732.
Nemo_bis created this task.Nov 29 2013, 9:15 AM

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. ***

Submitted gerrit change 112951.

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

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

Nemo_bis added a comment.EditedDec 4 2014, 8:22 PM

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

brion added a comment.Feb 26 2015, 5:15 PM

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

gpaumier set Security to None.Feb 26 2015, 11:18 PM

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

Seems to be fine now. @Nemo_bis, please approve :-)

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

Nemo_bis closed this task as "Resolved".Mar 24 2015, 3:36 PM

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.