Is this a Bug

Hi,

I am not sure if this is a bug or just me.

I created the forms, views, controller and model using Gii on my clients db table.

When I click on the create button, I am taken to my create page where I complete all the details and click on the submit button.

I have changed the controller to take me back to the index page after the create page and not to the view page of the new client. So after create, I am then directed back to the index view where I see a list of all my clients.

All column headings URL’s now point back to the create page?

So clicking on any of them for sorting does not work and takes me back to the create page again.

Only when I go back and click on the heading again does the sort work.

Anybody else got this problem or is it just me?

Thanks

It looks like you are using:


return $this->render('index', [

  'model' => $model,

]);

But you should use this:


$this->redirect(['index']);

Exactly that, thank you.