The focal point module adds ui.draggable using drupal_add_library('system', 'ui.draggable'); within a callback that is not set when a form (with an image widget) is first loaded, but if a user uploads a photo, thus triggering an AJAX event which submits the form, uploads the photo and returns the HTML needed to show the image widget with a thumbnail.

This works fine with OOTB drupal, but when jquery is being served from a CDN the draggable funcion is never made available and focal point doesnt work.

Here is a recap of how to reproduce:

  1. Start with vanilla drupal + focal_point (no config needed) and go to /node/add/article
  2. Upload a photo
  3. Note that the thumbnail returned has a "crosshair" on it that can be dragged
  4. Now enable jquery update
  5. Everything still works exactly the same
  6. Now set jquery to serve from CDN (I tried google and jquery)
  7. Now go to /node/add/article and upload a photo
  8. You will now have an "unknown function" js error



bleen’s picture

Suggestion from ericduran ... use #attached on the form to attach ui.draggable instead of drupal_add_library()

bleen’s picture

suggestion from ericduran did not work, but he did confrim that this is a jquery_update issue and not a focal_point issue

cthshabel’s picture

I believe I am experiencing a very similar problem.

When using jQuery Update with CDN module, my user profile form user picture does not rebuild after user clicks "Remove". This will trigger the input type file to be displayed again via ajax to allow user to upload another picture.

Trying to troubleshoot now.

jcfiala’s picture

This may be a problem with Rules that I've noticed - when adding a rule, the collapsing regions don't work - I get a 'this.button.button is not a function' error - but switching to turn off a CDN makes Rules work fine.

markcarver’s picture

Status: Active » Closed (outdated)

This sounds like a jQuery version/API deprecation issue and can resolved in the 7.x-3.x branch by either:

  1. Choosing a lower jQuery version for an admin theme like Seven
  2. Enabling the jQuery Migrate plugin to handle deprecated APIs/features.