{"record":{"id":"5055665ef0d7a9ed","repo":"emberjs/ember.js","slug":"mixing-and-in-paths-is-not-supported-in-gl","errorCode":null,"errorMessage":"Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths","messagePattern":"Mixing '\\.' and '/' in paths is not supported in Glimmer; use only '\\.' to separate property paths","errorType":"validation","errorClass":"SyntaxError","httpStatus":null,"severity":"error","filePath":"packages/@glimmer/syntax/lib/parser/handlebars-node-visitors.ts","lineNumber":411,"sourceCode":"  PathExpression(path: HBS.PathExpression): ASTv1.PathExpression {\n    const { original } = path;\n    let parts: string[];\n\n    if (original.indexOf('/') !== -1) {\n      if (original.slice(0, 2) === './') {\n        throw generateSyntaxError(\n          `Using \"./\" is not supported in Glimmer and unnecessary`,\n          this.source.spanFor(path.loc)\n        );\n      }\n      if (original.slice(0, 3) === '../') {\n        throw generateSyntaxError(\n          `Changing context using \"../\" is not supported in Glimmer`,\n          this.source.spanFor(path.loc)\n        );\n      }\n      if (original.indexOf('.') !== -1) {\n        throw generateSyntaxError(\n          `Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths`,\n          this.source.spanFor(path.loc)\n        );\n      }\n      parts = [path.parts.join('/')];\n    } else if (original === '.') {\n      throw generateSyntaxError(\n        `'.' is not a supported path in Glimmer; check for a path with a trailing '.'`,\n        this.source.spanFor(path.loc)\n      );\n    } else {\n      parts = path.parts;\n    }\n\n    let thisHead = false;\n\n    // This is to fix a bug in the Handlebars AST where the path expressions in\n    // `{{this.foo}}` (and similarly `{{foo-bar this.foo named=this.foo}}` etc)","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/syntax/lib/parser/handlebars-node-visitors.ts#L393-L429","documentation":"Glimmer only accepts '.' as the property-path separator. Paths that mix '.' and '/' (a legacy Ember idiom like this.controller.property or foo/bar.baz) are rejected by the PathExpression visitor so templates fail fast at compile time rather than resolving in unexpected ways at runtime.","triggerScenarios":"Compiling a template containing a path expression whose original string contains a '.' anywhere (when it also contains '/', or in general inside the dot-check branch): e.g. {{model/user.name}}, {{a/b.c}}, helpers written as foo/bar in an expression. The visitor throws when original.indexOf('.') !== -1 after the '../' check.","commonSituations":"Porting very old Ember 1.x templates where '/' separated actions/actions or nested routes (e.g. {{action \"save\" on=\"controller\"}} era code or users/4 path-style bindings); hand-written paths confusing route URLs with property paths; code generators mixing the two separators.","solutions":["Replace every '/' separator in the expression path with '.': {{model/user.name}} becomes {{model.user.name}}.","Resolve the earlier segments in JS instead: use a getter or helper (e.g. {{get this.model \"user.name\"}} or a computed property) so the template path is pure dot notation.","If you meant a route URL or asset path, move it into a string literal or helper argument, not a property path.","Update any template codegen/linting so it emits dot-separated paths only."],"exampleFix":"// before\n{{model/user.name}}\n\n// after\n{{model.user.name}}","handlingStrategy":"validation","validationCode":"// validate expression paths before compiling\nfunction assertDotOnlyPaths(template) {\n  // catch '/' used as a path separator inside {{ }} expressions\n  const bad = template.match(/{{[^}]*\\/[.,a-zA-Z@][^}]*}}/g);\n  if (bad) throw new Error(`Paths mixing '.' and '/': ${bad.join(', ')}`);\n}\nassertDotOnlyPaths(template);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only '.' to separate property segments in template paths","Resolve nested/legacy lookups in JS getters or the {{get}} helper instead","Do not confuse route URL patterns (users/4) with property paths in expressions","Add ember-template-lint to CI to catch path syntax issues pre-build"],"tags":["glimmer","handlebars","template-syntax","path-separator"],"backgroundTag":"glimmer-path-separator-invalid","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}