We are using Magento 2.2.5. Currently in Magento store we managing url key by concatenating product's name with the brand's name. So many times in some products url key of product's changed from only product's name. For example,

product's name is abc and brand name is xyz, then we generating url key as xyz-abc and importing these keys via product import. And after import it all looks fine and working well. But after some time it's get changed automatically from url_key xyz-abc to abc (So it's brand names removed for some products). and also we have done indexing, still don't know what is issue. Also there are no 3rd party extension that causing this kind of issue.

Dose anyone know something about this?

Thanks In Advanced.

  • not sure, might be in some cases you won't get brand name from where you are concat it with a product name – Hitesh Dec 1 '18 at 7:21
  • No all product's have brand names, I have confirmed that. – Emipro Technologies Pvt. Ltd. Dec 1 '18 at 7:25
  • Something like I have checked the url_rewrite table and somewhere l looks like url_key => xyz-abc records deleted and generating new url_key based on product's name. But it's just normal theory but don't know what causing this issue. – Emipro Technologies Pvt. Ltd. Dec 1 '18 at 7:30
  • Try to put a logger within Magento\Catalog\Model\AbstractModel's setData() method on calls that url_key is the $key. This way by using debug_backtrace() you would be able to see from where it triggers. – revo Dec 1 '18 at 8:30

Your Answer

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

Browse other questions tagged or ask your own question.