D
D
dev_sysoev2015-01-19 20:46:01
Yii
dev_sysoev, 2015-01-19 20:46:01

Yii. Why does it throw 404 when creating an action in modules.admin?

I have a modules/admin module, it has a controller/main, in the controller I create any action

public function actions()
{
  return array(
            'fileUpload'=>'application.ext.redactor.actions.FileUpload',
      или
            'fileUpload'=>function(){echo'TEST';},
        );
}

But when going to admin/main/fileUpload , it returns 404, although for example it outputs echo'TEST' but also below 404.
The same structure in the application root works fine, for example:
public function actions()
  {
    return array(
      'page'=>array(
        'class'=>'CViewAction',
      ),
    );
  }

What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zelenin, 2015-01-20
@zelenin

in the typo action/actions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question