I'm not sure if its something I did or not, but I get this error after trying to access a DefaultController in a Module I just created using the console.
Fatal error: CBaseController::require() [function.require]: Failed opening required '' (include_path='.;\xampplite\php\pear;C:\xampplite\htdocs\yii1\webroot\flocms\protected\models;C:\xampplite\htdocs\yii1\webroot\flocms\protected\components') in C:\xampplite\htdocs\yii1\framework\web\CBaseController.php on line 123
public function renderInternal($_viewFile_,$_data_=null,$_return_=false)
{
// we use special variable names here to avoid conflict when extracting data
if(is_array($_data_))
extract($_data_,EXTR_PREFIX_SAME,'data');
else
$data=$_data_;
if($_return_)
{
ob_start();
ob_implicit_flush(false);
require($_viewFile_);
return ob_get_clean();
}
else
require($_viewFile_); /////// line 123
}
//// here is my main.php file. The $this->renderFile is causing the error. This works fine when I'm not in a Module controller. The reason why I'm doing this because I have 5 different layoutfiles and want to share _header and _footer for each. Is there another way?
That's expected because theoretically, a module should not access files outside of it. So $this->getLayoutFile() actually looks for the view file under the module's layout path.