{"record":{"id":"cbead7474e5bc839","repo":"Semantic-Org/Semantic-UI","slug":"max-recursive-depth-reached","errorCode":null,"errorMessage":"Max recursive depth reached","messagePattern":"Max recursive depth reached","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/tab.js","lineNumber":928,"sourceCode":"  apiSettings     : false,      // settings for api call\n  evaluateScripts : 'once',     // whether inline scripts should be parsed (true/false/once). Once will not re-evaluate on cached content\n\n  onFirstLoad : function(tabPath, parameterArray, historyEvent) {}, // called first time loaded\n  onLoad      : function(tabPath, parameterArray, historyEvent) {}, // called on every load\n  onVisible   : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible\n  onRequest   : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content\n\n  templates : {\n    determineTitle: function(tabArray) {} // returns page title for path\n  },\n\n  error: {\n    api        : 'You attempted to load content without API module',\n    method     : 'The method you called is not defined',\n    missingTab : 'Activated tab cannot be found. Tabs are case-sensitive.',\n    noContent  : 'The tab you specified is missing a content url.',\n    path       : 'History enabled, but no path was specified',\n    recursion  : 'Max recursive depth reached',\n    legacyInit : 'onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.',\n    legacyLoad : 'onTabLoad has been renamed to onLoad in 2.0. Please adjust your code',\n    state      : 'History requires Asual\\'s Address library <https://github.com/asual/jquery-address>'\n  },\n\n  metadata : {\n    tab    : 'tab',\n    loaded : 'loaded',\n    promise: 'promise'\n  },\n\n  className   : {\n    loading : 'loading',\n    active  : 'active'\n  },\n\n  selector    : {\n    tabs : '.ui.tab',","sourceCodeStart":910,"sourceCodeEnd":946,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/tab.js#L910-L946","documentation":"Semantic UI Tab error logged at tab.js:632 inside get.defaultPath(). When a tab path is a parent that auto-expands to a default child, the module recurses to resolve the deepest default; once recursionDepth reaches settings.maxDepth, it stops and logs this error.","triggerScenarios":"A chain of tabs where data-tab=\"a/b\", data-tab=\"a/b/c\", etc. each declare the next as default, creating a cycle or a chain longer than maxDepth (default 5).","commonSituations":"Cyclic default-tab chains (a -> b -> a); deeply nested tab hierarchies beyond maxDepth; accidentally re-pointing data-tab attributes at runtime into a loop.","solutions":["Find and break the cycle in data-tab default-tab resolution.","Increase settings.maxDepth if the chain legitimately exceeds the default.","Audit dynamically generated tab attributes to ensure no recursive default loops."],"exampleFix":"// before - cyclic defaults\n// after - break the loop, or raise maxDepth\n$('.menu .item').tab({ maxDepth: 10 });","handlingStrategy":"validation","validationCode":"function detectTabCycle(rootPath, maxN) {\n  var seen = {}; var current = rootPath; var n = 0;\n  while (current && !seen[current] && n < (maxN || 20)) {\n    seen[current] = true;\n    var next = document.querySelector('[data-tab=\"' + current + '\"]');\n    current = next ? next.getAttribute('data-tab') : null;\n    n++;\n  }\n  return !!current && !!seen[current];\n}","typeGuard":"function isWithinMaxDepth(depth, max) { return depth <= (max || 5); }","tryCatchPattern":null,"preventionTips":["Avoid default-tab chains that point back to an ancestor.","Raise maxDepth only when the chain is legitimate.","Lint dynamically-built tab hierarchies for cycles."],"tags":["semantic-ui","tab","recursion","configuration"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}