Yii Framework Forum: Unable To Open View - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unable To Open View Unable to run view file...Error 400 Rate Topic: -----

#1 User is offline   tooba 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 04-October 13

Posted 02 November 2013 - 03:55 AM

I am new to yii. I know that its very simple question but I need help.
I want to run the view file by url

but I got this error
Error 400
Your request is invalid.

In access rules of that controller. I also wrote the view.
but It did not work.

I just want to ask how we can open view file in url??
0

#2 User is offline   nineinchnick 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 622
  • Joined: 12-September 11
  • Location:Bialystok, Poland

Posted 02 November 2013 - 04:24 AM

I would guess this error refers to not specifying action arguments which you marked as required by not assigning them default values.

If you want more help please post fragments of your code and a full stack trace that you got with the error message. It should be in your application log.
Don't be a dick.
0

#3 User is offline   realtebo 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 620
  • Joined: 03-October 12
  • Location:Ferrara

Posted 02 November 2013 - 10:43 AM

It enough tou check the arguments of the public function action<name_of_action>, because they're REQUIRED
Il computer non ragiona, ma ha sempre ragione.
Ricordalo quando fai il debug
0

#4 User is offline   sensorario 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,986
  • Joined: 07-September 10
  • Location:Cesena (Italy)

Posted 02 November 2013 - 02:05 PM

View Posttooba, on 02 November 2013 - 03:55 AM, said:

I just want to ask how we can open view file in url??


What do you mean?
0

#5 User is offline   tooba 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 04-October 13

Posted 02 November 2013 - 09:22 PM

ok I got the solution. Thanks every one :)
The solution is that we write any file name in index file and then we access that like
<?php $this->widget('bootstrap.widgets.TbListView',array(
'dataProvider'=>$dataProvider,
'itemView'=>'_reports',
)); ?>

_reports is my view file.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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