M
M
Maxim Timofeev2015-05-29 19:42:39
Yii
Maxim Timofeev, 2015-05-29 19:42:39

In yii1 $this->render redirects to the main page. Where to dig?

With echo everything is ok:

public function actionForm()
    {
        echo "пипец"
    }

outputs "kick",
and if render:
public function actionForm()
    {
        $this->render('form');
    }

redirects to the main page
Where to dig. The site was not made by me, probably somewhere the author redefined something. Where to dig?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Timofeev, 2015-05-29
@webinar

I found the problem myself and everything turned out to be trite in the layout main, they are loaded through renderpartial files, and they are in a folder from another controller, so he didn’t find them

D
Dmitry Bay, 2015-05-29
@kawabanga

First, see if the code before $this->render is executed;
Then try to localize the location of the redirect,
I usually use exit; in code. Find a place, go inside the function.

E
Evgeny Bukharev, 2015-05-29
@evgenybuckharev

Redirects or renders main?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question