FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle
322 stars 140 forks source link

[Firewall] No routing and locale support #267

Open PierrickMartos opened 11 years ago

PierrickMartos commented 11 years ago

Hi,

When i add {_locale} to the parameter : default_target_path the locale argument isn't load. For example, instead of having this url : /fr/app/ i have : %7B_locale%7D/app/

This bug seems to be fixed in symfony, see this issue : https://github.com/symfony/symfony/issues/861 but doesn't seems to work with FOSFacebookBundle.

fos_facebook:
     login_path:          /
     check_path:          /facebook/login-check
     default_target_path: /{_locale}/app/
     provider:            my_fos_facebook_provider
abenbachir commented 11 years ago

do this : default_target_path: /%locale%/app/

and make sure you have in your config.yml the default_locale framework: .... default_locale: "%locale%"

PierrickMartos commented 11 years ago

Thanks for your answer but this only work if i want to set the default locale. I want to change the default_target_path with the user locale.

stof commented 11 years ago

use a route name when you want it to be dynamic