Yii Framework Forum: plz help for error: cannot find the requested view - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

plz help for error: cannot find the requested view Rate Topic: -----

#1 User is offline   ilias 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 07-March 11

Posted 27 December 2011 - 06:14 AM

Hi,
Please could anyone help on the following error? 'PostController cannot find the requested view "searchResult"'.
In the protected/controllers path, i have:
SiteController
PostController

While the siteController executes successfully the code in the actionSearch method:
 $this->render('searchResult',array(       'result'=>$items,'items_feedbacks_count'=>$item_feedbacks_count,'stars'=>$feedback_images,'txtSearchLabel'=>$txtSearchLabel,'model'=>$model,));


The same code generates the error 'PostController cannot find the requested view "searchResult" when executed in the actionSearch method of the PostController.
Any ideas?
Thanks!
0

#2 User is offline   rei 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 329
  • Joined: 10-November 10

Posted 02 January 2012 - 09:43 AM

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):

$this->render('/site/searchResult',array(...));

Fipick - Find and pick recommendations
0

#3 User is offline   Anand Neema 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-May 12

Posted 30 May 2012 - 08:59 AM

i am also facing the same problem please help me...

"UploadPicturesController cannot find the requested view "DisplayPictures". "

it is coming to the action of the view but not able it to the view

Any idea?

Thanks in Adavance
0

#4 User is offline   Anand Neema 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-May 12

Posted 01 June 2012 - 06:09 AM

Solved for displaying the view you can try the follwing link for rendering
it is worked for me.

$this->render('application.modules.modulename.views.View.ViewNametobedisplay',array('model'=>$model));
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users