{"record":{"id":"ebe9b31a49125d43","repo":"Semantic-Org/Semantic-UI","slug":"history-enabled-but-no-path-was-specified","errorCode":null,"errorMessage":"History enabled, but no path was specified","messagePattern":"History enabled, but no path was specified","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/tab.js","lineNumber":927,"sourceCode":"\n  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    : {","sourceCodeStart":909,"sourceCodeEnd":945,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/tab.js#L909-L945","documentation":"Semantic UI Tab error logged at tab.js:195 when history is enabled with historyType 'state' but settings.path is falsy. The HTML5 history-state mode needs a base path to write into $.address.state(...); without one it cannot initialize state.","triggerScenarios":"Initializing the tab module with { history: true, historyType: 'state' } but omitting or explicitly setting path:false.","commonSituations":"Copy-pasting a tab config that enabled history but stripping the path; SPA root where the base path is computed dynamically and resolves to undefined; enabling history accidentally via a shared settings object.","solutions":["Set an explicit path: { history: true, historyType: 'state', path: '/app' }.","Disable history if state-based routing is not required: { history: false }.","Use historyType 'hash' instead, which does not require a base path."],"exampleFix":"// before\n$('.menu .item').tab({ history: true, historyType: 'state' });\n// after\n$('.menu .item').tab({ history: true, historyType: 'state', path: '/dashboard' });","handlingStrategy":"validation","validationCode":"function validateTabHistoryConfig(cfg) {\n  if (cfg && cfg.history && cfg.historyType === 'state' && !cfg.path) {\n    throw new Error('Tab historyType \"state\" requires a non-empty settings.path');\n  }\n}","typeGuard":"function isValidStateHistoryConfig(cfg) {\n  return !cfg || !cfg.history || cfg.historyType !== 'state' || (typeof cfg.path === 'string' && cfg.path.length > 0);\n}","tryCatchPattern":null,"preventionTips":["Compute a base path before init and pass it explicitly.","Disable history if you don't need state-based routing.","Use historyType 'hash' when no base path is available."],"tags":["semantic-ui","tab","history","configuration"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}