5

I am facing issue of TypeError: settings.$elementF.fotorama is not a function sometime on product details page.

This question is duplicate of : Adding to cart breaks fotorama on page reload , Magento 2 : settings.$elementF.fotorama is not a function etc

This question is asked before but still not found any proper solution for this. Please let me know answer if anyone solved this.

2
  • did you find solution? please add it if you have
    – Ashar Riaz
    Feb 12, 2020 at 11:23
  • 1
    Did you found any solution for this
    – Jaisa
    Nov 23, 2020 at 18:02

3 Answers 3

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>
0
 paths: {
        'fotorama/fotorama':'mage/gallery/gallery'
    },
    shim: {
        'fotorama/fotorama': {
            deps: ['jquery']
        }
    }
-2

i'm also facing the same issue, its working fine for me when i added below code :

path - app/design/frontend/[vendor]/[theme_name]/requirejs-config.js

var config = {
    shim: {
        'fotorama/fotorama': {
            deps: ['jquery']
        }
    }
};
4
  • 1
    Did the same but still facing the issue. Feb 5, 2020 at 12:53
  • 1
    @anas I am facing the issue still too. Jun 2, 2020 at 15:38
  • 1
    I am still facing the issue too, does anyone find a solution ?
    – magentodev
    Sep 4, 2020 at 7:13
  • Not work same error show Apr 26, 2021 at 4:55

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.