vova07 / yii2-start

Yii2-Start application
Other
273 stars 115 forks source link

Can't access gii #70

Closed fwerner13 closed 10 years ago

fwerner13 commented 10 years ago

First: this is a great application, exactly what I was looking for.

But somehow I can't access the gii module (on a fresh install).

When I try to access it via mydomain.local/gii I get a 404 error.

Am I missing something?

ribris commented 10 years ago

mydomain.local/gii/ - slash at the end

vova07 commented 10 years ago

@ribris is right. You need to add / (slash) at the end. Closed! Thanx!

auzankyu commented 9 years ago

when i use gii for crud generator for "Barang" and i try to open backend/barang/default/index

Not Found (#404) Unable to resolve the request "barang/default/index".

vova07 commented 9 years ago

barang/default/index/ with / at the end.

auzankyu commented 9 years ago

same sir, 2 error log

5 19:45:09.172 error yii\web\HttpException:404 exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "barang/default/index".' in C:\xampp\htdocs\mantap\vendor\yiisoft\yii2\base\Module.php:461 Stack trace:

0 C:\xampp\htdocs\mantap\vendor\yiisoft\yii2\web\Application.php(83): yii\base\Module->runAction('barang/default/...', Array)

1 C:\xampp\htdocs\mantap\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))

2 C:\xampp\htdocs\mantap\backend\web\index.php(17): yii\base\Application->run()

3 {main}

Next exception 'yii\web\NotFoundHttpException' with message 'Unable to resolve the request "barang/default/index".' in C:\xampp\htdocs\mantap\vendor\yiisoft\yii2\web\Application.php:95 Stack trace:

0 C:\xampp\htdocs\mantap\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))

1 C:\xampp\htdocs\mantap\backend\web\index.php(17): yii\base\Application->run()

2 {main}

and ::::

29 19:45:09.526 error yii\i18n\PhpMessageSource::loadMessages The message file for category 'vova07/themes/admin' does not exist: C:\xampp\htdocs\mantap\vendor/vova07/yii2-start-themes/admin/messages/en-US/vova07/themes/admin.php Fallback file does not exist as well: C:\xampp\htdocs\mantap\vendor/vova07/yii2-start-themes/admin/messages/en/vova07/themes/admin.php C:\xampp\htdocs\mantap\vendor\vova07\yii2-start-themes\admin\views\layouts\main.php (34)

vova07 commented 9 years ago

I'm sorry, I was meaning /backend/barang/default/index/. And are you added the rules for your own modules in URL rules section of ***end/config/main.php ? Check this related issue please.

auzankyu commented 9 years ago

i already put '<_c>/<_a>' => '<_c>/<_a>', '<_m>/<_c>/<_a>' => '<_m>/<_c>/<_a>'

but it still not working for me ..

vova07 commented 9 years ago

Can you give more info. In with directory are the module's files? Barang is the module name, or this is the model name?

auzankyu commented 9 years ago

sorry i mean barang is the model name sir

vova07 commented 9 years ago

Ok then what is the controller or module name that you want to access? When you generate the CRUD, you generate the controller or the module? Thanks!

auzankyu commented 9 years ago

i generate app\controllers\BarangController in the controllers so i wrong sir?

vova07 commented 9 years ago

If BarangController is in the namespace app this is the problem. In my application, like in advanced template are 3 global namespaces backend, common and frontend. So you must use one of 2 for controllers: backend or frontend. In your case you just need to change namespace of your BarangController to frontend\controllers or to backend\controllers depends on your needs. After, you'll can access your controller by regulary route: ****/barang/index/ where index is the name of controller action.

auzankyu commented 9 years ago

thanks for your help sir, but i try to use modules for crud and it's work for me :)