Joomla Deprecated JavaScript (MooTools / jQuery) changes: Joomla 3 → 4, 5 and 6
18 issues in this guide
JavaScript breaks are usually "$ is not defined" or silent UI deadness after MooTools and forced jQuery loads disappear. This guide groups 18 entries: JHtml::_('behavior.calendar'), JHtml::_('behavior.caption'), JHtml::_('behavior.formvalidation'), JHtml::_('behavior.framework'), JHtml::_('behavior.keepalive'), JHtml::_('behavior.tooltip'), JHtml::_('bootstrap.framework'), JHtmlBootstrap::modal(), JHtml::_('formbehavior.chosen'), JHtml::_('jquery.framework'), and 8 more. The replacement pattern is Web Asset Manager assets (keepalive, form.validate, bootstrap, calendar), vanilla JS or explicitly declared jQuery only when required, Choices/Tom Select instead of Chosen, and Text::script() with Joomla.Text._ for translated strings. Stop loading media/jui/js/jquery.min.js by path. Hop mix: 12 at Joomla 3 → 4; 6 at Joomla 5 → 6. These are mostly Joomla 3 → 4 removals; a few HTMLHelper renames linger as aliases. Fix PHP JHtml::_('behavior.*') calls and the front-end scripts together so you do not leave captions and tooltips half-migrated. Every anchor below is drawn from the catalog's detected code and recommended replacement. Catalog replacements in this guide include JHtml::_('behavior.calendar') → HTMLHelper::_('calendar') + WAM assets; JHtml::_('behavior.caption') → CSS / figure captions — MooTools captions are gone; JHtml::_('behavior.formvalidation') → form.validate WebAsset; JHtml::_('behavior.framework') → Do not load MooTools — use vanilla JS or WebAssetManager. Open each h2 anchor for the full before/after, fix list, and error strings shipped in the reference data.
JHTML-BEHAVIOR-CALENDAR-001
JHtml::_('behavior.calendar')
behavior.calendar
The old MooTools calendar load is gone. The calendar HTMLHelper still exists and pulls modern assets.
JHtml::_('behavior.calendar') → HTMLHelper::_('calendar') + WAM assets
Dies at Joomla 3 → 4Symptoms people search
date picker missing · calendar.js 404
Replace this code
Swap JHtml::_('behavior.calendar') for HTMLHelper::_('calendar') + WAM assets.
Joomla 3
Remove or stop calling this
JHtml::_('behavior.calendar');
echo JHtml::_('calendar', $value, 'created', 'created');Joomla 4 / 6
Use this instead
echo HTMLHelper::_('calendar', $value, 'created', 'created', '%Y-%m-%d');How to fix it
- 1Stop calling behavior.calendar.
- 2Use the calendar helper which registers assets itself.
Also known as
behavior.calendar · calendar.js
JHTML-BEHAVIOR-CAPTION-001
JHtml::_('behavior.caption')
behavior.caption
Image captions via MooTools were removed in Joomla 4.
JHtml::_('behavior.caption') → CSS / figure captions — MooTools captions are gone
Dies at Joomla 3 → 4Symptoms people search
image captions javascript error · behavior.caption
Replace this code
Swap JHtml::_('behavior.caption') for CSS / figure captions — MooTools captions are gone.
Joomla 3
Remove or stop calling this
JHtml::_('behavior.caption');Joomla 4 / 6
Use this instead
// Remove it. Style captions in CSS. Do not load MooTools.How to fix it
- 1Delete behavior.caption calls.
Also known as
behavior.caption
JHTML-BEHAVIOR-FORMVALIDATION-001
JHtml::_('behavior.formvalidation')
behavior.formvalidation
Joomla 4 renamed the loader. form-validate CSS class remains, but the J3 helper key is the wrong load path.
JHtml::_('behavior.formvalidation') → form.validate WebAsset
Dies at Joomla 3 → 4Symptoms people search
required fields submit anyway · formvalidation
Replace this code
Swap JHtml::_('behavior.formvalidation') for form.validate WebAsset.
Joomla 3
Remove or stop calling this
JHtml::_('behavior.formvalidation');
<form class="form-validate">Joomla 4 / 6
Use this instead
HTMLHelper::_('behavior.formvalidator');
// or $wa->useScript('form.validate');
<form class="form-validate">How to fix it
- 1Use formvalidator / form.validate assets.
- 2Keep required and validate-username classes.
Also known as
behavior.formvalidation · form.validate · form-validate
JHTML-BEHAVIOR-FRAMEWORK-001
JHtml::_('behavior.framework')
behavior.framework (MooTools)
Joomla 4 removed MooTools. behavior.framework and SqueezeBox (behavior.modal) do not exist. The compatibility plugin does not restore them.
JHtml::_('behavior.framework') → Do not load MooTools — use vanilla JS or WebAssetManager
Dies at Joomla 3 → 4What you will see
- Call to undefined method
- SqueezeBox is not defined
- MooTools is not defined
Symptoms people search
modal popup does nothing · click edit and nothing opens · mootools error in console
Replace this code
Swap JHtml::_('behavior.framework') for Do not load MooTools — use vanilla JS or WebAssetManager.
Joomla 3
Remove or stop calling this
JHtml::_('behavior.framework');
JHtml::_('behavior.modal');Joomla 4 / 6
Use this instead
// Remove these lines. SqueezeBox and MooTools are gone.
// Use Bootstrap 5 modal or a <dialog> element.How to fix it
- 1Delete behavior.framework, behavior.modal, behavior.caption, behavior.tooltip.
- 2Replace modal popups with Bootstrap 5 data-bs-toggle="modal" or HTMLHelper bootstrap.renderModal.
- 3Rewrite any MooTools JavaScript ($$, Fx, SqueezeBox) to vanilla JS.
Also known as
behavior.framework · MooTools · SqueezeBox · behavior.modal · behavior.caption · behavior.tooltip
There is no 1:1 swap for this one. The architecture changed. If you cannot rewrite it, Infyways can.
JHTML-BEHAVIOR-KEEPALIVE-001
JHtml::_('behavior.keepalive')
behavior.keepalive
Keepalive still exists but should be a WebAsset, not a MooTools behavior.
JHtml::_('behavior.keepalive') → keepalive web asset
Dies at Joomla 3 → 4Symptoms people search
session dies while editing · keepalive
Replace this code
Swap JHtml::_('behavior.keepalive') for keepalive web asset.
Joomla 3
Remove or stop calling this
JHtml::_('behavior.keepalive');Joomla 4 / 6
Use this instead
$wa->useScript('keepalive');
// or HTMLHelper::_('behavior.keepalive') if the alias still maps on J4How to fix it
- 1Register keepalive via WAM on long admin forms.
Also known as
behavior.keepalive · keepalive
JHTML-BEHAVIOR-TOOLTIP-001
JHtml::_('behavior.tooltip')
behavior.tooltip
Joomla 3 tooltips were MooTools. They do not run on Joomla 4+.
JHtml::_('behavior.tooltip') → Bootstrap 5 tooltip or native title
Dies at Joomla 3 → 4Symptoms people search
hasTooltip does nothing · behavior.tooltip
Replace this code
Swap JHtml::_('behavior.tooltip') for Bootstrap 5 tooltip or native title.
Joomla 3
Remove or stop calling this
JHtml::_('behavior.tooltip');
<span class="hasTooltip" title="Help">Joomla 4 / 6
Use this instead
Use Bootstrap 5 data-bs-toggle="tooltip" or a plain title attribute.How to fix it
- 1Remove behavior.tooltip.
- 2Use Bootstrap 5 tooltips if you still want hover help.
Also known as
behavior.tooltip · hasTooltip · hasTip
JHTML-BOOTSTRAP-FRAMEWORK-001
JHtml::_('bootstrap.framework')
JHtml::_('bootstrap.framework')
Joomla 3 bootstrap.framework loaded Bootstrap 2 (and often jQuery). On Joomla 4+ it does the wrong thing or nothing useful. Cassiopeia/Atum already load Bootstrap 5 through WebAssetManager.
JHtml::_('bootstrap.framework') → WebAssetManager bootstrap.css + bootstrap.es5
Dies at Joomla 3 → 4Symptoms people search
bootstrap.framework · double bootstrap · dropdowns broken
Replace this code
Swap JHtml::_('bootstrap.framework') for WebAssetManager bootstrap.css + bootstrap.es5.
Joomla 3
Remove or stop calling this
JHtml::_('bootstrap.framework');
JHtml::_('bootstrap.loadCss');Joomla 4 / 6
Use this instead
$wa = $this->getDocument()->getWebAssetManager();
$wa->useStyle('bootstrap.css');
$wa->useScript('bootstrap.es5');How to fix it
- 1Delete bootstrap.framework from templates and extensions.
- 2If you still need Bootstrap JS, depend on bootstrap.es5 in joomla.asset.json.
- 3Rewrite markup to Bootstrap 5 (this reference: row-fluid, span*, data-bs-*).
Also known as
bootstrap.framework · bootstrap.loadCss · JHtml bootstrap
JHTML-BOOTSTRAP-MODAL-001
JHtmlBootstrap::modal()
JHtmlBootstrap::modal()
The Bootstrap 2 modal helper was removed. Joomla 4+ uses renderModal and Bootstrap 5 markup.
JHtmlBootstrap::modal() → HTMLHelper::_('bootstrap.renderModal')
Dies at Joomla 3 → 4What you will see
- Call to undefined method Joomla\CMS\HTML\Helpers\Bootstrap::modal
Symptoms people search
admin modal missing · undefined method modal
Replace this code
Swap JHtmlBootstrap::modal() for HTMLHelper::_('bootstrap.renderModal').
Joomla 3
Remove or stop calling this
echo JHtml::_('bootstrap.modal', 'myModal');Joomla 4 / 6
Use this instead
echo HTMLHelper::_('bootstrap.renderModal', 'myModal', $modalParams, $body);How to fix it
- 1Replace bootstrap.modal helper usage with renderModal.
- 2Update the HTML to Bootstrap 5 (data-bs-*, btn-close).
Also known as
JHtmlBootstrap::modal()
JHTML-CHOSEN-001
JHtml::_('formbehavior.chosen')
Chosen.js (formbehavior.chosen)
Chosen shipped with Joomla 3. It is not in Joomla 4. Fancy select uses a different stack.
JHtml::_('formbehavior.chosen') → Core styled <select>, Choices.js, or Tom Select
Dies at Joomla 3 → 4What you will see
- jQuery(...).chosen is not a function
- chosen.jquery.min.js 404
Symptoms people search
admin dropdowns unstyled / broken · chosen is not a function
Replace this code
Swap JHtml::_('formbehavior.chosen') for Core styled <select>, Choices.js, or Tom Select.
Joomla 3
Remove or stop calling this
JHtml::_('formbehavior.chosen', 'select');Joomla 4 / 6
Use this instead
// Remove Chosen. Use a native select or a Joomla 4+ fancy select field.How to fix it
- 1Remove formbehavior.chosen.
- 2If you need searchable selects, use the core field or Tom Select — not Chosen.
Also known as
chosen · formbehavior.chosen
JHTML-JQUERY-FRAMEWORK-001
JHtml::_('jquery.framework')
JHtml::_('jquery.framework') in templates
Forcing jquery.framework from a Joomla 6 site template fights Cassiopeia/Atum asset policy and still does not fix MooTools-era code.
JHtml::_('jquery.framework') → Asset dependency, not a forced load in index.php
Dies at Joomla 5 → 6Symptoms people search
double jquery · bootstrap and jquery fighting
Replace this code
Swap JHtml::_('jquery.framework') for Asset dependency, not a forced load in index.php.
Joomla 3
Remove or stop calling this
JHtml::_('jquery.framework');
JHtml::_('bootstrap.framework');Joomla 4 / 6
Use this instead
// Site template: do not force jQuery.
// Extension: list jquery as a dependency in joomla.asset.json if needed.How to fix it
- 1Remove the helper from index.php.
- 2Only extensions that still need jQuery should declare it.
Also known as
jquery.framework · bootstrap.framework
JHTML-SORTABLE-001
JHtml::_('sortablelist.sortable')
JHtmlSortablelist::sortable
jQuery UI sortable lists are deprecated. Joomla 4 uses draggable list.
JHtml::_('sortablelist.sortable') → HTMLHelper::_('draggablelist.draggable')
Dies at Joomla 3 → 4Symptoms people search
drag reorder dead · sortablelist
Replace this code
Swap JHtml::_('sortablelist.sortable') for HTMLHelper::_('draggablelist.draggable').
Joomla 3
Remove or stop calling this
JHtml::_('sortablelist.sortable', 'itemList', 'adminForm', 'asc', $saveOrderUrl);Joomla 4 / 6
Use this instead
HTMLHelper::_('draggablelist.draggable');How to fix it
- 1Switch admin ordering tables to draggablelist.
- 2Update the tbody class names Atum expects.
Also known as
sortablelist · draggablelist · jquery ui sortable
JHTMLBEHAVIOR-CLASS-001
JHtmlBehavior
JHtmlBehavior class name
JHtmlBehavior is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JHtmlBehavior" not found.
JHtmlBehavior → Joomla\CMS\HTML\Helpers\Behavior
Dies at Joomla 5 → 6What you will see
- Class "JHtmlBehavior" not found
- Class 'JHtmlBehavior' not found
- Failed to open stream: JHtmlBehavior
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JHtmlBehavior for Joomla\CMS\HTML\Helpers\Behavior.
Joomla 3
Remove or stop calling this
JHtmlBehavior::getInstance();
// or new JHtmlBehavior()Joomla 4 / 6
Use this instead
use Joomla\CMS\HTML\Helpers\Behavior;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\HTML\Helpers\Behavior.
- 2Replace every JHtmlBehavior with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JHtmlBehavior · Joomla\CMS\HTML\Helpers\Behavior · class alias · J prefix
JHTMLFORMBEHAVIOR-CLASS-001
JHtmlFormbehavior
JHtmlFormbehavior class name
JHtmlFormbehavior is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JHtmlFormbehavior" not found.
JHtmlFormbehavior → Joomla\CMS\HTML\Helpers\FormBehavior
Dies at Joomla 5 → 6What you will see
- Class "JHtmlFormbehavior" not found
- Class 'JHtmlFormbehavior' not found
- Failed to open stream: JHtmlFormbehavior
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JHtmlFormbehavior for Joomla\CMS\HTML\Helpers\FormBehavior.
Joomla 3
Remove or stop calling this
JHtmlFormbehavior::getInstance();
// or new JHtmlFormbehavior()Joomla 4 / 6
Use this instead
use Joomla\CMS\HTML\Helpers\FormBehavior;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\HTML\Helpers\FormBehavior.
- 2Replace every JHtmlFormbehavior with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JHtmlFormbehavior · Joomla\CMS\HTML\Helpers\FormBehavior · class alias · J prefix
JHTMLJQUERY-CLASS-001
JHtmlJquery
JHtmlJquery class name
JHtmlJquery is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JHtmlJquery" not found.
JHtmlJquery → Joomla\CMS\HTML\Helpers\Jquery
Dies at Joomla 5 → 6What you will see
- Class "JHtmlJquery" not found
- Class 'JHtmlJquery' not found
- Failed to open stream: JHtmlJquery
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JHtmlJquery for Joomla\CMS\HTML\Helpers\Jquery.
Joomla 3
Remove or stop calling this
JHtmlJquery::getInstance();
// or new JHtmlJquery()Joomla 4 / 6
Use this instead
use Joomla\CMS\HTML\Helpers\Jquery;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\HTML\Helpers\Jquery.
- 2Replace every JHtmlJquery with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JHtmlJquery · Joomla\CMS\HTML\Helpers\Jquery · class alias · J prefix
JS-JQUERY-ASSUME-001
JHtml::_('jquery.framework')
Assuming jQuery is always on the page
Joomla 3 always loaded jQuery on many templates. Joomla 6 front-end does not guarantee jQuery. $ is not defined is the usual console error.
JHtml::_('jquery.framework') → Declare jQuery in joomla.asset.json only if you still need it
Dies at Joomla 5 → 6What you will see
- $ is not defined
- jQuery is not defined
- Uncaught ReferenceError: jQuery
Symptoms people search
tabs/sliders dead after Joomla 6 · console jquery is not defined
Replace this code
Swap JHtml::_('jquery.framework') for Declare jQuery in joomla.asset.json only if you still need it.
Joomla 3
Remove or stop calling this
jQuery(function ($) {
$('.lms-tab').on('click', ...);
});Joomla 4 / 6
Use this instead
// Prefer vanilla JS.
// If you must use jQuery, depend on it in joomla.asset.json — do not force jquery.framework on a Joomla 6 site template.How to fix it
- 1Check the browser console for $ is not defined.
- 2Rewrite small scripts to vanilla JS.
- 3If jQuery is required, add it as a WebAsset dependency — do not JHtml::_('jquery.framework') in a site template.
Also known as
jquery.framework · jQuery · $(
JS-JTEXT-001
Joomla.JText._()
Joomla.JText (JavaScript)
The JS language object was renamed. Joomla.JText is legacy.
Joomla.JText._() → Joomla.Text._() + Text::script() in PHP
Dies at Joomla 5 → 6What you will see
- Cannot read properties of undefined (reading '_')
- Joomla.JText is undefined
Symptoms people search
JS alert shows the language key · frontend strings not translated
Replace this code
Swap Joomla.JText._() for Joomla.Text._() + Text::script() in PHP.
Joomla 3
Remove or stop calling this
alert(Joomla.JText._('COM_LMS_SAVED'));Joomla 4 / 6
Use this instead
alert(Joomla.Text._('COM_LMS_SAVED'));
// PHP: Text::script('COM_LMS_SAVED');How to fix it
- 1Replace Joomla.JText with Joomla.Text.
- 2Push strings with Text::script() in PHP.
Also known as
Joomla.JText · Joomla.Text · Text::script
JS-MEDIA-JUI-001
media/jui/js/jquery.min.js
media/jui paths
media/jui was the Joomla 3 asset dump (jQuery, Bootstrap 2, jQuery UI). Those files are not on Joomla 4+.
media/jui/js/jquery.min.js → WebAssetManager registered assets
Dies at Joomla 3 → 4What you will see
- 404 /media/jui/js/jquery.min.js
- 404 /media/jui/css/bootstrap.min.css
Symptoms people search
404 jui · jquery ui missing
Replace this code
Swap media/jui/js/jquery.min.js for WebAssetManager registered assets.
Joomla 3
Remove or stop calling this
JHtml::script('jui/jquery.min.js');Joomla 4 / 6
Use this instead
$wa->useScript('jquery'); // only if you still need itHow to fix it
- 1Remove jui/ URLs.
- 2Use WAM names or ship your own assets in your extension media folder.
Also known as
media/jui · jQuery UI · jquery-migrate
TINYMCE-J3-001
plugins/editors/tinymce J3 plugins
TinyMCE Joomla 3 plugins
Editor plugins are version-locked to TinyMCE. Joomla 6 is not TinyMCE 4.
plugins/editors/tinymce J3 plugins → Core TinyMCE for Joomla 4/5/6
Dies at Joomla 3 → 4Symptoms people search
editor buttons gone · tinymce plugin
Replace this code
Swap plugins/editors/tinymce J3 plugins for Core TinyMCE for Joomla 4/5/6.
Joomla 3
Remove or stop calling this
Custom TinyMCE 4 plugins copied into Joomla 3 mediaJoomla 4 / 6
Use this instead
Rebuild against the TinyMCE version Joomla 6 ships. J3 plugin JS will not load.How to fix it
- 1Retest every editor button.
- 2Drop or rewrite custom TinyMCE plugins.
Also known as
TinyMCE · editors-xtd
There is no 1:1 swap for this one. The architecture changed. If you cannot rewrite it, Infyways can.