OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Shape templates for the admin UI in a site theme are not recognized

Open barthamark opened this issue 3 years ago • 1 comments

Describe the bug

I'm building a theme with a bit more "module-like" functionality as usual; for example, I'm adding a deployment plan. Unfortunately, none of the shapes required for any admin-specific features are harvested. In my case, the MyDeploymentStep.Fields.Edit shape is not found even though it's there. Same for any other shapes coming from a Driver and rendered on the admin UI. When I change the theme to a module, it works. I could definitely implement such features in a theme before, it looks like something has changed, and not sure if it's intentional.

To Reproduce

Steps to reproduce the behavior:

  1. Create a theme.
  2. Add any feature that requires the admin UI, e.g., site settings with a display driver that renders an editor shape OR a deployment plan that should render shapes for the thumbnail, editor, etc.
  3. Try to open the specific page. It will throw an exception that it doesn't find the shape.

Expected behavior

It should render the shape as if it'd be a module.

barthamark avatar Jul 27 '22 11:07 barthamark

Site theme is for front-end. Any shape/template added to site theme is harvested for front-end only when the theme is active

For admin templates to work, create templates in admin theme or module or in host app

ns8482e avatar Jul 27 '22 12:07 ns8482e