0

Magento will occasionally display unfriendly URLs even though SEF is enabled in the admin. At first glance, I believe this has something to do with indexing and the order we re-index and refresh caches. Or maybe has something to do with the url_rewrites table growing in size and unable to parse the URL quickly.

Currently using ->getProductUrl() to get product URL.

unfriendly SE url

  • Magento 1 or Magenti 2 ? – Yogesh Nov 21 '17 at 2:11
  • @Yogesh 1.9x I updated the question. – TheRealJAG Nov 22 '17 at 20:43
  • You must lunch the indexation – Mohamed El Mrabet Nov 22 '17 at 21:27
1

URL Key is retrieved directly from the database compared to ->getProductUrl() which requires more computation before rendering the final output. Since you're struggling with performance using ->getProductUrl() I'd suggest using this one below:

$_product->getUrlKey();
| improve this answer | |
  • Could this be related to the core_url_rewrite table is too big and taking too long to process? It's currently at 25k records. – TheRealJAG Nov 27 '17 at 17:55
  • @TheRealJAG - It could. Can you check if flat catalog is enabled by navigating to System > Configuration > Catalog > Frontend > Use Flat Catalog Category | Use Flat Catalog Product. Set this to NO. See more about this and how it affects performance here > magento.stackexchange.com/questions/105341/… – maurisource web Nov 27 '17 at 19:09
  • Yes we use flat and unable to change. – TheRealJAG Nov 28 '17 at 21:12
  • @TheRealJAG - I think that's the issue. Flat isn't design to handle big catalog. Any reasons or errors preventing you to change that? – maurisource web Nov 29 '17 at 16:49

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.