U4-2840 - Content Picker breaks with dash in property alias

Created by Lee Kelleher 11 Sep 2013, 16:31:10 Updated by Shannon Deminick 21 Jun 2017, 07:58:15

Is duplicated by: U4-2820

When adding a Content Picker to a document-type with a property-alias that contains a dash, breaks the {{editContent.aspx}} screen.

The following JavaScript error is thrown (from Chrome's debugger) from "editContent.aspx?id=1234:409"

Uncaught SyntaxError: Unexpected token -

Steps to reproduce:

  1. Add a new property to a document-type called "Content-Property"
  2. This should give the property's alias as "content-Property" - hit save.
  3. Go to the Content section, go to a node for that doc-type.
  4. The page doesn't render and JavaScript console has errors.

Digging deeper

It's because the property-alias is used as the JavaScript variable... here's the rendered JS from my page:

The culprit is {{mc_body_prop_content-Picker}}!


Shannon Deminick 21 Jun 2017, 07:58:15

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal

Category: Editor

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: