{"record":{"id":"5f022685d168b972","repo":"Semantic-Org/Semantic-UI","slug":"the-method-you-called-is-not-defined","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":"error","filePath":"src/definitions/globals/site.js","lineNumber":432,"sourceCode":"    if(instance !== undefined) {\n      module.destroy();\n    }\n    module.initialize();\n  }\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.site.settings = {\n\n  name        : 'Site',\n  namespace   : 'site',\n\n  error : {\n    console : 'Console cannot be restored, most likely it was overwritten outside of module',\n    method : 'The method you called is not defined.'\n  },\n\n  debug       : false,\n  verbose     : false,\n  performance : true,\n\n  modules: [\n    'accordion',\n    'api',\n    'checkbox',\n    'dimmer',\n    'dropdown',\n    'embed',\n    'form',\n    'modal',\n    'nag',\n    'popup',\n    'rating',","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/globals/site.js#L414-L450","documentation":"This error is logged by the Semantic UI site module when a method name passed to $.site('some.method') does not match any property in the module object. The module's invoke function (site.js:346-404) traverses the module object by splitting the query string on dots/periods; if no matching key is found at any depth, it logs this error. The error is informational — it tells the developer they are calling a non-existent method.","triggerScenarios":"Calling $.site('nonexistent'), $.site('change.setting', 'key', 'val', ['wrongModule']) where 'change.setting' is mistyped, or passing a method name that was renamed or removed in the current version. Also happens when a module name in the modules array does not exist.","commonSituations":"Typographical errors in method names, version mismatches after upgrading Semantic UI (method renamed), or calling a method that belongs to a different module than 'site'. Also common when copy-pasting code examples from a different version's documentation.","solutions":["Check the Semantic UI site module documentation for the correct method name.","Inspect the module object: console.log the methods available via $.site.settings to see valid method names.","Remove the invocation or correct the method name spelling."],"exampleFix":"// before\n$.site('chnage.setting', 'debug', true, ['accordion']); // typo\n\n// after\n$.site('change.setting', 'debug', true, ['accordion']);","handlingStrategy":"type-guard","validationCode":"// Validate method name before invoking\nvar validMethods = ['change.setting', 'setting', 'enable.debug', 'disable.debug', 'enable.verbose', 'disable.verbose', 'enable.console', 'disable.console'];\nif (validMethods.indexOf(methodName) !== -1) {\n  $.site(methodName);\n} else {\n  console.warn('Unknown site method:', methodName);\n}","typeGuard":"// Type guard for site module methods\nfunction isValidSiteMethod(name) {\n  var valid = ['change.setting','setting','enable.debug','disable.debug','enable.verbose','disable.verbose','enable.console','disable.console','destroy'];\n  return typeof name === 'string' && valid.indexOf(name) !== -1;\n}","tryCatchPattern":null,"preventionTips":["Check the Semantic UI site module documentation for valid method names.","Avoid dynamically constructing method names from user input.","Keep method name references in a constants file to avoid typos."],"tags":["site","invoke","method-not-found","semantic-ui"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}