{"record":{"id":"4aab05d64e88a7f3","repo":"Semantic-Org/Semantic-UI","slug":"the-method-you-called-is-not-defined-4aab05","errorCode":null,"errorMessage":"The method you called is not defined.","messagePattern":"The method you called is not defined\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/definitions/modules/modal.js","lineNumber":1021,"sourceCode":"\n  // called after hide animation\n  onHidden   : function(){},\n\n  // called after approve selector match\n  onApprove  : function(){ return true; },\n\n  // called after deny selector match\n  onDeny     : function(){ return true; },\n\n  selector    : {\n    close    : '> .close',\n    approve  : '.actions .positive, .actions .approve, .actions .ok',\n    deny     : '.actions .negative, .actions .deny, .actions .cancel',\n    modal    : '.ui.modal'\n  },\n  error : {\n    dimmer    : 'UI Dimmer, a required component is not included in this page',\n    method    : 'The method you called is not defined.',\n    notFound  : 'The element you specified could not be found'\n  },\n  className : {\n    active     : 'active',\n    animating  : 'animating',\n    blurring   : 'blurring',\n    inverted   : 'inverted',\n    legacy     : 'legacy',\n    loading    : 'loading',\n    scrolling  : 'scrolling',\n    undetached : 'undetached'\n  }\n};\n\n\n})( jQuery, window, document );\n","sourceCodeStart":1003,"sourceCodeEnd":1038,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/modal.js#L1003-L1038","documentation":"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.","triggerScenarios":"$('.ui.modal').modal('showw') (typo) — dispatcher finds no matching key on the module instance, returns undefined, no console output.","commonSituations":"Typo in method name, using an API from a different version.","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."],"exampleFix":"// before\n$('.ui.modal').modal('showw'); // typo -> silent no-op\n// after\n$('.ui.modal').modal('show');","handlingStrategy":"validation","validationCode":"// Modal invoke() silently no-ops on unknown methods; validate first.\nvar 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'];\nfunction callModal($el, method, args){\n  if (modalMethods.indexOf(method) === -1) {\n    throw new Error('Unknown modal method: ' + method);\n  }\n  return $el.modal(method, args);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["modal","method-dispatch","dead-code"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}