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 shape.error.method, but Shape's invoke() dispatcher (shape.js:783-818) 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 (shape.js:725), not thrown.

Source

Thrown at src/definitions/modules/shape.js:901

  width: 'initial',

  // height during animation, can be set to 'auto', 'initial', 'next' or pixel amount
  height: 'initial',

  // callback occurs on side change
  beforeChange : function() {},
  onChange     : function() {},

  // allow animation to same side
  allowRepeats: false,

  // animation duration
  duration   : false,

  // possible errors
  error: {
    side   : 'You tried to switch to a side that does not exist.',
    method : 'The method you called is not defined'
  },

  // classnames used
  className   : {
    animating : 'animating',
    hidden    : 'hidden',
    loading   : 'loading',
    active    : 'active'
  },

  // selectors used
  selector    : {
    sides : '.sides',
    side  : '.side'
  }

};

View on GitHub (pinned to 597843ab84)

Solutions

  1. Use a documented shape method: 'flip up', 'flip down', 'flip left', 'flip right', 'set next side', 'refresh'.
  2. Confirm the method exists for your installed version.

Example fix

// before
$('.shape').shape('flipp'); // typo -> silent no-op
// after
$('.shape').shape('flip up');
Defensive patterns

Strategy: validation

Validate before calling

// Shape invoke() silently no-ops on unknown methods; validate first.
var shapeMethods = ['flip up','flip down','flip left','flip right','flip over','flip back','set next side','refresh','reset','is animating','destroy'];
function callShape($el, method, args){
  if (shapeMethods.indexOf(method) === -1) {
    throw new Error('Unknown shape method: ' + method);
  }
  return $el.shape(method, args);
}

Prevention

When it happens

Trigger: $('.shape').shape('flipp') (typo) — dispatcher finds no matching key, returns undefined, no console output.

Common situations: Typo in method name, version drift.

Related errors


AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13). Data as JSON: /api/errors/a732f09acce93610. Report an issue: GitHub.