error when Module controller loads view

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


	}


I couldn't reproduce the issue. Did you make any change to the generated code?

I think it has something to do with setting the theme in the module.

I have this line of code in my module DefaultController  actionIndex.

Yii::app()->setTheme('classic');

If I take that line out, then it works but loads th default layout.

My expected result of setTheme should look in the yii default themes folder.

Okay i figured out what was causing the error.

//// 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?

<?= $this->renderFile($this->getLayoutFile('_header')); ?>

<div id="side">

<?php echo $this->clips['sideContent'] ?>

</div><!--  side -->

<div id="content">

<?php echo $content; ?>

</div><!-- content -->

<br class="clearfloat" />

<?= $this->renderFile($this->getLayoutFile('_footer')); ?>

var_dump($this->getLayoutFile('_header'));

That line returns null when I do it in the module controller.

In a regular Yii controller, it actually returns a valid path.

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.