CentralNotice
CentralNotice is a message managment extension used extensively during the annual WikiMedia fundraiser along with various campaigns that the foundation and chapters are involved with.
Contents |
Operations
Disabling & Re-enabling CentralNotice
To disable CentralNotice, do the following:
- Login to fenari
- Edit the InitialiseSettings.php file
- cd /home/wikipedia/common/php-1.5/wmf-config/ && vim InitialiseSettings.php
- Locate the section wmgUseCentralNotice
- Comment out all lines that set a wiki to true, EXCEPT first entry default
- Set default to false.
- Save changes and sync out the file:
- sync-file InitialiseSettings.php disabling CentralNotice
To re-enable it, just uncomment the lines you commented out, and put true for default
Caching
Special:BannerListLoader is excluded from the normal Squid cache header override. This is accomplished by having "cache=/cn.js" in the URL, which matches a regex filter on the Squid side. The BannerListLoader is normally cached for 5 minutes on the server side and 5 minutes on the client side.
Special:BannerLoader is subject to the normal Squid cache header override. It is cached for 10 minutes on the server side and not cached at all on the client side.
Issues
Cache-Control headers
As of January 2011, the Cache-Control headers for Special:BannerController and Special:BannerListLoader are invalid. Specifically, they have an extra max-age parameter added by Apache. Due to this problem, banner lists may be cached by some browsers for 4 days instead of 10 minutes. See Bug 26338.
Memcached failure
If there is a memcached lookup failure when a banner is requested, the banner will not be shown. Instead, the Special:BannerLoader file will load with just the JavaScript comment "/* Failed cache lookup */". No error or other output from CentralNotice will be shown to the user.
If this happens:
- Identify which memcached node/s is the problematic one by running php /home/wikipedia/common/php-1.5/maintenance/mctest.php on a host that has nfs mounted.
- For each host listed with a get: 0 time remove them from /home/wikipedia/common/php-1.5/mc-pmtpa.php and replace with a spare.
- sync-file to the cluster
GeoIP lookup failure
CentralNotice adds a GeoIP lookup to the end of each page request. Once the lookup is completed, the rest of the JavaScript gets executed and the banner is displayed. If the GeoIP lookup fails, it may block the execution of other JavaScript (although the page itself will still render). If this is a chronic problem, it may be necessary to increase caching for the GeoIP lookups or to completely disable CentralNotice.