Having spent a day re-reading TFM and Googling, I am getting no closer to solving a problem with parser functions not working.
Something complicated like DPL works like a charm, but not something basic like {{#if: {{{x|}}}|yes|no}} which renders as {{#if: |yes|no}}. Obviously I am missing something /really/ fundamental! I believe it is installed correctly:
Special pages Special:Version:
* MediaWiki: 1.10.1 * PHP: 5.2.0 (cgi-fcgi) * MySQL: 4.1.21-standard
Parser hooks DynamicPageList2 (version 1.3.1) ParserFunctions
Extension functions wfSetupParserFunctions, wf_include, wfDynamicPageList3 and wfDynamicPageList2
Parser function hooks #expr, #if, #ifeq, #ifexpr, #switch, #ifexist, #time, dpl, int, ns, urlencode, lcfirst, ucfirst, lc, uc, localurl, localurle, fullurl, fullurle, formatnum, grammar, plural, numberofpages, numberofusers, numberofarticles, numberoffiles, numberofadmins, numberofedits, language, padleft, padright, anchorencode, special and defaultsort
$ grep ParserFunctions LocalSettings.php require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); $ ls extensions/ParserFunctions/ParserFunctions.php extensions/ParserFunctions/ParserFunctions.php ls extensions/ExtensionFunctions.php extensions/ExtensionFunctions.php
Any hints on how to fix this would be much appreciated!
Thanks -- Frank
On 16/08/07, Frank Middleton f.middleton@apogeect.com wrote:
Having spent a day re-reading TFM and Googling, I am getting no closer to solving a problem with parser functions not working.
Something complicated like DPL works like a charm, but not something basic like {{#if: {{{x|}}}|yes|no}} which renders as {{#if: |yes|no}}. Obviously I am missing something /really/ fundamental! I believe it is installed correctly:
Special pages Special:Version:
* MediaWiki: 1.10.1 * PHP: 5.2.0 (cgi-fcgi) * MySQL: 4.1.21-standard
Parser hooks DynamicPageList2 (version 1.3.1) ParserFunctions
Extension functions wfSetupParserFunctions, wf_include, wfDynamicPageList3 and wfDynamicPageList2
Parser function hooks #expr, #if, #ifeq, #ifexpr, #switch, #ifexist, #time, dpl, int, ns, urlencode, lcfirst, ucfirst, lc, uc, localurl, localurle, fullurl, fullurle, formatnum, grammar, plural, numberofpages, numberofusers, numberofarticles, numberoffiles, numberofadmins, numberofedits, language, padleft, padright, anchorencode, special and defaultsort
$ grep ParserFunctions LocalSettings.php require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); $ ls extensions/ParserFunctions/ParserFunctions.php extensions/ParserFunctions/ParserFunctions.php ls extensions/ExtensionFunctions.php extensions/ExtensionFunctions.php
Any hints on how to fix this would be much appreciated!
Is this a public wiki? If so, can we have the URL?
Rob Church
Rob Church wrote:
On 16/08/07, Frank Middleton f.middleton@apogeect.com wrote:
Having spent a day re-reading TFM and Googling, I am getting no closer to solving a problem with parser functions not working.
Something complicated like DPL works like a charm, but not something basic like {{#if: {{{x|}}}|yes|no}} which renders as {{#if: |yes|no}}. Obviously I am missing something /really/ fundamental! I believe it is installed correctly:
Special pages Special:Version:
* MediaWiki: 1.10.1 * PHP: 5.2.0 (cgi-fcgi) * MySQL: 4.1.21-standard
Parser hooks DynamicPageList2 (version 1.3.1) ParserFunctions
Extension functions wfSetupParserFunctions, wf_include, wfDynamicPageList3 and wfDynamicPageList2
Parser function hooks #expr, #if, #ifeq, #ifexpr, #switch, #ifexist, #time, dpl, int, ns, urlencode, lcfirst, ucfirst, lc, uc, localurl, localurle, fullurl, fullurle, formatnum, grammar, plural, numberofpages, numberofusers, numberofarticles, numberoffiles, numberofadmins, numberofedits, language, padleft, padright, anchorencode, special and defaultsort
$ grep ParserFunctions LocalSettings.php require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); $ ls extensions/ParserFunctions/ParserFunctions.php extensions/ParserFunctions/ParserFunctions.php ls extensions/ExtensionFunctions.php extensions/ExtensionFunctions.php
Any hints on how to fix this would be much appreciated!
Is this a public wiki? If so, can we have the URL?
Well, it's semi-public - read only except for registered users, and it's only a week or so old, so we're still using the monobbok skin, for example. I need to get this #if problem fixed so we can go on to more aesthetic issues :-) and there's so much to get up to speed on!
There's a test page at http://middleton-stjohns.com/mediawiki/index.php?title=Test {{Test}} {{Test |x=xyzzy }} and the template it uses is at http://middleton-stjohns.com/mediawiki/index.php?title=Template:Test {| {{#if: {{{x|}}}|yes|no}} |} and Test renders as {{#if: |yes|no}} {{#if: xyzzy|yes|no}}
The only source code modification is to fix the bug in Language.php, line 1137, missing an "else" (there is an entry in bugzilla for this).
If you need an account to diagnose this, please let me know.
-- Frank
Rob Church
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Thanks for your time. However, I gave up on parser functions and installed http://www.mediawiki.org/wiki/Extension:Winter instead. Not only does the {{#if|}} function work, it also has looping constructs that some other poster recently requested. Not exhaustively tested, but so far it looks good...
Frank Middleton wrote:
Rob Church wrote:
On 16/08/07, Frank Middleton f.middleton@apogeect.com wrote:
Having spent a day re-reading TFM and Googling, I am getting no closer to solving a problem with parser functions not working.
Something complicated like DPL works like a charm, but not something basic like {{#if: {{{x|}}}|yes|no}} which renders as {{#if: |yes|no}}. Obviously I am missing something /really/ fundamental! I believe it is installed correctly:
Special pages Special:Version:
* MediaWiki: 1.10.1 * PHP: 5.2.0 (cgi-fcgi) * MySQL: 4.1.21-standard
Parser hooks DynamicPageList2 (version 1.3.1) ParserFunctions
Extension functions wfSetupParserFunctions, wf_include, wfDynamicPageList3 and wfDynamicPageList2
Parser function hooks #expr, #if, #ifeq, #ifexpr, #switch, #ifexist, #time, dpl, int, ns, urlencode, lcfirst, ucfirst, lc, uc, localurl, localurle, fullurl, fullurle, formatnum, grammar, plural, numberofpages, numberofusers, numberofarticles, numberoffiles, numberofadmins, numberofedits, language, padleft, padright, anchorencode, special and defaultsort
$ grep ParserFunctions LocalSettings.php require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); $ ls extensions/ParserFunctions/ParserFunctions.php extensions/ParserFunctions/ParserFunctions.php ls extensions/ExtensionFunctions.php extensions/ExtensionFunctions.php
Any hints on how to fix this would be much appreciated!
Is this a public wiki? If so, can we have the URL?
Well, it's semi-public - read only except for registered users, and it's only a week or so old, so we're still using the monobbok skin, for example. I need to get this #if problem fixed so we can go on to more aesthetic issues :-) and there's so much to get up to speed on!
There's a test page at http://middleton-stjohns.com/mediawiki/index.php?title=Test {{Test}} {{Test |x=xyzzy }} and the template it uses is at http://middleton-stjohns.com/mediawiki/index.php?title=Template:Test {| {{#if: {{{x|}}}|yes|no}} |} and Test renders as {{#if: |yes|no}} {{#if: xyzzy|yes|no}}
The only source code modification is to fix the bug in Language.php, line 1137, missing an "else" (there is an entry in bugzilla for this).
If you need an account to diagnose this, please let me know.
-- Frank
Rob Church
In solving a problem with maintenance/dumpBackup.php (fixed by using php5 -c /path_to/php.ini) I found this in the previously disabled log
"" is not a valid magic thingie for "#expr" "" is not a valid magic thingie for "#if" "" is not a valid magic thingie for "#ifeq" "" is not a valid magic thingie for "#ifexpr" "" is not a valid magic thingie for "#switch" "" is not a valid magic thingie for "#ifexist" "" is not a valid magic thingie for "#time"
It seems that wfParserFunctionsLanguageGetMagic isn't being called for some reason. The following line was commented out in ParserFunctions.php
$wgHooks['LanguageGetMagic'][] = 'wfParserFunctionsLanguageGetMagic';
but uncommenting it appears to make no difference. Could one of you php gurus out there suggest a way of debugging this? Doubtless the non-working [[subst...]] fails for a similar reason. Editing the php files isn't a problem but the internals of the hook logic is somewhat inscrutable to a php neophyte. Looking for tips, not a fix. Thanks!
Frank Middleton wrote:
Having spent a day re-reading TFM and Googling, I am getting no closer to solving a problem with parser functions not working.
Something complicated like DPL works like a charm, but not something basic like {{#if: {{{x|}}}|yes|no}} which renders as {{#if: |yes|no}}. Obviously I am missing something /really/ fundamental! I believe it is installed correctly:
Special pages Special:Version:
* MediaWiki: 1.10.1 * PHP: 5.2.0 (cgi-fcgi) * MySQL: 4.1.21-standard
Parser hooks DynamicPageList2 (version 1.3.1) ParserFunctions
Extension functions wfSetupParserFunctions, wf_include, wfDynamicPageList3 and wfDynamicPageList2
Parser function hooks #expr, #if, #ifeq, #ifexpr, #switch, #ifexist, #time, dpl, int, ns, urlencode, lcfirst, ucfirst, lc, uc, localurl, localurle, fullurl, fullurle, formatnum, grammar, plural, numberofpages, numberofusers, numberofarticles, numberoffiles, numberofadmins, numberofedits, language, padleft, padright, anchorencode, special and defaultsort
$ grep ParserFunctions LocalSettings.php require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); $ ls extensions/ParserFunctions/ParserFunctions.php extensions/ParserFunctions/ParserFunctions.php ls extensions/ExtensionFunctions.php extensions/ExtensionFunctions.php
Any hints on how to fix this would be much appreciated!
Thanks -- Frank
mediawiki-l@lists.wikimedia.org