1

On a current Drupal Commerce installation, I just started experiencing issues where a field is not updating after a jQuery click event.

When a user selects an option, the price typically updates for several of the products on our store. When adding the item to the cart, the correct price is shown. (While helpful on my end that the customer is being charged the right price, it's not great that they cannot see the right price until it is in the cart.)

Everything was working well. No updates were pushed for our distribution and added modules, but this feature is no longer working.

From the Chrome Console, I pulled the error msgs below. How do I troubleshoot? Should I just restore a backup?

ui.spinner.min.js:7 Uncaught TypeError: Cannot read property 'msie' of undefined
at ui.spinner.min.js:7
at ui.spinner.min.js:22

jquery.formalize.js:13 Uncaught TypeError: Cannot read property 'msie' of undefined at jquery.formalize.js:13 at jquery.formalize.js:135 commerce_kickstart_product_ui.js:6 Uncaught TypeError: $(...).spinner is not a function at Object.attach (commerce_kickstart_product_ui.js:6) at Object.<anonymous> (drupal.js:76) at Function.each (jquery.min.js:4) at Object.Drupal.attachBehaviors (drupal.js:74) at HTMLDocument.<anonymous> (drupal.js:504) at c (jquery.min.js:4) at Object.fireWith [as resolveWith] (jquery.min.js:4) at Function.ready (jquery.min.js:4) at HTMLDocument.q (jquery.min.js:4)

4
  • Disable admin_menu or jquery_update - admin_menu makes use of jQuery.browser which was deprecated some time back, jquery_update updates your jquery version to one after it was deprecated
    – Clive
    May 17 '17 at 14:49
  • @Clive - I disabled jquery_update and now my AJAX and jQuery are working well together. Should I have received an admin ping that jquery_update was deprecated? Why would this have been triggered in the last couple days, instead of months back? Seems a little strange. I have also been working on creating new views using Owl Carousel, which requires jquery_update. There are 520k+ sites using jquery_update & 22k sites using Owl, so curious about this fix.
    – keb805
    May 18 '17 at 5:27
  • *jquery.browser was deprecrated
    – keb805
    May 18 '17 at 5:33
  • jquery.browser was deprecated in jQuery, not in the jquery_update module. If you change the version of jQuery being used, you have to work with whatever that version introduces or deprecates.
    – Jaypan
    May 18 '17 at 5:39
0

It is because you are using jQuery 1.9 or superior.

To fix it, use jQuery Update version 7.x-3.0 and enable the jQuery Migrate plugin.

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.