Hi all ( especially Marius :) )

I have an annoying problem with my Mag 1.9.x modules created using the, otherwise great, ultimate module creator. When an item/entity is given a friendly URL and initially saved then all is great. However, if the item/entity is reloaded, edited in some way and saved then the friendly URL (unchanged) is seen as a duplicate of the existing URL and then appends -1, -2, -3....and so on for each save. This then means the proper/original URL no longer works and the URL changes with each edit. It is possible to go back and then remove the -1 (or whatever number it has reached) as the original no longer exists as a URL.

It seems that this might not be specific to UMC modules but any entity types that are not products, categories or otherwise inbuilt to Magento. I wondered if there was a known fix for this as I am already fiddling with overwriting the core to check if the found matching url actually belongs to the same item as you are currently saving so not to update it but it is proving troublesome and seems to impact quite a lot of things.

Thanks Jon

  • This extension is discontinued. – Marius Feb 13 '18 at 17:17
  • Yer I know but it has proved helpful as a basis to get things going sometimes. – Jon Holland Feb 14 '18 at 17:30
  • If it's worth something, I could not reproduce this on my side on CE – Marius Feb 16 '18 at 7:51
  • Interesting, was that with multi-store EAV structure or flat out of curiosity? Thanks for taking the time out to take a look Marius. – Jon Holland Feb 19 '18 at 10:00
  • both, eav and flat. But I checked on M1 CE 1.9.2 – Marius Feb 19 '18 at 10:02

This problem is not related to UMC, since it is a known core bug.

Magento has never released a patch for CE, however a Patch for Enterprise Edition has been leaked (SUPEE-389). You may find lots of gists like this one


it is about the class Mage_Catalog_Model_Url

affected methods are

  • That gist looks interesting. I have noticed the problem in my own modules also. It is particularly annoying when a url ends with a number like some-stuff-2018 ... which then becomes some-stuff-2019 which is not very helpful :) – Jon Holland Feb 14 '18 at 17:31
  • it also gains growth of core_url_rewrite table and indexing becomes slower – Vladimir Samsonov Feb 14 '18 at 19:36

This module might help you https://github.com/vladsmirnov/url-rewrites. I have used it in one of my projects. It helped in reducing the duplicates while reindexing.

Please run the shell script in the module to remove the duplicates in your current instance.

As always it is suggested, please take a backup of your database and install the module.

  • Hey Kaylan, I will take a look at this. it isn't the fact that I have duplicates as such but that may well be useful – Jon Holland Feb 19 '18 at 10:03
  • Hi Jon, how are duplicates useful? – Kalyan Chakravarthi V Feb 19 '18 at 10:15
  • they are from SEO point of view. Linkpower will be lost if redirect chain breaks at some point. Also GWT will show lots of Crawling Issues – Vladimir Samsonov Feb 19 '18 at 11:03
  • Yes I didn't mean the duplicates were necessarily but that the module linked to might be useful :) – Jon Holland Feb 20 '18 at 10:53
  • :) ok got it now – Kalyan Chakravarthi V Feb 20 '18 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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