I am facing an issue which is I am not able to access any products pages. Either trying to access them directly via product url or product page

Or via Search Results

Or via Site Navigation

every time i try to access a product I get redirected to a search results page instead of the product page


for example


This issue I noticed after I upgraded from Magento 2.2.2 to 2.2.6 But it may have been happening from before until most recent the site and links were working fine.

One other changes I made is to remove the .html for categories via the admin settings Admin - Stores - Catalog - Catalog

Search Engine Optmization Category Url Suffix -

I enabled Flat Catalog:

Use Flat Catalog Category - YES Use Flat Catalog Product - YES

Create Permanent Redirect for URLs if URL Key Changed - YES

I have run this extension to regenerate new rewrites https://github.com/olegkoval/magento2-regenerate_url_rewrites

But same issue is there.

Also I noted that after the extension has run checking the url rewrites information in admin it showing redirect type - NO

should this be showing as Permanent ?

I have Elastic search and Amasty Elastic search - Amasty Advance Search extensions installed but the site was working fine previously with these extension - I am not sure if the issue is Upgrade related pro Happened after I made the changes mentioned above

Really appreciate some help with this

  • Can no one offer any suggestions atleast! really stuck on this please help – jt9489 Aug 21 '19 at 10:51
  • I know it may be not a helpful comment, but I have just flushed the cache and product page is loaded normally – TheKitMurkit Jan 20 at 15:45
  • @jt9489, How did you resolve this issue? – Siva Jan 31 at 10:01
  • Same issue happen for me also – Soundararajan m Feb 4 at 4:57
  • Any update on this issue? – Soundararajan m Feb 12 at 8:50

Few things that you can do:

  1. Make sure that the product is enabled on the Store View level.
  2. To regenerate URL, try removing the product from the Website, then add it again. In Magento admin product page, under Product in Websites, try unchecking the website, the save. Check URL rewrites, the product URL rewrites should be removed. Add to the website again, new URL rewrites will be added.
| improve this answer | |

I also facing this issue, but after 2 days efforts not found any solutions, so we replace our old database now everything working fine, this issue is generated due to url rewrite. You can replace your old database backup and try this.

| improve this answer | |

I also got same issue.

And no solution worked for me.

Atlast i come with a solution which worked for me

In catalog listing page or catalog search page.

I made url looks like below


My actual code looks something like this:

<a class="product-item-link"
                           href="<?php /* @escapeNotVerified */ echo $block->getBaseUrl()."catalog/product/view/id/".$_product->getId()."/s/".$_product->getUrlKey(); ?>">
                            <?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>

And it works for me

| improve this answer | |

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.