Drupal 12 HTMX 4 Upgrade Returns to Review
Core contributors have returned Drupal 12’s HTMX 4 upgrade patch to review after adding support for a feature missed during the latest compatibility pass. Shawn Duncan, principal software engineer and contributor to the integration, told The DropTimes that contributors from the Drupal and HTMX teams have been coordinating as prereleases are published. The issue remains tagged as a Drupal 12.0.0 beta blocker while contributors await the final HTMX 4.0 release.
The upgrade creates a compatibility boundary for modules that support both Drupal 11 and Drupal 12. The draft change record documents revised event names, explicit attribute inheritance, changes to the PHP Htmx class, and replacement of the HX-Trigger request header with HX-Source. It advises maintainers to use \Drupal\Component\Utility\DeprecationHelper because the HTMX 4 changes are not backward compatible.
The HTMX team is in a cycle of putting out release candidates for v.4 and is closely coordinating with us. As those candidates come out we re-check and adjust our integration as needed. We are expecting a full 4.0 release very soon and will be ready to commit after that last check.
Contributors updated the branch to HTMX 4.0.0-beta6 and returned the issue to review on 24 July 2026. Duncan reported that all tests were passing on 26 July, but moved the issue back to needs work on 27 July after identifying missing support for hx-status. Later that day, he added the method and its test, reported passing tests, returned the issue to review, and updated the draft change record.
The HTMX 4 migration guide provides configuration options for restoring earlier behaviour, an HTMX 2 compatibility extension, and an upgrade checker for templates and JavaScript. In his technical overview, Duncan also highlights the move from XMLHttpRequest to the Fetch API, multiple response fragments through <hx-partial>, Idiomorph-based morphing swaps, and status-based handling through hx-status. These are HTMX 4 capabilities, but their presence in the library does not establish how broadly Drupal core will use them.
HTMX creator Carson Gross told The DropTimes in a LinkedIn message that he understood the integration to be proceeding smoothly. The upgrade forms part of Drupal’s gradual plan to replace its legacy AJAX system with HTMX. The HTMX library was added as a Drupal core dependency in Drupal 11.2, followed by supporting PHP and JavaScript integration in Drupal 11.3. Drupal currently maintains the existing AJAX API alongside the newer HTMX API while contributed and custom modules are converted.
References
-
Update to htmx 4 | Drupal.org (4 November 2025)
-
HTMX now uses v.4 (8 April 2026)
-
Drupal 12 and HTMX 4 (17 July 2026)
-
[Plan] Gradually replace Drupal’s AJAX system with HTMX (27 November 2023)


