1

I have Update Magento version 2.3.4 to 2.4 and now on the product page these errors are coming.

Uncaught TypeError: Cannot set property 'migrateVersion' of undefined
Uncaught TypeError: Cannot set property 'Color' of undefined
Uncaught TypeError: $ is not a function
Uncaught TypeError: Cannot read property 'fn' of undefined
Uncaught Fotorama requires jQuery 1.8 or later and will not run without it.
Uncaught TypeError: settings.$elementF.fotorama is not a function

These errors are coming from this file.

stripes-custom/fr_FR/jquery/jquery-migrate.js
stripes-custom/fr_FR/jquery/ui-modules/effect.js
stripes-custom/fr_FR/js/lib/sticky-kit.js
stripes-custom/fr_FR/magnifier/magnifier.js
stripes-custom/fr_FR/fotorama/fotorama.js
stripes-custom/fr_FR/mage/gallery/gallery.js

To resolve this error I have tried this solution but not working.

TypeError: settings.$elementF.fotorama is not a function

How to change jQuery version in Magento2

fotorama error

I have tried by changing the theme from vendor to luma and blank but the console error was still remaining.

I have also updated the root lib folder with the latest Magento 2.4 lib folder but not work.

Anyone has a solution to this issue then please provide.

Thank you in advance.

1

Hello friends I found the issue.

jquery was conflicting

When I check in console jQuery was undefined

I have checked using require but jquery was not worked.

require(['jquery'],function($){
    console.log($.fn);
});

So I have a check-in page source and found that one jquery was added in the head section and it was coming from some custom extension.

So I have checked after removing this jquery and all error was resolved.

And I also found that all previous error $ and $.fn Undefine and fotorama was coming because of jquery.

Now all errors are resolved.

Thank you.

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.