vigetlabs / craft-localeredirector

Craft plugin for detecting user language preferences and redirecting to the appropriate locale.
MIT License
24 stars 4 forks source link

404 when other locale's slug is different #5

Closed romainpoirier closed 7 years ago

romainpoirier commented 7 years ago

Following the documentation example, this is working fine:

Requested URL: http://site.com/blog/article-title Cookie Present: es Configured Site Locales: en, fr, de, pt, es Redirects To: http://site.com/es/blog/article-title

But if the slug of article-title is different in es locale (/titulo-del-articulo) , the user is redirected to a 404.

The plugin should probably constructs the new URL using original entry id, not using original path.

jeremyfrank commented 7 years ago

Thanks for documenting this. I never anticipated the fact that slugs could be different for each locale's version of an entry. I'll take a look at your PR soon!

didoweb commented 7 years ago

I've got the same issue, thanks in advance!

jeremyfrank commented 7 years ago

I just merged PR #6 and put out a new release.