flarum/framework · warning
Calling `$.tooltip` is now deprecated. Please use the
Error message
Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case
What it means
flarum/core monkey-patches $.fn.tooltip to keep backward compatibility, but emits a console.warn whenever it is called without the DANGEROUS_tooltip_jquery_fn_deprecation_exempt caller marker. This tells extension authors that the jQuery tooltip API is deprecated and will be removed; they should migrate to the <Tooltip> component shipped in flarum/core.
Solutions
- Replace the $.fn.tooltip usage with the <Tooltip> component from flarum/core.
- If a temporary exemption is truly required, pass caller='DANGEROUS_tooltip_jquery_fn_deprecation_exempt' (discouraged; still slated for removal).
- Update the affected extension to a version that uses the Tooltip component.
- File an issue with flarum/core if the Tooltip component cannot cover your use case (link in the warning).
- Suppress until migration only in non-debug environments — the warning ships regardless of debug mode here.
Example fix
// before
this.$('.help').tooltip({ title: 'Help' });
// after
import Tooltip from 'flarum/common/components/Tooltip';
<Tooltip text="Help">{this.helpIcon}</Tooltip> Defensive patterns
Strategy: type-guard
Validate before calling
const usesJqueryTooltip = document.querySelectorAll('[data-tooltip], .tooltip').length > 0 || /\$\(.*\)\.tooltip\(/.test(extSrc);
if (usesJqueryTooltip) migrateToTooltipComponent(extSrc); Type guard
function isExemptTooltipCaller(caller) {
return typeof caller === 'string' && caller === 'DANGEROUS_tooltip_jquery_fn_deprecation_exempt';
} Try / catch
// The warning is a console.warn, not an exception; intercept during migration:
const origWarn = console.warn;
console.warn = (...args) => {
if (String(args[0]).includes('$.tooltip` is now deprecated')) return;
origWarn(...args);
}; Prevention
- Prefer the <Tooltip> component over $.fn.tooltip in all new code.
- Search extension sources for `.tooltip(` when upgrading flarum/core.
- Keep extensions updated to releases using the Tooltip component.
- Grep your bundle for 'DANGEROUS_tooltip_jquery_fn_deprecation_exempt' to find temporary exemptions.
- Track flarum/core changelogs for the removal of the jQuery tooltip shim.
When it happens
Trigger: Calling `$(el).tooltip(options)` (or mithril code invoking the jQuery plugin) from extension code without passing the exempt caller name 'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'.
Common situations: Old extensions written before the Tooltip component existed still calling $.tooltip; copy-pasted jQuery tooltip snippets; upgrading flarum/core surfaces warnings from unmaintained extensions.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
AI-assisted analysis of flarum/framework@4b939f6853 (2026-09-15).
Data as JSON: /api/errors/5e8c2e77d4c47db7.
Report an issue: GitHub.
Appendix: source
Thrown at framework/core/js/src/common/index.ts:36
import './registry';
import patchMithril from './utils/patchMithril';
patchMithril(window);
import app from './app';
export { app };
const tooltipGen = $.fn.tooltip;
// Remove in a future version of Flarum.
// @ts-ignore
$.fn.tooltip = function (options, caller) {
// Show a warning when `$.tooltip` is used outside of the Tooltip component.
// This functionality is deprecated and should not be used.
if (!['DANGEROUS_tooltip_jquery_fn_deprecation_exempt'].includes(caller)) {
console.warn(
"Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"
);
}
tooltipGen.bind(this)(options);
};
View on GitHub (pinned to 4b939f6853)