Extension talk:RawMsg
pre and p tags are added to the code [edit]
I tried to use this extension to insert Google AJAX Search API to a wiki, but there were some pre and p tags generated and spaces were turned into & nbsp ; which stopped the code from working. Any idea to get REAL RAW msg?
MediaWiki 1.19a fatal error [edit]
On MediaWiki 1.19a I'm seeing the following code fail with a fatal error, effectively shutting down the entire wiki:
# Add system messages global $wgMessageCache; $wgMessageCache->addMessage('rawmsg-missing-params', 'Error: <nowiki>{{#rawmsg:}}</nowiki> is missing a required parameter.'); $wgMessageCache->addMessage('rawmsg-missing-article', 'Error: RawMsg cannot find the article [[MediaWiki:rawmsg-$1]].');
failing with:
PHP Fatal error: Call to a member function addMessage() on a non-object in /home/sophia/domains/extensions/RawMsg.php on line 73
$wgMessageCache is deprecated with a big fat This feature was removed completely in version 1.18.0 in the manual. This extension is therefore now broken, short of removing these lines and creating MediaWiki:rawmsg-missing-params, MediaWiki:rawmsg-missing-article manually. --Carlb 01:54, 14 February 2012 (UTC)
I added a RawMsg.i18n.php file with the contents
<?php $messages = array(); $messages['en'] = array( 'rawmsg-missing-params' => 'Error: <nowiki>{{#rawmsg:}}</nowiki> is missing a required parameter.', 'rawmsg-missing-article' => 'Error: RawMsg cannot find the article [[MediaWiki:rawmsg-$1]].', );
commented out the three lines with $wgMessageCache, and added this line to RawMsg.php (after the $wgExtensionCredits part):
$wgExtensionMessagesFiles['RawMsg'] = dirname( __FILE__ ) . '/RawMsg.i18n.php';
This seems to work nicely (1.18.1). --Tgr (talk) 09:40, 26 February 2012 (UTC)