Mediawiki重定向到编辑一个不存在的页面


Mediawiki redirect to the edit of a non existing page

>我正在添加一个带有扩展名的动作

问题是我需要重定向到不存在的页面的编辑部分

我试过这个

<?php
public function onSubmit( $data ) {
    $title = Title::newFromText( $stringTitle );
    $newArticle = Article::newFromTitle( $title, $this->getOutput() );
    $editor = new EditPage( $newArticle );
    if( count($errors) > 0 ){
        return $errors;
    }
    $editor->edit();
    return false;
}

但它让我编辑当前页面而不是具有不同标题的新页面

我也试过这个

$title = Title::newFromText( $stringTitle );
global $wgOut;
$wgOut->redirect( $title->getFullURL() );

我确实重定向到所需的页面,但不在编辑模式下

尝试$wgOut->redirect( $title->getFullURL( 'action=edit' ) );