Content type id's containing a dash cause JS error in MediaGallery


  1. Create a new content type with an ID that contains a dash (e.g. test-2).
  2. Add a media gallery field to the content type
  3. Save the content type
  4. Create a new content item of this type
  5. Check the JS console for an error similar to
SCRIPT1004: Expected ';' 
test-2, line 220 character 14
The issue is in \Orchard.Fields\Views\EditorTemplates\Fields\MediaGallery.Edit.cshtml line 59. In JavaScript variable names must not contain dashes.


sebastienros wrote Jul 6, 2013 at 6:27 PM

Fixed in changeset ac379322419c

sfmskywalker wrote Mar 28, 2014 at 12:28 AM

Fixed in changeset 3d0609fc2397fd4e293cfa67db9ca9b1744508d0