{"record":{"id":"2bfe4c08a7b4a8ea","repo":"gatsbyjs/gatsby","slug":"skipping-tableofcontents-field-appliedtocoptio","errorCode":null,"errorMessage":"Skipping TableOfContents. Field '${appliedTocOptions.pathToSlugField}' missing from markdown node","messagePattern":"Skipping TableOfContents\\. Field '(.+?)' missing from markdown node","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-transformer-remark/src/extend-node-type.js","lineNumber":398,"sourceCode":"      }\n\n      const ast = await getAST(markdownNode, context)\n      const headings = selectAll(`heading`, ast).map(heading => {\n        return {\n          id: getHeadingID(heading),\n          value: mdastToString(heading),\n          depth: heading.depth,\n        }\n      })\n\n      await cache.set(markdownCacheKey, headings)\n      return headings\n    }\n\n    function addSlugToUrl(markdownNode, slugField, appliedTocOptions, node) {\n      if (node.url) {\n        if (slugField === undefined) {\n          console.warn(\n            `Skipping TableOfContents. Field '${appliedTocOptions.pathToSlugField}' missing from markdown node`\n          )\n          return null\n        }\n\n        node.url = [basePath, slugField, node.url]\n          .join(`/`)\n          .replace(/\\/\\//g, `/`)\n      }\n\n      if (node.children) {\n        node.children = node.children\n          .map(node =>\n            addSlugToUrl(markdownNode, slugField, appliedTocOptions, node)\n          )\n          .filter(Boolean)\n      }\n","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-transformer-remark/src/extend-node-type.js#L380-L416","documentation":"Guard while building the tableOfContents HTML: for a markdown link node with a url, the field named by appliedTocOptions.pathToSlugField (default 'slug') is undefined on the node being linked, so a URL to embed cannot be formed. That link is skipped (kept as-is) and the rest of the ToC is generated.","triggerScenarios":"Thrown at packages/gatsby-transformer-remark/src/extend-node-type.js:398 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set pathToSlugField in the tableOfContents options to a field that actually exists on the linked nodes","Add the missing field (e.g. slug via gatsby-node onCreateNode) to the node type being linked","Ensure the markdown internal links point to nodes your site actually creates (not absolute external URLs misinterpreted as relative links)"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}