Semantic-Org/Semantic-UI · info
The method you called is not defined.
Error message
The method you called is not defined.
What it means
Defined under modal.error.method, but Modal's invoke() dispatcher (modal.js:877-915) never calls module.error(error.method): an unknown method name leaves found undefined and returns silently. The string is dead config in this version. module.error is a bound console.error (modal.js:822), not a thrown exception.
Source
Thrown at src/definitions/modules/modal.js:1021
// called after hide animation
onHidden : function(){},
// called after approve selector match
onApprove : function(){ return true; },
// called after deny selector match
onDeny : function(){ return true; },
selector : {
close : '> .close',
approve : '.actions .positive, .actions .approve, .actions .ok',
deny : '.actions .negative, .actions .deny, .actions .cancel',
modal : '.ui.modal'
},
error : {
dimmer : 'UI Dimmer, a required component is not included in this page',
method : 'The method you called is not defined.',
notFound : 'The element you specified could not be found'
},
className : {
active : 'active',
animating : 'animating',
blurring : 'blurring',
inverted : 'inverted',
legacy : 'legacy',
loading : 'loading',
scrolling : 'scrolling',
undetached : 'undetached'
}
};
})( jQuery, window, document );
View on GitHub (pinned to 597843ab84)
Solutions
- Use a documented modal method: 'show', 'hide', 'toggle', 'refresh', 'set active', etc.
- Confirm the method exists for your installed version.
- If you need a hard failure, check the return value rather than expecting a throw.
Example fix
// before
$('.ui.modal').modal('showw'); // typo -> silent no-op
// after
$('.ui.modal').modal('show'); Defensive patterns
Strategy: validation
Validate before calling
// Modal invoke() silently no-ops on unknown methods; validate first.
var modalMethods = ['show','hide','toggle','refresh','set active','set dimmer variation','can fit','is active','is animating','set observations','attach events','show dimmer','hide dimmer','destroy'];
function callModal($el, method, args){
if (modalMethods.indexOf(method) === -1) {
throw new Error('Unknown modal method: ' + method);
}
return $el.modal(method, args);
} Prevention
- Treat an undefined modal() return as a likely bad method name.
- Pin the Semantic UI version; modal APIs vary across releases.
- These are console.error logs (modal.js:822), not exceptions — validate explicitly.
When it happens
Trigger: $('.ui.modal').modal('showw') (typo) — dispatcher finds no matching key on the module instance, returns undefined, no console output.
Common situations: Typo in method name, using an API from a different version.
Related errors
- The method you called is not defined.
- The method you called is not defined
- The method you called is not defined
- The method you called is not defined.
- The method you called is not defined.
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/4aab05d64e88a7f3.
Report an issue: GitHub.