I’m new to Yii, and I need to add an action inside a controller. I’m working on a project already started by other people, and I’ve seen there are some custom actions but when I’m going to add a new one, I always get to a page telling me I’m not authorized to access the view. I’m tryin’ an action called “actionTest” where I’m just rendering to another view. To call the action I’m typing the address 172.16.102.200/index.php/plc/test. Inside the controller PlcController there’s another custom action that works but I didn’t notice any difference of implementation ( I’ve also tried to copy the code of the other action ). I’ve also checked the access rules and the code inside is a simple “return array();”. Is there another place where I need to specify authorization rules for calling the new action?
I’m still searching some information in the forum but nothing has solved my problem yet
In your controller file there is a function named as " public function accessRules()", please add your action in that. If nothing is written inside it then please tell me your controller extends which class??( written on first line).