Theme view overrides core editor view in admin dashboard

Topics: Writing modules, Writing themes
Sep 4, 2013 at 6:55 AM

I've overridden title editor in my theme, with a Parts.Title.TitlePart.cshtml in MyTheme/Views/Parts/EditorTemplates folder. The file content is as follows:
@model Orchard.Core.Title.Models.TitlePart

@Html.HiddenFor(m => m.Title)
When my theme is set current, title editor is rendered in the admin dashboard according to my theme's version. I think this shouldn't be the case, and alternate files in theme's Views folder should be ignored in the dashboard, as TheAdmin is the ruling theme.

So, could you please confirm if this is a bug, or if I've done something wrong, and let me know if there is a workaround to render a hidden field in the frontend and the original in the dashboard?
Sep 4, 2013 at 6:25 PM
What is the priority of your theme?
Sep 5, 2013 at 1:24 AM
There is no IThemeSelector in the theme project, so I assume it's the default priority.

Sep 5, 2013 at 5:18 AM
I really don't see how that could be happening, but if you have a simple repro on a vanilla install, please file a bug.
Sep 5, 2013 at 12:42 PM
I didn't have time to do it on a vanilla install, but with no shape related changes in orchard source I have, and without enabling any other custom modules/theme, I reproduced. Here is the issue link:
Oct 3, 2013 at 12:42 PM
In case anyone else faces the same problem, a simple workaround is to copy original view files (from Orchard.Core) under TheAdmin theme's Views/EditorTemplates folder. Currently there is no such folder in TheAdmin theme, you will need to create one.