Extension talk:TemplateFormEditor

Hi Andreas, This is an excellent extension, easy install and easy use. Could it be possible to make some changes like following: TemplateFormEditor(or TFE) | Template pagename or users can use the parser functions like following: = Type Definiton = * Operating System : oneof (Windows NT,Windows XP,......) // choose one! ....... * Fixd day : date(yyyy/mm/dd) - // or users can use dd/mm/yyyy format. ....... Thanks. :-) --Roc michael 00:06, 9 May 2009 (UTC)
 * Add a specific tag for page editing using this extension like the picture shown
 * Use a specific parser like following to create and edit pages:
 * Make a specific date type like following:
 * I would like to Translate the extension in Chinese for public if you want to use translatewiki.net.

Fatal error
Fatal error: Call to undefined method Title::userCanEdit in /wiki/extensions/TemplateFormEdit/TemplateForm.Editor.php on line 92


 * Please try this fix:
 * userCanEdit has been removed from MediaWiki Rev.50951 (2009-05-24 08:59:39):--Dick K 23:05, 3 January 2011 (UTC)
 * userCanEdit has been removed from MediaWiki Rev.50951 (2009-05-24 08:59:39):--Dick K 23:05, 3 January 2011 (UTC)

Conflicts with AbuseFilter
When TamplateFormEditor is installed, and you try to edit a page with a template, if you have a filter it does not work. For example i tried to edit an article with this filter enabled:

wich works perfectly when you try to edit an article wich does not have a template on it.

If you try to ad an email adress in some of the fields on the Form, and hit SavePage button, it does not trigger the filter, but if you try to edit and article that does not have a template on it and you try to add and email adress, you see a warning telling you about the action if you set the filter to do so. I think, these behavior is related with TemplateFormEditor extension. Please can anyone tell me what is going on ?

Detected bug in an extension! Hook clsTemplateForm::eventhandler failed to return a value
It reports the following error when using MediaWiki 1.16.2 with PHP 5.3.3:

Detected bug in an extension! Hook clsTemplateForm::eventhandler failed to return a value; should return true to continue hook processing or false to abort. Backtrace:
 * 1) 0 xxxxxx/wiki/includes/EditPage.php(288): wfRunHooks('AlternateEdit', Array)
 * 2) 1 xxxxxx/wiki/includes/EditPage.php(271): EditPage->edit
 * 3) 2 xxxxxx/includes/Wiki.php(553): EditPage->submit
 * 4) 3 xxxxxx/includes/Wiki.php(70): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 5) 4 xxxxxx/wiki/index.php(117): MediaWiki->performRequestForTitle(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
 * 6) 5 {main}

Changes I made to get it working: 1. Editing line 14 of TemplateForm.Editor.php from static function eventhandler( &$editpage ) { to static function eventhandler( $editpage ) { I believe this is a PHP 5.3.x change

2. Edit line 92 of TemplateForm.Editor.php as mentioned below, from: if ( !$editpage->mTitle->userCanEdit ) { to if ( !$editpage->mTitle->userCan( 'edit' ) ) {

3. Edit line 107 of Templateform.UI.php from ' '.$n.'    '. wfMsg('editsummary'). to ' '.$n.'    '. wfMsg('summary').

4. Edit line 124 of Templateform.UI.php from . self::inputTag('submit',"wpDisable" ,wfMsg('wikitext')) to change "wikitext" to something valid, I don't have direct access to the DB to check what are valid values.