Try our conversational search powered by Generative AI!

CMS 12 - Public module AutoDiscovery


I have a very simplistic example of a shell module, with following code.

<?xml version="1.0" encoding="utf-8" ?>
<!-- src/Foundation/modules/_protected/BasicComponent/module.config -->
<module loadFromBin="false" tags="EPiServerModulePackage">
            <add name="addon" path="ClientResources" />
            <add dependency="Shell"/>
            <add dependency="Cms" type="RunAfter"/>
// src/Foundation/modules/_protected/BasicComponent/ClientResources/MainWidget.js
    function (
    ) {

        return declare([_Widget, _TemplatedMixin], {

            templateString: "<div>Lorem ipsum dolor sit amet.</div>"
public sealed class BasicComponent : ComponentDefinitionBase
    public BasicComponent()
        : base("addon/MainWidget")
        Categories = new[] { "content" };
        Title = "Basic Component";
        Description = "";
"CmsUI": {
  "ProtectedModule": {
    "Items": [
        "Name": "BasicComponent"

Having it defined as a protected module works correctly, and it's loaded from following URL:


However if I move the module to the public space (e.g. directly in /modules/ , not in /modules/_protected) and remove the declaration in appsettings.json, the AutoDiscovery should register the module in the same way, but CMS tires to load it from non-existing URL:


Only if I change public modules auto discovery level to minimal and explicitly add module,

"CmsUI": {
  "PublicModule": {
    "AutoDiscovery": "Minimal",
    "Items": [
        "Name": "BasicComponent"

then it's loaded correctly from URL:


Following documentation at module should be correctly registered, without need for additional confiuguration.
Is the something I am missing or is this a bug?

Edited, Apr 13, 2022 14:10

Seems like a bug I created CMS-23354

Apr 25, 2022 17:16
* 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.