We're on a heavily modified EE with some 20 store views - some of them sharing the same language - facing a problem with url keys.

These are generated and differ per language BUT this doesn't work reliably because of the unique index on the value column in catalog_product_entity_url_key. The unique constraint prevents duplicated url keys even if they belong to different store views.

As a result it seems impossible to have both of these links in the same magento installation:


Seems like in previous versions the index spanned (store_id, value) but was changed to value only. Can anyone explain why this has changed? Btw: catalog_category_entity_url_key doesn't have any index on its value column.

Is it safe to change the index back to (store_id, value)? Would I have to change other tables as well (e.g. tmp or index ones)?
Any other suggestion on how to work around this?

Other URL-related tables (*_url_rewrite_*) all seem to include the store_id in their unique indices so this observed abnormality is getting even weirder.

  • Did you ever try to change the index to (store_id, value)? I would be interested in a solution as well. May 18, 2016 at 13:06
  • @fschmengler Index was changed to span (store_id, value) over a year ago with no apparent issues so far - well, no issues except for fixing things. just did that change after totally useless 50'000 $$$/a enterprise support kept sending me knowledge base links ... i could pm you the update script, might save you some minutes. viele gruesse nach aachen!
    – pong
    May 18, 2016 at 16:20
  • Danke! There's no PM feature here but you could just add it as an answer since it solved your problem. I changed the index in MySQL for testing but will need a real update script, so it would be helpful May 19, 2016 at 7:51
  • @fschmengler the script is not a good fit for the question and was paid by a client so it won't get publicly posted. i'll try figuring out your email - which i meant by 'pm' in $this->context :)
    – pong
    May 19, 2016 at 9:17

1 Answer 1


In general, there seem to be a few shortcomings in URL key management in EE 1.13 – read Fabrizio Branca's blog post.

Regarding your particular problem, it might help to change the url_key product attribute's scope:

Catalog → Attributes → Manage Attributes → Edit Attribute → Properties → Scope: Global

This should

  • prevent having duplicate entries for the same product and
  • allow the same URL Key in different store views.

Bear in mind that a mixture of shared and differing URL keys per product will still not be possible this way.

  • ty! I read Fabrizios post on my initial research, led me to asking this question. He talks about 1.13.0 where the index included the store_id which was removed until Changing the attribute's scope will most probably not affect the database index - wouldn't surprise me too much if it did, though :)
    – pong
    Feb 25, 2015 at 14:57
  • 1
    @pong No, it will not affect the database. It is just a "suggestion on how to work around this" you asked for.
    – mam08ixo
    Feb 25, 2015 at 15:27
  • 1
    ty again! i'm finally getting your point. should have added that we use different (i.e. per language) url keys so that a global one sadly won't do.
    – pong
    Feb 26, 2015 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.