The same code generates the error 'PostController cannot find the requested view “searchResult” when executed in the actionSearch method of the PostController.
Do you also have ‘searchResult’ view in ‘protected/views/post/’ directory?
If you only want to access ‘searchResult’ view in in ‘protected/views/site/’ directory, you may need to change path when rendering view (in PostController):