{"record":{"id":"97f2f179da796c74","repo":"Semantic-Org/Semantic-UI","slug":"you-tried-to-switch-to-a-side-that-does-not-exist","errorCode":null,"errorMessage":"You tried to switch to a side that does not exist.","messagePattern":"You tried to switch to a side that does not exist\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/modules/shape.js","lineNumber":900,"sourceCode":"  // width during animation, can be set to 'auto', initial', 'next' or pixel amount\n  width: 'initial',\n\n  // height during animation, can be set to 'auto', 'initial', 'next' or pixel amount\n  height: 'initial',\n\n  // callback occurs on side change\n  beforeChange : function() {},\n  onChange     : function() {},\n\n  // allow animation to same side\n  allowRepeats: false,\n\n  // animation duration\n  duration   : false,\n\n  // possible errors\n  error: {\n    side   : 'You tried to switch to a side that does not exist.',\n    method : 'The method you called is not defined'\n  },\n\n  // classnames used\n  className   : {\n    animating : 'animating',\n    hidden    : 'hidden',\n    loading   : 'loading',\n    active    : 'active'\n  },\n\n  // selectors used\n  selector    : {\n    sides : '.sides',\n    side  : '.side'\n  }\n\n};","sourceCodeStart":882,"sourceCodeEnd":918,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/shape.js#L882-L918","documentation":"Emitted in Shape's set.nextSide(selector) (shape.js:281-283) when $side.filter(selector).length === 0 — the requested side selector matches none of the shape's .side children. Shape resets to the default side and logs the error. It is a console.error (shape.js:725), not thrown.","triggerScenarios":"$('.shape').shape('.nope') or flipping to a side selector that matches no element carrying the .side class inside the shape.","commonSituations":"Typo in the side selector, side elements missing the .side class, sides added dynamically after shape init.","solutions":["Pass a selector that matches an existing .side child (e.g. '.second', an index, or '.next').","Make sure every side element has the class=\"side\" markup.","Call $('.shape').shape('refresh') after adding sides dynamically."],"exampleFix":"// before\n$('.shape').shape('.thrid'); // typo -> side error\n// after\n$('.shape').shape('.third');","handlingStrategy":"validation","validationCode":"// Confirm the requested side selector matches a .side child before flipping.\nfunction flipTo($shape, selector){\n  if ($shape.find('.side').filter(selector).length === 0) {\n    throw new Error('No side matches selector: ' + selector);\n  }\n  $shape.shape('set next side', selector).shape('flip up');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure every side element carries class=\"side\".","Call shape('refresh') after adding sides dynamically.","Prefer stable selectors (class/id) for sides."],"tags":["shape","selector"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}