I think I have fixed the main error if using stable versions with MW 1.91, by changing the line:-
//$text = $p->replaceVariables( $text, $parserOptions ); to: $text = $p->replaceVariables( $text->mText, $parserOptions ); should be passing mText (the wikitext of the page) as above instead of the entire Parser object.. I think
This extension now works (shows stable & draft version as expected' except the 'stable version is cached as the html such as:-
<ol><li>[[/Responsibilities of Social Worker Placing Child/]] </li><li>[[/Ongoing Support for the Carer/]] </li><li>[[/Role and Responsibilities of the Child's Social Worker/]] </li><li>[[/Other Support to Foster Carers/]] </li></ol>
rather than the wikitext:-
#[[/Responsibilities of Social Worker Placing Child/]] #[[/Ongoing Support for the Carer/]] #[[/Role and Responsibilities of the Child's Social Worker/]] #[[/Other Support to Foster Carers/]]
ie. write as wikitext, set as stable, and if you try to edit you get the HTML, if you 'revert' you get the wikitext back.
Any comments /. thoughts
Solved this problem, should have used:-
$text = $p->replaceVariables($article->mContent, $parserOptions );
Thanks for everyone suggestions, this is now working on 1.9.1
Ta
John
john Moorhouse wrote:
I think I have fixed the main error if using stable versions with MW 1.91, by changing the line:-
//$text = $p->replaceVariables( $text, $parserOptions ); to: $text = $p->replaceVariables( $text->mText, $parserOptions ); should be passing mText (the wikitext of the page) as above instead of the entire Parser object.. I think
mediawiki-l@lists.wikimedia.org