Drupal is a registered trademark of Dries Buytaert
Drupal 11.4.3 Update released for Drupal core (11.4.3)! Views Bulk Operations (VBO) 4.4.6 Minor update available for module views_bulk_operations (4.4.6). External Authentication 2.0.12 Minor update available for module externalauth (2.0.12). Entityqueue 8.x-1.12 Minor update available for module entityqueue (8.x-1.12). Similar By Terms 2.0.0 Major update available for module similarterms (2.0.0). Similar By Terms 8.x-1.10 Minor update available for module similarterms (8.x-1.10). Dependent Fields 1.0.11 Minor update available for module dependent_fields (1.0.11). Flag Mutually Exclusive 1.0.0 Initial release available for module flag_mutually_exclusive (1.0.0)! Menu Admin per Menu Module menu_admin_per_menu crossed 50,000 active installs. Document Preview 2.0.0 Module document_preview updated after 13 months of inactivity (2.0.0).

Starting with Drupal 11, Drupal core bundles jQuery 4 instead of jQuery 3. jQuery 4 removed several old functions - like jQuery.isFunction() and jQuery.type() - that had been marked "deprecated" for years but were still present and working right up until this version. A lot of older third-party JavaScript plugins (carousels, lightboxes, countdown timers, and similar widgets) still call these removed functions, so as soon as a site upgrades to Drupal 11, those plugins throw JavaScript errors and stop working - with no warning during the upgrade itself.

This module solves that by providing jQuery Migrate, a small compatibility script maintained by the jQuery Foundation. It adds the removed functions back as thin wrapper functions, so the old plugin code keeps working exactly as it did before, without you having to find, patch, or replace the plugin yourself.

Features

  • Packages jQuery Migrate 4.x as a standard Drupal library (jquery_4_migrate/jquery-migrate), so any custom or contributed library can declare it as a dependency, the normal Drupal way.
  • Optional sitewide toggle: rather than editing every broken library's .libraries.yml to add the dependency by hand, a single setting loads jQuery Migrate automatically wherever core jQuery loads.
  • The sitewide setting is gated behind its own permission, so only trusted roles can turn on a behavior that affects every page.
  • Acts as an immediate, non-invasive fix for plugins broken by the jQuery 3-to-4 transition, buying time to update or replace them properly later, without touching their code.

Post-Installation

  1. Enable the module.
  2. This module does not bundle the jQuery Migrate library file directly, per Drupal.org's policy against including third-party libraries in module repositories. Download the built file and place it in your Drupal installation's /libraries directory, at libraries/jquery-migrate/jquery-migrate.min.js.
  3. Go to Configuration > System > jQuery 4 Migrate Settings
    (/admin/config/system/jquery-4-migrate-settings). This requires the "Administer jQuery 4 Migrate" permission.
  4. Check "Enable jQuery 4 Migrate" to load it sitewide, or leave it unchecked and instead add jquery_4_migrate/jquery-migrate as a dependency to just the specific library that needs it.

Additional Requirements

  • No other contributed modules are required.
  • Requires manually placing the jQuery Migrate 4.x library file at /libraries/jquery-migrate/ (see Post-Installation above).
  • Only relevant on Drupal core ^11, where jQuery 4 is bundled. It has no effect on earlier core versions running jQuery 3.x.

None required. If you're trying to identify exactly which legacy plugin needs this, jQuery Migrate itself logs a console warning every time it patches a call to a removed API - your browser's JavaScript console is the fastest way to find the source.

Similar projects

The existing jQuery Migrate project bundles jQuery Migrate 3.x, which targets the jQuery 1.x/2.x-to-3.x transition. It's explicitly gated to only load when jQuery is >= 3.0 and < 4.0, so it does not help on Drupal 11's jQuery 4 - this module covers that gap specifically.

Community Documentation

This module deliberately trades a small amount of overhead (one more small script on every page that loads jQuery) for not having to hunt down and patch every legacy plugin individually. It's meant as a practical stopgap, not a permanent fix - if you rely on it for a specific plugin, that plugin is worth updating or replacing when you get the chance, since jQuery Migrate itself won't cover APIs removed in some future jQuery 5.

Activity

Total releases
1
First release
Jul 2026
Latest release
1 hour ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.x-dev Dev Jul 14, 2026