Jump to content

JS errors on product edit page


delx

Recommended Posts

Hi,

 

First sorry if this is duplicate thread or reported bug but I couldn't find anything similar. I'm using PrestaShop version: 1.7.2.0 and on product page on both local and dev servers I've following JS errors - 

Uncaught TypeError: formZoneElem.magnificPopup is not a function
    at form.js?1.7.0:1630
    at form.js?1.7.0:1726

And 

Uncaught ReferenceError: Bloodhound is not defined
    at HTMLDocument.<anonymous> ("token":1277)
    at j (jquery-1.11.0.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.0.min.js:2)
    at Function.ready (jquery-1.11.0.min.js:2)
    at HTMLDocument.K (jquery-1.11.0.min.js:2)

I believe these errors lead to situation where preview with alt shift v is not working. Also I'm changing quantities and taxes but product on FE is not updated at all but for this one I should debug further. Anyone else with similar errors?

 

Regards

Link to comment
Share on other sites

  • 2 years later...

Hi,

We use Prestashop 1.7.5.2 and face the same problem as above in product editing page (BackOffice only).

We do not knpw where it comes from as it happened suddenly without any PS update.

Seems related to magnificPopup call :

TypeError: formZoneElem.magnificPopup is not a function

TypeError: $(...).typeahead is not a function

var formImagesProduct = (function() {
  var dropZoneElem = $('#product-images-dropzone');
  var formZoneElem = $('#product-images-form-container');

  formZoneElem.magnificPopup({
    delegate: 'a.open-image',
    type: 'image'
  });

Can anyone help us or give a solution ?

Jan

https://www.aunomdelavape.com

Link to comment
Share on other sites

Hi guys,

It seems related to Jquery loading after other script running... or some kind of module update modifying js scripts loading ?...

On my side, still got the issue and focusing now on a module issue or database problem.

Hope someone can find a solution soon ;)

Link to comment
Share on other sites

Hi guys,

On our side, we've found out that js errors in the Admin product page was linked to the displayBackOfficeHeader Position, which had to be changed to avoid js error.

NB : this occured after we had changed one of the module code (last one Amazzing filter).

Hope this gives you a hint ;)

Jan

Capture d’écran 2019-11-21 à 16.30.41.png

Link to comment
Share on other sites

Those errors are related to incorrect jQuery loading
This kind of issues shouldn't happen in PS v1.7.6+: https://github.com/PrestaShop/PrestaShop/pull/12716

So, one of possible solutions would be to upgrade your store to latest version. 
Don't forget to make sure that all your modules are compatible with latest PS version before upgrading. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...