schmittjoh / JMSI18nRoutingBundle

Allows you to internationalize your routing
http://jmsyst.com/bundles/JMSI18nRoutingBundle
357 stars 159 forks source link

Add locale to a route with slug [symfony2] #194

Open aimeric opened 8 years ago

aimeric commented 8 years ago

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 commented 8 years ago

    Up, still stuck.

    aimeric commented 8 years ago

    Up