{"record":{"id":"8b671f47c25a0f5b","repo":"Semantic-Org/Semantic-UI","slug":"you-attempted-to-load-content-without-api-module","errorCode":null,"errorMessage":"You attempted to load content without API module","messagePattern":"You attempted to load content without API module","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/tab.js","lineNumber":923,"sourceCode":"  cache           : true,       // cache the content requests to pull locally\n  loadOnce        : false,      // Whether tab data should only be loaded once when using remote content\n  cacheType       : 'response', // Whether to cache exact response, or to html cache contents after scripts execute\n  ignoreFirstLoad : false,      // don't load remote content on first load\n\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',","sourceCodeStart":905,"sourceCodeEnd":941,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/tab.js#L905-L941","documentation":"Semantic UI Tab error logged at tab.js:533 when remote tab loading is requested but $.api is undefined. Tab relies on the separate Semantic UI API module to fetch remote content; if api.js is not loaded, it cannot satisfy a tab path that requires AJAX and logs this error.","triggerScenarios":"Declaring a tab with a remote path (data-tab=\"remote/path\") and a corresponding API setting, or relying on settings.apiSettings, while the Semantic UI API javascript file is not included in the page.","commonSituations":"Custom bundle of Semantic UI that omits the api module; upgrading and forgetting to include api.js; using a CDN that splits modules and missing one; tab paths that look local but the DOM has no matching tab so the loader falls through to the remote branch.","solutions":["Include the Semantic UI API module (semantic-api.js or the full build) before the tab module.","Ensure the tab has a matching in-DOM target so it does not fall into the remote-load branch.","Set the tab's content path explicitly and confirm apiSettings is configured if remote loading is intended."],"exampleFix":"// before - missing api module\n<script src=\"semantic-tab.js\"></script>\n// after\n<script src=\"semantic-api.js\"></script>\n<script src=\"semantic-tab.js\"></script>","handlingStrategy":"type-guard","validationCode":"if (typeof $.api === 'undefined' && hasRemoteTabs()) {\n  console.error('Include semantic-api.js before enabling remote tabs');\n} else {\n  $('.menu .item').tab({ apiSettings: { url: '/tabs/{tab}.html' } });\n}","typeGuard":"function isApiModuleLoaded() { return typeof $.api === 'function'; }","tryCatchPattern":null,"preventionTips":["Bundle the API module whenever remote tabs are used.","Feature-detect $.api before initializing tabs with apiSettings.","Keep local tab panes in the DOM where AJAX is not needed."],"tags":["semantic-ui","tab","missing-module","api"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}