In the book I’ve stuck at Chapter 12. I can reach the localhost/trackstar/admin page with no problem it comes nicely with the default theme as it meant to. But when I try to visit localhost/trackstar/admin/sysMessage/index , Yii gives me an Error 404 Unable to resolve. Tried my site on different server as well (just to make sure it’s not a fault of my apache server), but it didn’t work there either. So I suspect a fault in my config.
This is from my config/main.php
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'1234',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
'admin', //as you can see here I've added the admin module here.
),
My files are all where there meant to be:
- modules/
[list]
-
admin/
[list]
-
controllers/
[list]
-
SysMessageController.php
[*] models/
-
SysMessage.php
[*] views/
-
sysMessage/
[list]
-
{all the view files for sysMessage}
[/list]
[/list]
[/list]
[/list]
Also here is my urlManager settings:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'commentfeed'=>array(
'comment/feed',
'urlSuffix'=>'.xml',
'caseSensitive'=>false,
),
'<pid:\d+>/commentfeed'=>array(
'comment/feed',
'urlSuffix'=>'.xml',
'caseSensitive'=>false
),
'<module:\w+>/<controller:\w+>/<action:\w+>/<id:-?\d+>/<name:.*>'=>'<module>/<controller>/<action>',
),
'showScriptName' => false,
),
Ps.: I’m using Yii 1.1.8