Make CentralNotice banner-hiding cookie work cross-site
Closed, ResolvedPublic

Description

Currently the collapse/expand state for the centralnotice banner is stored in a domain-specific browser cookie.

For those not using the secure.wikimedia.org interface (which puts all wikis on a single domain), this means they have to click the collapse thingy for every wiki they visit.

Further, if you visit the wikis from multiple computers or multiple browsers, the collapse state doesn't come with you. :(

For people who are logged in with a global account, it ought to be possible to stick the collapse/expand state into some kind of global preference that goes with the account; thus once logged in you'd stick with the option anywhere. This however would be dependent on having an infrastructure for maintaining such preferences, *and* some way to save it. :P

(bug 14950?)

I'm pretty sure we won't get to this in the next couple weeks, but this would be good to target to have done before the 2009-2010 fundraiser.

At a minimum, setting the cookie at one level up might be nice (eg *.wikipedia.org instead of just en.wikipedia.org).


Version: unspecified
Severity: enhancement

bzimport set Reference to bz16821.
brion created this task.Via LegacyDec 28 2008, 7:54 PM
Tfinc added a comment.Via ConduitMar 12 2009, 11:17 PM

Do we have any use for NOT collapsing it across all sites? If not then it should not be too hard to do.

bzimport added a comment.Via ConduitMar 12 2009, 11:30 PM

mike.lifeguard+bugs wrote:

(In reply to comment #1)

Do we have any use for NOT collapsing it across all sites? If not then it
should not be too hard to do.

Other than propagandizing/annoying users as much as possible, no. I'm not sure that's a goal we should have though :D

brion added a comment.Via ConduitMar 16 2009, 7:22 PM

Setting a domain-wide cookie is easy; doing it cross-domain is a bit harder (like how we do the login/logout cookies with images to hit the 3rd-party cookies).

kaldari added a comment.Via ConduitSep 30 2010, 1:16 AM

We should also include the GeoIPLookup info used by CentralNotice in the same cookie if possible.

saper added a comment.Via ConduitMar 11 2011, 11:26 PM

As a workaround (until bugs 27968 and 27448 are fixed), I am using Privoxy (http://www.privoxy.org) proxy filter and the rule:

{ +block{wikimedia}}
meta.wikimedia.org/w/index.php\?title=Special:Banner.*
geoiplookup.wikimedia.org

After the abovementioned bugs are fixed, the above will be fetched using SSL and not will not be within proxy's reach.

Privoxy, has, however ability to independently send a cookie to a site on behalf of the browser, so something like

{ +add-header{Cookie: mediawikicentralnotice=0} }
.wikipedia.org
.wikimedia.org
.wikiquote.org
.wikisource.org
....
....

could solve half of the problem (accepting a cookie) but not setting it cross-wiki.

saper added a comment.Via ConduitMar 12 2011, 2:59 AM

Please also see bug 17108 which says the reverse - each notice should have its own cookie.

kaldari added a comment.Via ConduitMar 12 2011, 5:19 AM

Theoretically, we could do both. Each banner has its own cookie(s) that hide it globally once set. Of course that puts us about at the same place we are now as far as how much close box clicking each editor has to do.

Without any clear guidance from either the community or the WMF I'm reluctant to implement either of these, however.

kaldari added a comment.Via ConduitDec 6 2011, 9:08 PM

Right now the domain parameter isn't set for the banner-hiding cookie, so it
just defaults to the full hostname (e.g. 'en.wikipedia.org'). To fix this we
would need to have it set to the domain name only, preceded by a dot (e.g.
'.wikipedia.org'). See SpecialBannerController line 195.

kaldari added a comment.Via ConduitJan 25 2012, 1:20 AM

I'm retitling this bug to focus its scope on changing the cookie domain, as this is the most reasonable solution until bug 14950 is fixed.

bzimport added a comment.Via ConduitJul 30 2013, 1:36 AM

mwalker wrote:

Actually, on second reading this isn't blocked on 14950; I just need to modify Special:HideBanners.

Eloquence added a comment.Via ConduitOct 29 2013, 8:26 PM

This is being discussed in:

http://lists.wikimedia.org/pipermail/wikitech-ambassadors/2013-October/thread.html#459

Does the approach https://wikimediafoundation.org/wiki/Template:HideBanners still work? If so it might be feasible to link to some variant of this page as a global-hide for non-fundraising banners until we have a better solution.

gerritbot added a comment.Via ConduitOct 30 2013, 9:32 PM

Change 92777 had a related patch set uploaded by Mwalker:
Crosswiki Banner Hiding

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

gerritbot added a comment.Via ConduitOct 30 2013, 11:33 PM

Change 92777 merged by jenkins-bot:
Crosswiki Banner Hiding

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

gerritbot added a comment.Via ConduitOct 31 2013, 12:03 AM

Change 92817 had a related patch set uploaded by Mwalker:
Enable CentralNotice CrossWiki Hiding

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

gerritbot added a comment.Via ConduitNov 4 2013, 10:20 PM

Change 92817 merged by Mwalker:
Enable CentralNotice CrossWiki Hiding

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

bzimport added a comment.Via ConduitNov 4 2013, 11:29 PM

mwalker wrote:

Seems to be working -- marking as resolved.

gerritbot added a comment.Via ConduitApr 15 2014, 7:44 PM

Change 126065 had a related patch set uploaded by Mwalker:
Enable CentralNotice CrossWiki Hiding

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

gerritbot added a comment.Via ConduitApr 15 2014, 11:00 PM

Change 126065 merged by Mwalker:
Enable CentralNotice CrossWiki Hiding

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

Nemo_bis added a comment.Via ConduitApr 17 2014, 3:49 PM
bzimport added a comment.Via ConduitJul 3 2014, 4:27 PM

mwalker wrote:

Heh; that's true; but then we re-enabled it here: https://gerrit.wikimedia.org/r/#/c/126998/

mxn added a subscriber: mxn.Via WebNov 24 2014, 8:55 PM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.