Problem with controller

Anyone know what this error means?

The URL I am using is "index.php?r=patientnotes/create&id=3"

And I have a controller named "PatientNotesController.php" in my controllers folder, also all the other controllers seem to work?

Also I have a method named "actionCreate".

Array ( [code] => 404 [type] => CHttpException [errorCode] => 0 [message] => Unable to resolve the request “patientnotes/create”. [file] => /home/pounding/public_html/jamesbarnsley.com/showcase/yii/framework/web/CWebApplication.php [line] => 328 [trace] => #0 /home/pounding/public_html/jamesbarnsley.com/showcase/yii/framework/web/CWebApplication.php(121): CWebApplication->runController(‘patientnotes/cr…’) #1 /home/pounding/public_html/jamesbarnsley.com/showcase/yii/framework/base/CApplication.php(135): CWebApplication->processRequest() #2 /home/pounding/public_html/jamesbarnsley.com/showcase/DoctorApp/index.php(13): CApplication->run() #3 {main} [source] => Array ( [316] => public function runController($route) [317] => { [318] => if(($ca=$this->createController($route))!==null) [319] => { [320] => list($controller,$actionID)=$ca; [321] => $oldController=$this->_controller; [322] => $this->_controller=$controller; [323] => $controller->init(); [324] => $controller->run($actionID); [325] => $this->_controller=$oldController; [326] => } [327] => else [328] => throw new CHttpException(404,Yii::t(‘yii’,‘Unable to resolve the request “{route}”.’, [329] => array(’{route}’=>$route===’’?$this->defaultController:$route))); [330] => } [331] => [332] => /** [333] => * Creates a controller instance based on a route. [334] => * The route should contain the controller ID and the action ID. [335] => * It may also contain additional GET variables. All these must be concatenated together with slashes. [336] => * [337] => * This method will attempt to create a controller in the following order: [338] => *

[339] => *

If the first segment is found in {@link controllerMap}, the corresponding [340] => * controller configuration will be used to create the controller;

) )

Also it works on my localhost but not on the live server.

Ok it works if I do "r=PatientNotes/create". Why is that? the other ones are not case sensitive but that one is?

Also it cannot find the "CreateOrEdit" view after that, but on every other one it can?

I’m kinda guessing the url you should use is this:

"index.php?r=patientnotes/create?id=3"

or "index.php?r=patientnotes/create/?id=3"

(note the use of ? rather than &)

I’m assuming ‘id’ is the patient ‘id’ and the notes are related, because normally on create, the id would be auto-incremented and not needed as a parameter.

Ok thanks everyone for your input.

The real problem was to do with uppercase / lowercase controller names.

It was working on the other controllers because Yii makes the first letter uppercase even if it is lowercase automatically.

But on my PatientNotes it was not working for the "N".

So after I renamed my PatientNotesController to PatientnotesController it works.

Gratz.