Overriding default system views located under framework/views

Hello,

I tried to override the default system views located under framework/views as instructed here: http://www.yiiframework.com/doc/guide/1.1/en/basics.view

"Yii provides a set of default system views located under framework/views. They can be customized by creating the same-named view files under protected/views/system."

So I created protected/views/system/error404.php but it had absolutely no effect when I tried to access a non-existent URL (like: index.php?r=lalala).

Please help. Thanks.

Welcome to the forum!

It’s because the error handler is configured to use ‘site/error’ action in ‘/protected/config/main.php’.




	// application components

	'components'=>array(

		....

		'errorHandler'=>array(

			// use 'site/error' action to display errors

			'errorAction'=>'site/error',

		),

		....

	),



Try commenting out the above lines.

Thanks :)