November Happy Hour will be moved to Thursday December 5th.

"Unable to establish the template category of the template of type: '...StandardPageController'" when adding Protected module in config

Vote:
 

Hi all,

I get a wierd error while developing a custom Dojo widget. The widget works just fine in edit mode, but when I try to view the start page on my test site I get a 404. The logged error message is "Unable to establish the template category of the template of type: '...StandardPageController'" and it is logged by a class called EPiServer.Scanning.Internal.DefaultTemplateExtractor[0]

When i remove the section i appSettings.json the page loads as usual, but the widget in edit mode is not found by the CMS.

"CmsUI": {
  "ProtectedModule": {
     "Items": [
      {
         "Name": "MyWidget"
      }
    ]
   }
 }

What am I missing? 

#300816
Apr 27, 2023 7:31
Vote:
 

The error is thrown from EPiServer.Scanning.Internal.DefaultTemplateExtractor.Extract(Type) when none of the implemented interfaces of the type is IRenderTemplate<T>.

In some case, it's automatically resolved by clean and rebuild the solution.

#310334
Oct 10, 2023 7:45
Vote:
 

I do have the same issue, how did you solve it?

I guess it is somehow to do with the routing?

With code, this is not working in my solution nor appsettings config:

services.Configure<ProtectedModuleOptions>(
    pm =>
    {
        if (!pm.Items.Any(i =>
            i.Name.Equals("MyWidget", StringComparison.OrdinalIgnoreCase)))
        {
            pm.Items.Add(new ModuleDetails { Name = "MyWidget" });
        }
    });

#330353
Sep 22, 2024 21:19
Vote:
 

Found it,

In module.config

remove the following if you are runing module code in same project.

<assemblies>
        <add assembly="MySite.Mvc" />
</assemblies>

#330354
Sep 22, 2024 21:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.