-1

次のコードでは、フォームが有効かどうかを確認し、有効な場合は次のページにリダイレクトしますが、次のエラーが表示されます: AN ERROR OCCURRED PAGE NOT FOUND EXCEPTION INFORMATION: Message: Invalid controller specified (undefined )

コードは次のとおりです。

public function indexAction()
    {
        global $current_user;

        if ( is_user_logged_in() ) {
            $mapper = new Site_Model_WpTerms();
            $main_categories = $mapper->fetchTerms(0,'ptype',true);
            $sizes = $mapper->fetchTerms(0,'size',true);
            $genders = $mapper->fetchTerms(0,'gender',true);
            $seasons = $mapper->fetchTerms(0,'season',true);
            $decades = $mapper->fetchTerms(0,'decade',true);
            $colors = $mapper->fetchTerms(0,'color',true);
            $styles = $mapper->fetchTerms(0,'style',true);
            $materials = $mapper->fetchTerms(0,'material',true);
            $patterns = $mapper->fetchTerms(0,'pattern',true);
            $others = $mapper->fetchTerms(0,'other',true);
            $condition = $mapper->fetchTerms(0,'condition',true);
            $shipping = $mapper->fetchTerms(0,'shipping',true);
            $this->view->colors = $colors;
            $form = new Site_Form_Submission($main_categories,$sizes,$genders,$seasons,$decades,$colors,$styles,$materials,$patterns,$others,$condition,$shipping);
            $this->view->form = $form;
            $this->view->finished_settings = self::finishedStep('finished_settings');

            if ($this->getRequest()->isPost()) {
                if (!$form->isValid($this->getRequest()->getParams())) {
                    $form->populate($this->getRequest()->getParams());
                }else{
                    $this->_helper->redirector('getpaid');
                }
            }
        }
        else{
            $this->_redirect('http://' . $_SERVER['HTTP_HOST'] . PHOTO_GUIDE);
        }
    }

アプリケーションでモジュールを使用していることに言及する必要があります。どんな助けでも本当に感謝します!

4

2 に答える 2

1

次のコードを試してください。

$redirector = $this->_helper->getHelper('Redirector');

$this->_redirector->setCode(303)
    ->setExit(false)
    ->setGotoSimple("this-action", "some-controller");
于 2012-10-24T13:56:52.527 に答える
0

これを試して$this->_helper->redirector('action','controller','module');

于 2012-10-25T08:00:17.127 に答える