Suddenly my site has suffering layout issue on some product pages. I checked in console and it says require is not a defined, but many other product pages and site is working fine. enter image description here

  • It's your custom js issue, if you've implemented any js so that's the cause of this issue. Apr 30, 2019 at 6:52
  • But other pdp's are working fine. The issue is in some product pages. Also I checked by duplicating the product having issue, and the duplicated product was working fine. Apr 30, 2019 at 7:02
  • Check the sources by different pages as you said error page source with non-error page source and that may help you Apr 30, 2019 at 7:10
  • did you try in incognito mode? Maybe these pages were cached in the browser or in the varnish. Not sure just a hint. Apr 30, 2019 at 8:33
  • It is done. It was some deployment issue. I ran the commands again and it was solved. Thanks for your help Apr 30, 2019 at 9:21

1 Answer 1


Issue resolved by running all commands setup:upgrade, di:compile, static-content and indexing. Then deleting folders generated/code and var/cache, var/page_cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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