4

I installed Magento 2.2.2 and getting issue with image gallery js. Product page images are not loading sometimes with below error

settings.$elementF.fotorama is not a function

enter image description here

7
  • magento.stackexchange.com/questions/198572/… the keyword "sometimes" may mean some elements are not loaded when called, check require js in your design package. – B00MER Jun 22 '18 at 1:13
  • Hi did you get a fix of that issue. I am facing the same problem after updating porto theme – Nikolai Grozev Oct 2 '18 at 23:51
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Jarnail S Oct 3 '18 at 3:35
  • Did you get any solution ? – zed Blackbeard Mar 2 '20 at 11:09
  • @zedBlackbeard yes issue with the theme js load order. some js are not loaded so i just change the order and all work are smooth – Ajay Patel Mar 3 '20 at 12:02
0

I had an external script that was causing this. I'm still not sure why, but in my case it was a script from Constant Contact (yours may be different).

Instead of including it in the header scripts, I moved it into a block (not sure if that did anything) and then I added an async tag to that script. That seems to have done it.

To troubleshoot, remove all of your third party scripts and see if that makes $fotorama run consistently. If it does, add the scripts back slowly until you figure out which one is breaking $fotorama.

Add an async tag to that script, and it should work.

Example

<script async> var _ctct_m = "<my cc id>"; </script>

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.