resolve/refinerycms — Issue #1374: Slugs saved with locale but loaded without
Author: bobbus
Created: 2012-02-29 16:54:53+00:00
State: open

I encounter a bug in my refinerycms app (version 1.9) : sometimes my application does not load the page given in the URL but another one.

The bug is easy to reproduce, just :

* setup a new RefineryCMS application
* edit the settings to allow multiple frontend locales
* add, for example, a page titled "Testing" in english
* create a new page in **another locale** and set is title to "Testing" too

Now, if you go to the homepage of your website in the other locale, you will see a link to "/LOCALE/testing" but unfortunatly it will display you the first page you created not the second one.

I figured out that this is because RefineryCMS friendly_id version is checking for slugs in the current locale when saving a new one, this could end up with duplicate slugs with different locales. The problem is when we are loading a page, friendly_id_globalize3 do not take care of loading slugs in the current locale.

I'm not sure what's the best way to deal with that, is it useful to save the locale with the slug ?