Problem/Motivation

drupal.js?v=11.0.13:64 Uncaught TypeError: $.isFunction is not a function
    at Object.attach (colorbox-media-video.js?svj80t:10:14)
    at drupal.js?v=11.0.13:166:24
    at Array.forEach (<anonymous>)
    at Drupal.attachBehaviors (drupal.js?v=11.0.13:162:34)
    at drupal.init.js?v=11.0.13:32:12
    at HTMLDocument.listener (drupal.init.js?v=11.0.13:20:7)

Note: You will need to update to the jQuery4 compatible version of the colorbox library as well.

Steps to reproduce

  1. Upgrade to Drupal 11.0 or 11.1
  2. Visit a page that uses the "Colorbox Media Remote Video" formatter
  3. Try to click on a video thumbnail
  4. Confirm the video does not open in the colorbox
  5. Confirm the error in the logs.

Proposed resolution

Change:

if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
    return;
}

To:

 if (typeof $.colorbox !== 'function' || typeof settings.colorbox === 'undefined') {
  return;
}

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vetchneons created an issue. See original summary.

luongosb’s picture

Issue summary: View changes
luongosb’s picture

Issue summary: View changes
danrod’s picture

If you don't mind installing another module to fix this, I suggest this module that implements deprecated jQuery functions that are no longer in jQuery 4: https://www.drupal.org/project/jquery_deprecated_functions

nagy.balint’s picture

Status: Active » Closed (outdated)

This merge request is somehow incorrect, but the issue has been fixed in the Drupal 11 compatibility issue.