-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated urls with different locales #94
Comments
I tried to fix this, but the matching relies on a postfix of '.en' and '.nl' after the route name. If this matches the route matched by Symfony, then the matched route is replaced by the i18n route. If however the locale and the postfix do not match, the original Symfony route match is returned without modification. This will still lead to a controller and action, and therefore, the url will load. Now the simple solution would be to detect that there is a postfix, such as .en and .nl and that it does not match the prefixed locale. However, since anyone might postfix their routes with a locale in that form (.nl, .es etc.), this solution might break their code. This is a fix that works, but does break any other route postfixed with a dot and two characters:
The corresponding test case would be:
I am now experimenting with a solution where we add more than just the locale to the route name, to make it possible to identify it as a route configured by the BeSimpleI18nRoutingBundle. |
The problem looks to be that you are trying to use a parameter where a prefix would be required. Simply changing
|
Hello, I am using the dev-master version for use with symofony3.
I have prefixed the locale and when I load an url I can change the locale and the url still loads, although the path is different:
mysite.com/en/who-we-are
mysite.com/es/who-whe-are
The two urls are loaded although the "es" shouldn't load.
The text was updated successfully, but these errors were encountered: