gatsbyjs/gatsby · error

Failed to process inline html links in ${node.__typename} ${

Error message

Failed to process inline html links in ${node.__typename} ${node.id}

What it means

Warns that rewriting one inline HTML link inside a WordPress node's content failed. During processing, each matched <a href> string is normalized (quotes/backslashes stripped, query params escaped) and replaced with a RegExp; if constructing or applying that regex throws, the original link is left unreplaced and only a warning is logged — the node is still created.

Source

Thrown at packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/process-node.js:881

        try {
          // remove \, " and ' characters from match
          const normalizedMatch = match
            .replace(/['"\\]/g, ``)
            // ensure that query params are properly quoted
            .replace(/\?/, `\\?`)

          const normalizedPath = path.replace(/\\/g, ``)

          // replace normalized match with relative path
          const thisMatchRegex = new RegExp(
            normalizedMatch + `(?!/?wp-content|/?wp-admin|/?wp-includes)`,
            `g`
          )

          nodeString = nodeString.replace(thisMatchRegex, normalizedPath)
        } catch (e) {
          console.error(e)
          console.warn(
            formatLogMessage(
              `Failed to process inline html links in ${node.__typename} ${node.id}`
            )
          )
        }
      }
    })
  }

  return nodeString
}

// replaces specific string or regex with a given string from the plugin options config
export const searchAndReplaceNodeStrings = ({
  nodeString,
  node,
  pluginOptions,
}) => {

View on GitHub (pinned to e85d62f177)

Solutions

  1. Inspect the node's HTML content for unusual or escaped link markup
  2. Ensure searchAndReplace and URL replacements produce valid patterns
  3. Report the node content if the failure looks like a plugin bug
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/process-node.js:881 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26). Data as JSON: /api/errors/8251bf5e1a8a826d. Report an issue: GitHub.