JMSI18nRoutingBundle icon indicating copy to clipboard operation
JMSI18nRoutingBundle copied to clipboard

Add locale to a route with slug [symfony2]

Open aimeric opened this issue 8 years ago • 2 comments

Hi,

I'm trying to translate the page of my website, i used the bundle JMSI18nRoutingBundle, but when i'm trying to reach certain pages of the website i have the following error:

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "page_slug" as such route does not exist.") in SonataPageBundle:Block:block_container.html.twig at line 15.

I noticed that i have the error with the pages that have a block of content that is stored in the database.

I'm usingSonataPageBundle andSonataBlockBundleto edit certain page of the website.

here Below 2 routes that giving me the error:

privacy_policy:
    path: /privacy_policy
    defaults:  {  _controller: FLYBookingsBundle:Default:privacypolicy }


product:
    pattern: /product/{id}
    defaults: { _controller: FLYBookingsBundle:Post:product }

`

  • Privacy Policy
  • `

    Thank you

    aimeric avatar Jul 23 '16 13:07 aimeric

    Up, still stuck.

    aimeric avatar Jul 24 '16 08:07 aimeric

    Up

    aimeric avatar Jul 25 '16 09:07 aimeric