Last modified: 2012-09-21 12:47:11 UTC
Semantic Bundle - version 20120327 Semantic form - version: 2.4.2 To reproduce the bug Choose a category with a form and a template. Insert a new instance of that category. Enter the name of the new instence and submit You land in form page. Click Cancell You will land in the same form page. You should be landed in the page you enter new instance name Fix: file "mediawiki/extensions/SemanticForms/includes/SF_FormUtils.php" method: "cancelLinkHTML" Let's apply the attached patch file.
Created attachment 11133 [details] path file. new method: static function cancelLinkHTML( $is_disabled, $label = null, $attr = array() ) { global $wgTitle, $wgParser; if ( $label == null ) { $label = $wgParser->recursiveTagParse( wfMsg( 'cancel' ) ); } if ( $wgTitle == null ) { $cancel = ''; } // if we're on the special 'FormEdit' page, just send the user // back to the previous page they were on // IMOLA: FIX TS-238 elseif ( ( strstr($wgTitle,'ModificaDati') || strstr($wgTitle,'FormEdit') ) && $wgTitle->getNamespace() == NS_SPECIAL ) { if (stristr($_SERVER['HTTP_USER_AGENT'], "msie 7")||stristr($_SERVER['HTTP_USER_AGENT'], "msie 8")){ $cancel = '<a href="javascript:history.go(-2);">' . $label . '</a>'; }else{ $cancel = '<a href="javascript:history.go(-1);">' . $label . '</a>'; } } else { $linker = class_exists( 'DummyLinker' ) ? new DummyLinker() : new Linker(); $cancel = $linker->link( $wgTitle, $label, array(), array(), 'known' ); } $text = "\t\t<span class='editHelp'>$cancel</span>\n"; return $text; }
Wow - it looks like that code hasn't been working for a long time; if it ever worked. Thanks for the patch! I just checked in a modified version of this code.