E
E
EVOSandru62015-03-10 04:10:44
Yii
EVOSandru6, 2015-03-10 04:10:44

Why can't I access the Yii module?

Good afternoon,
Everything was fine, I went to the admin panel, threw my work on another project, made changes to the main theme and something glitched.
Here are the rules from config:

'rules'=>array(
          '<action:(login|logout)>' => 'user/<action>',
          '<action:(contact)>' => 'site/<action>',
          '<controller:\w+>/<id:\d+>'=>'<controller>/view',
          '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
          '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
          '<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>' =>'<module>/<controller>/<action>/<id>',
          '<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',

Here is the code from .htaccess
AddDefaultCharset utf-8
 
     RewriteEngine on

     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d

     RewriteRule . index.php

If I go to the address: website/sadmin , then I get to website/site/index
I write in layouts/main.php
//Текущий контроллер
    echo Yii::app()->controller->id . '<hr/>';
    //Текущий экшн
    echo Yii::app()->controller->action->id. '<hr/>';
    //Текущий модуль
    echo Yii::app()->controller->module->id. '<hr/>';

And I'm convinced of this, the module does not show anything.
What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Papa, 2015-03-10
Stifflera @PapaStifflera

The module is not registered in the config.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question