Hi Viktoras,

thank you for sharing your solution.

Same problem here, I want to add a custom action in the generator.yml
list section :

      list:
        actions:
          _new: ~
          show30: { label: show 30, action: show30 }

I have written a simple actions in the "business_dir" module,

  public function executeListShow30(sfWebRequest $request)
  {
    return $this->renderText('here');
  }

but all I got is the Exception :

Empty module and/or action after parsing the URL "/business_dir/show30/
action" (/).

The routes are auto generated by admin generator and are
sfDoctrineRouteCollections,
and I don't see why there is the last '/action' segment in the url and
how to get rid of it.

Could you please (re)explain how to fix that problem ? I don't get how
to apply your solution to my environnement.

thank you a lot :)
Jess

On 6 avr, 12:36, Viktoras <char...@gmail.com> wrote:
> Ok, I've found the solution. The difference between Jobeet example and
> my code was the primary key name. In Jobeet it's id, in my project
> it's tablename_id. Doctrine understands, that id is a primary key and
> thus numeric, but it doesn't recognize tablename_id as a key. So, my
> url was matched with an object route /:module/:id/:action, because :id
> wasn't filtered. And in Jobeet default route :module/:action was the
> one to handle the url. Adding:
> requirements:
>   tablename_id: \d+
>
> to the route solves the issue.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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

Reply via email to