Yii Framework Forum: Missing argument when calling an action - Yii Framework Forum

Jump to content

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

Missing argument when calling an action Rate Topic: -----

#1 User is offline   pixies 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 07-December 08

Posted 07 December 2008 - 10:33 PM

Hi.

I'm having some problems. I'm calling a [tt]full[/tt] method which is declared inside an [tt]issue[/tt] controller. The method receives one parameter ([tt]$id[/tt]). I'm generating the url with this code
$this->createUrl('issue/full', array('id'=>1));

obtaining the following URL: [tt]WebRoot/index.php?r=issue/full&id=1[/tt]
but when pressing the hyperlink i get Missing argument 1 for IssueController::actionFull(),.

Any ideas why the method isn't being called with the parameter?

Thanks in advance.

0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,892
  • Joined: 04-October 08
  • Location:DC, USA

Posted 07 December 2008 - 10:55 PM

You actionFull method should not declare any parameter. You need to access the id parameter via $_GET.
0

#3 User is offline   pixies 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 07-December 08

Posted 08 December 2008 - 08:23 AM

Ahh, that's right. Thanks a lot!
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