0

Ever since the Magento 2.2.7 update one particularly category tree has been messing up for me. Take the following category structure (this just lists URLs)

  • category-example-one
    • subcatone
      • sub-sub-cat
      • subsubcat

When I go to subcatone and click on sub-sub-cat it takes me to the correct category. If I go to subsubcat then it will keep me on subcatone but the URL will change to subsubcat. I could go to subsubcat from a different path and it will still put me it's parent category so it's not last category visited session related. I have worked out that the pattern for categories affected is any sub sub category that is one word without a dash. Tried and failed solutions:

  • Deleting URL rewrites and re-generating them with faonni/module-indexer-url-rewrite
  • Re-indexing
  • Changing category URL to a new one and back again
  • I have var_dumped category ID from the category view action controller on the page and it is showing the parent categorys ID even though I'm on the correct URL
  • I have carefully looked through all relevant URL rewrites and nothing seems wrong
  • The live site on Magento 2.2.6 is working fine and has the exact same URL rewrites and attribute data on each category

In summary: category-example-one/subcatone/sub-sub-cat takes me to the correct category category-example-one/subcatone/subsubcat changes URL to the correct URL but shows the category for category-example-one/subcatone

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.