1

Product detail page showing this error for some products

Uncaught SyntaxError: Unexpected token B in JSON at position 121<br>
   at JSON.parse (<anonymous>)
   at getData (main.js:58)
   at Array.map (<anonymous>)
   at HTMLDocument.apply (main.js:74)
   at fire (jquery.js:3232)
   at Object.fireWith [as resolveWith] (jquery.js:3362)
   at Function.ready (jquery.js:3582)
   at HTMLDocument.completed (jquery.js:3617)

Please help me to fix this....

  • hey please mark my answers if solve your issue – Sourav May 21 '18 at 9:16
  • No luck. Error still there. – abdul wadood May 21 '18 at 9:45
  • deploy content again – Sourav May 21 '18 at 9:58
1

So, since you did not specify the code, the error indicates that there are invalid tags in JSON, you need to look in JS for non-closed constructions.

0

Replace this app/design/frontend/vendor/theme/Magento_Catalog/templates/product/view/gallery.phtml

With this file vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml

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.