{"record":{"id":"83d83f9d75ef125b","repo":"handlebars-lang/handlebars.js","slug":"trackids-and-stringparams-are-no-longer-supported","errorCode":null,"errorMessage":"TrackIds and stringParams are no longer supported. See Github #1145","messagePattern":"TrackIds and stringParams are no longer supported\\. See Github #1145","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"lib/handlebars/compiler/compiler.js","lineNumber":488,"sourceCode":"      compiled = compileInput();\n    }\n    return compiled.call(this, context, execOptions);\n  };\n}\n\nfunction validateInput(input, options) {\n  if (\n    input == null ||\n    (typeof input !== 'string' && input.type !== 'Program')\n  ) {\n    throw new Exception(\n      'You must pass a string or Handlebars AST to Handlebars.compile. You passed ' +\n        input\n    );\n  }\n\n  if (options.trackIds || options.stringParams) {\n    throw new Exception(\n      'TrackIds and stringParams are no longer supported. See Github #1145'\n    );\n  }\n\n  if (!('data' in options)) {\n    options.data = true;\n  }\n  if (options.compat) {\n    options.useDepths = true;\n  }\n}\nfunction compileEnvironment(input, options, env) {\n  let ast = env.parse(input, options);\n  return new env.Compiler().compile(ast, options);\n}\n\nfunction argEquals(a, b) {\n  if (a === b) {","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/handlebars-lang/handlebars.js/blob/13a7a679910d2adbfe7f6fad61ce8f98426b0378/lib/handlebars/compiler/compiler.js#L470-L506","documentation":"The legacy compile options trackIds and stringParams were removed; supplying either throws with a pointer to GitHub issue #1145. They previously changed metadata passed to helpers and were replaced by the block-params/data mechanism.","triggerScenarios":"Handlebars.compile(tpl, {trackIds: true}) or {stringParams: true} — options carried over from Handlebars 1.x/2.x code.","commonSituations":"Upgrading old Handlebars versions where shared options objects still contain trackIds/stringParams; copied config from outdated tutorials.","solutions":["Remove trackIds and stringParams from the options object.","If you need parameter tracking in helpers, use the modern @data/block-params features (options.data).","When upgrading, prune deprecated options from centralized compile-config helper functions."],"exampleFix":"// before\nHandlebars.compile(tpl, {trackIds: true, stringParams: true});\n// after\nHandlebars.compile(tpl, {});","handlingStrategy":"validation","validationCode":"function compileClean(src, options = {}) {\n  const { trackIds, stringParams, ...rest } = options;\n  if (trackIds !== undefined || stringParams !== undefined) {\n    console.warn('trackIds/stringParams are removed (handlebars #1145); ignoring');\n  }\n  return Handlebars.compile(src, rest);\n}","typeGuard":"const hasRemovedOptions = (o) => o != null && ('trackIds' in o || 'stringParams' in o);","tryCatchPattern":"try { return Handlebars.compile(src, options); } catch (e) { if (/TrackIds and stringParams/.test(e.message)) { const { trackIds, stringParams, ...rest } = options; return Handlebars.compile(src, rest)(data); } throw e; }","preventionTips":["Audit shared compile-options objects when upgrading Handlebars.","Destructure-and-drop deprecated options at the config boundary.","Replace tracking features with modern options.data / block params."],"tags":["compiler-options","deprecated-api","version-migration"],"backgroundTag":"removed-option","analyzedSha":"13a7a679910d2adbfe7f6fad61ce8f98426b0378","analyzedAt":"2026-09-02T20:25:07.518Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}