Extension talk:CentralNotice

Error when DB_table names are prefixed
MySQL a renvoyé l’erreur « 1109 : Unknown table 'cn_notices' in where clause

when the tables are prefixed with fr_ as are all the tables in my wiki. FrViPofm 17:16, 7 March 2009 (UTC)

Non-Wikimedia use?
Is this extension intended for non-Wikimedia use? It appears to ignore $wgDBprefix and to have the Wikimedia project names hard-coded. (Assuming that the instruction 2. Run central-auth.sql is a typo for 2. Run CentralNotice.sql) --MoreThings 19:34, 19 April 2009 (UTC)

how do you find out?
how do you find out if you have a "periodic scheduler (cron)"? Bud0011 08:25, 20 June 2009 (UTC)
 * You would probably need to ask your hosting provider. More info can be found at cron. Kaldari 17:11, 8 June 2010 (UTC)

um...where is this function?
So, i'm trying this extension out, and i get this error:


 * Fatal error: Call to undefined method SiteConfiguration::loadFullData in $IP/extensions/CentralNotice/SpecialNoticeText.php on line 213

but problem is, there's no "loadFullData" in any of the files .... is there? Bud0011 02:14, 11 August 2009 (UTC)

The same error:

 * Fatal error: Call to undefined method SiteConfiguration::loadFullData in /var/wwwpub/extensions/CentralNotice/SpecialNoticeText.php on line 213

What shall i do with it ? --Lugerr 11:20, 17 September 2009 (UTC)
 * For now, just disable the extension.... i guess....? Bud0011 21:17, 19 September 2009 (UTC)

loadFullData you find in the new Version von WM. 1.16. You can download that, and copy and paste it in the same .php

unable to make it work "(
when i write Run php maintenance/sql.php CentralNotice.sql in putty (in my wiki dir) it says '''X-Powered-By: PHP/5.2.14 Content-type: text/html

Warning: fopen(CentralNotice.sql) [function.fopen]: failed to open stream: No such file or directory in /home2/uetblogs/public_html/wiki/maintenance/sql.php on line 35

Unable to open input file''' and when i goto Special:CentralNotice it says, A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "CentralNotice::listNotices". Database returned error "1146: Table 'uetblogs_mdw1.mdw_cn_notices' doesn't exist (localhost)". i am a not a pro and wanted to have run CentralNotice active on my wiki. please help me.. whats wrong i am doing. Thanks --Adilch 09:28, 15 January 2011 (UTC)


 * I've changed the installation instructions so that the path should be correct. Give it another try. —Emufarmers(T 21:09, 15 January 2011 (UTC)
 * Thanks for simplifing things.. but i am still stuck... when i type "extensions/CentralNotice/CentralNotice.sql" it says "-bash: extensions/CentralNotice/CentralNotice.sql: Permission denied" where as Extensions dir already have 755 permission :( now what sir?? --Adilch 00:12, 16 January 2011 (UTC)


 * What you need to type is
 * php maintenance/sql.php extensions/CentralNotice/CentralNotice.sql
 * —Emufarmers(T 05:43, 16 January 2011 (UTC)
 * i wrote the same what you suggested, now it says,

Warning: fopen(extensions/CentralNotice/CentralNotice.sql) [function.fopen]: failed to open stream: No such file or directory in /home2/uetblogs/public_html/wiki/maintenance/sql.php on line 35

Unable to open input file --Adilch 21:53, 16 January 2011 (UTC)


 * You need to be running it from the wiki root (/home2/uetblogs/public_html/wiki/). —Emufarmers(T 07:29, 17 January 2011 (UTC)

How To Make Campaigns Appear?
Hi, I recently installed this extension, and I know it works because I've managed to setup site-wide banners once... but only once. As far as I understand, you make a banner, then set up a campaign (start time, end time, etc.), assign a banner to it, and then enable it.

I've set

$wgCentralDBname = 'my database name, as it appears in phpmyadmin';

$wgCentralPagePath = 'http://localhost/my wiki's name/index.php';

$wgNoticeProject = 'my wiki's name';

$wgNoticeProjects = array(	'my wiki's name', );

It's a vanilla version of mediawiki, with a localhost setup, nothing else added, just this extension, for the purpose of testing it out for my main wiki, but so far I haven't made much progress with it, and it seems like a really great extension. Can anyone help me figure out where I'm going wrong? --Pocket lint (talk) 21:50, 9 November 2012 (UTC)


 * Ack! I didn't watch this page until now so did not see your question -- did you manage to get CN working for you? Mwalker (WMF) (talk) 18:36, 14 January 2013 (UTC)

Invalid response from Extension Distributor remote client
Hi all, when i want to download this extension on the 1.1.19.0 version, i receive this error message. «Invalid response from Extension Distributor remote client.». Unfortunately I can't find any other way to find this version. anyone have an idea to resolve this problem ? Thank you. Robin - 15:35, 30 November 2012 (UTC)


 * I don't know the mechanics of Extension Distributor so I can't help you there -- and I don't believe we ever tagged a release of CN specifically for 1.19 -- if you're still interested in the extension and are still having this problem I would suggest emailing wikitech-l@lists.wikimedia.org or filing a bug about Extension Distributor. Alternately you can attempt to download the extension source directly from Git; but you will not be able to take HEAD. 1.19 does not have ContentHandler which CN now requires. Mwalker (WMF) (talk) 18:41, 14 January 2013 (UTC)

Database error
I am trying to use CentralNotice extension. After creating a banner at Central notice admin, when I click on the banner, it returns the following error:

Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: from within function. Database returned error  in.

I would really appreciate your help. Thank you


 * Make sure you run the /maintenance/update.php script which will bring your tables up to date. Unfortunately the SQL file we ship with for initial files hasn't been updated in a while and the patch to fix this has yet to be approved. If you still have problems -- join us in IRC channel #wikimedia-dev and look for mwalker.


 * Yes I have run the /maintenance/update.php script from the server SSH command line. Still same error.

Thank you

Fatal error: Class 'ContentHandler' not found
I have installed the extension, and loaded the Special page. When I try to save a new banner, I get the error: Fatal error: Class 'ContentHandler' not found in /var/www/html/eduWiki/extensions/wikimedia-mediawiki-extensions-CentralNotice-7f493c5/special/SpecialNoticeTemplate.php on line 917

Any ideas what to do?

Versions: Product 	Version MediaWiki 	1.20.3 PHP 	5.4.13 (apache2handler) MySQL 	5.5.30 Thanks.

Hello, I've received the same error, if you figured it out please let me know how to fix it. Thanks Adel23uk (talk) 20:34, 29 April 2013 (UTC)


 * Greetings; I'm guessing you both are running CentralNotice master out of git? You may use the REL1_20 branch of CentralNotice which should solve your issue. If you still have issues please contact me. Mwalker (WMF) (talk) 17:55, 20 September 2013 (UTC)

Conflict with MobileFrontend extension
MobileFrontend extension stopped working, after installing CentralNotice extension.

Any idea? would be appreciated...


 * None that I can immediately think of; they run side by side here on the WMF cluster. Do you have any Javascript or PHP errors being thrown into the appropriate logs? Mwalker (WMF) (talk) 21:27, 28 January 2014 (UTC)
 * thanks for the quick response. Sorry, its the opposite, MobileFrontend is working, but CentralNotice isn't. No errors at all. The templates of CentralNotice are working when i view them in force preview, but otherwise not working at all. Strange.--78.43.43.42 23:38, 29 January 2014 (UTC)
 * Ah! OK; best thing to do then is to look and see if any content namespace page (any page served by Special:Random) is attempting to load Special:BannerRandom. That's the endpoint that your wiki will serve banners from. If it's making the request to the correct wiki, then you'll need to make sure that the 'project' parameter in the request URL (set by $wgNoticeProject) matches something valid in the $wgNoticeProjects array; and that you have a banner set to target that project. Check Special:BannerAllocation and Special:GlobalAllocation to see what banners the system things are live and where they're targeting. Hope that helps, if it doesn't; keep talking here or you can find me on IRC on freenode in #wikimedia-fundraising -- I'm mwalker. Mwalker (WMF) (talk) 00:01, 30 January 2014 (UTC)
 * Oh, wait -- CentralNotice stopped working after you installed MobileFrontend? Check to see if the 'device' parameter of Spceial:BannerRandom is set. It could also be that you need to enable CentralNotice on mobile which is controlled by the $wgMFEnableSiteNotice variable. Mwalker (WMF) (talk) 00:05, 30 January 2014 (UTC)