{"record":{"id":"d6c5aa5e6a7ee334","repo":"Semantic-Org/Semantic-UI","slug":"the-method-you-called-is-not-defined-d6c5aa","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/sticky.js","lineNumber":962,"sourceCode":"  // Called on each scroll\n  onScroll       : function(){},\n\n  // Called when element is stuck to viewport\n  onStick        : function(){},\n\n  // Called when element is unstuck from viewport\n  onUnstick      : function(){},\n\n  // Called when element reaches top of context\n  onTop          : function(){},\n\n  // Called when element reaches bottom of context\n  onBottom       : function(){},\n\n  error         : {\n    container      : 'Sticky element must be inside a relative container',\n    visible        : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.',\n    method         : 'The method you called is not defined.',\n    invalidContext : 'Context specified does not exist',\n    elementSize    : 'Sticky element is larger than its container, cannot create sticky.'\n  },\n\n  className : {\n    bound     : 'bound',\n    fixed     : 'fixed',\n    supported : 'native',\n    top       : 'top',\n    bottom    : 'bottom'\n  }\n\n};\n\n})( jQuery, window, document );\n","sourceCodeStart":944,"sourceCodeEnd":978,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/sticky.js#L944-L978","documentation":"This string lives under $.fn.sticky.settings.error.method, intended for unknown method-name invocations. In this codebase version Sticky's invoke() dispatcher (sticky.js:831-883) never calls module.error(error.method): when a string query resolves to nothing, 'found' stays undefined and the call silently returns undefined. So the message is dead config — you will not actually see it logged by Sticky. Like every module, module.error is a bound console.error (sticky.js:776), not a thrown exception, so try/catch is irrelevant.","triggerScenarios":"$('.sticky').sticky('nonexistentMethod') — the dispatcher (sticky.js:843-865) walks camelCase/dotted segments against the module instance, finds no match, sets found=undefined, and returns undefined with no console output.","commonSituations":"Typo in a method name, using a method from a different Semantic UI version, copy-pasting an API call from another module (e.g. dropdown) into sticky.","solutions":["Spell the method name correctly and confirm it exists for Sticky in this version (e.g. 'refresh', 'scrollToTop').","Check the exact Semantic UI version's docs — method sets differ across releases.","Do not rely on try/catch to surface this; it is never thrown. If you need a hard failure, assert the return value is defined."],"exampleFix":"// before\n$('.sticky').sticky('refesh'); // typo -> silent no-op, returns undefined\n// after\n$('.sticky').sticky('refresh'); // valid method","handlingStrategy":"validation","validationCode":"// Sticky's invoke() returns undefined for unknown methods (never throws).\n// Validate against the known method list before calling.\nvar stickyMethods = ['refresh','observeChanges','set offset','set container','is sticky','bound','unbound','bind events','unbind events','scrollToTop','destroy'];\nfunction callSticky($el, method, args){\n  if (stickyMethods.indexOf(method) === -1 && typeof $el.sticky('module')[method] === 'undefined') {\n    throw new Error('Unknown sticky method: ' + method);\n  }\n  return $el.sticky(method, args);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember these 'errors' are console.error logs bound at sticky.js:776, not thrown — try/catch will not catch them.","Pin your Semantic UI version in package.json/bower.json so the available method set does not shift under you.","Wrap third-party API calls in a thin helper that validates method names so typos fail loudly in dev."],"tags":["sticky","method-dispatch","dead-code"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}