So, I have a project with multiple controllers and all has been good but I’ve run into a situation where in my UserController it’s unable to find the ‘index’ view… it’s in protected/user/view/index.php
I tried setting render(’//user/index’) and that caused $this->getViewFile($view) in the framework\web\CController.php to report ‘UserController cannot find the requested view “_view”.’
When I substitute in render(’//site/index’), it loads the site index.php view properly
Yea, sorry, I miscommunicated that. The index.php in the correct location. When I swapped out user and site, the userController loads/renders the “/site/index”… I’ve created literally hundreds of views and controllers, just sometimes, with some of my yii apps, this scenario happens, and I haven’t been able to figure out why yet. Hopefully I’ll figure it out and I’ll update this post when I do if no one has a clue here.
if I put that into the UserController, it’s going to load the view\user\index.php
What I was saying is that if I fully qualify the render("\views\$controller_name\$view_name") using the $controller_name=‘site’, that it works as expected and loads the site’s index.php
Again, I appreciate you trying, but it’s obvious that this problem is mine to solve. I’m juggling multiple projects, so when I get back to this one and solve it, I’ll explain what the remedy was if I discover it.