Either make it "@firm_show?firm_id=" . $firm["id"], or simply drop the @ :)

On Sat, Dec 5, 2009 at 18:43, dziobacz <[email protected]> wrote:
> So now I have:
> url_for('@firm_show', $firm)
>
> But now I have an error:
> 500 | Internal Server Error | InvalidArgumentException
> The "/firm/:id.:sf_format" route has some missing mandatory parameters
> (:id).
>
> :((  Why ? :((
>
>
>
>
> On 5 Gru, 16:07, Gábor Fási <[email protected]> wrote:
>> The problem lies elsewhere: when you generate the show urls in your
>> index action. According to the error message, you do it by passing
>> "firm/show" to the url_for, and now it cannot find it like that
>> anymore. Presuming you call your route collection "firm", try
>> "@firm_show".
>>
>> On Sat, Dec 5, 2009 at 15:35, dziobacz <[email protected]> wrote:
>> > Ok - now I have error:
>> > 500 | Internal Server Error | sfConfigurationException
>> > Unable to find a matching route to generate url for params "array
>> > ( 'action' => 'show', 'module' => 'firm', 'id_firm' => '1',)".
>>
>> > So now action SHOW is a default action ?? Why ??
>> > In action SHOW I have:
>> >  public function executeShow(sfWebRequest $request)
>> >  {
>> >      $this->firm = Doctrine::getTable('Firm')->find(array($request-
>> >>getParameter('id_firm')));
>> >      $this->forward404Unless($this->firm);
>> >  }
>>
>> > But when I have changed on:
>> >  public function executeShow(sfWebRequest $request)
>> >  {
>> >        $this->firm = $this->getRoute()->getObject();
>> >  }
>>
>> > I still have the same error.
>>
>> > On 5 Gru, 12:12, Gábor Fási <[email protected]> wrote:
>> >> Tryhttp://localhost/frontend_dev.php/firmthatshould be the index.
>>
>> >> On Sat, Dec 5, 2009 at 11:37, dziobacz <[email protected]> wrote:
>> >> > I would like to start using Object Route Class as in tutorial (I have
>> >> > never used it):
>> >> >http://www.symfony-project.org/jobeet/1_4/Doctrine/en/05
>>
>> >> > I have in schema.yml:
>> >> > Firm:
>> >> >  columns:
>> >> >    id_firm:
>> >> >      type: integer(1)
>> >> >      primary: true
>> >> >      autoincrement: true
>> >> >    email:
>> >> >      type: string(100)
>> >> >      notnull: true
>> >> >    description:
>> >> >      type: clob
>> >> >      notnull: true
>>
>> >> > So I have modified file routing.yml:
>> >> > firm:
>> >> >  class:   sfDoctrineRouteCollection
>> >> >  options: { model: Firm }
>>
>> >> > homepage:
>> >> >  url:   /
>> >> >  param: { module: firm, action: index }
>>
>> >> > And I have generated module 'firm'. But after came on site:
>> >> >http://localhost/frontend_dev.php/firm/indexIhave an error:
>> >> > 404 | Not Found | sfError404Exception
>> >> > Empty module and/or action after parsing the URL "/firm/index" (/).
>>
>> >> > What is going on ? What have I done wrong ?
>>
>> >> > --
>>
>> >> > You received this message because you are subscribed to the Google 
>> >> > Groups "symfony users" group.
>> >> > To post to this group, send email to [email protected].
>> >> > To unsubscribe from this group, send email to 
>> >> > [email protected].
>> >> > For more options, visit this group 
>> >> > athttp://groups.google.com/group/symfony-users?hl=en.
>>
>> > --
>>
>> > You received this message because you are subscribed to the Google Groups 
>> > "symfony users" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to 
>> > [email protected].
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/symfony-users?hl=en.
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to