Skip to main content
added 106 characters in body
Source Link
Pete Navarra
  • 14.7k
  • 3
  • 45
  • 89

As stated in the SO answer, the real issue is that without enabling the Sitecore.Speak.MVC.config, there's no route pattern matching just {controller}/{action}.

The answer that will solve your problem is that you need to enable a config on the Content Delivery Servers that enable this route.

There are a couple ways you can do this:

Option 1: Enable Sitecore.Speak.MVC.config

Let's take look at what this config is doing:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>

This config is doing three things:

  • Initializing the Command Route (which is really the piece you need)
  • Adding a <renderPlaceholder> processor that renders added content.
  • Adds the Sitecore.Speak.Web assembly to the list of precompiled assemblies.

So, in a nutshell, there isn't much here that will harm a CD if this config is enabled, but the last two points aren't needed by the Content Delivery server.

Option 2: Enable Command Route Manually

You can create a patch config that is CD only that patches in the **InitializeCommandRouteInitializeCommandRoute processor above to the process above to the<initialize>` pipeline. If this patch config exists on the CM, where this processor is already defined, it won't conflict.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
    </pipelines>
  </sitecore>
</configuration>

As stated in the SO answer, the real issue is that without enabling the Sitecore.Speak.MVC.config, there's no route pattern matching just {controller}/{action}.

The answer that will solve your problem is that you need to enable a config on the Content Delivery Servers that enable this route.

There are a couple ways you can do this:

Option 1: Enable Sitecore.Speak.MVC.config

Let's take look at what this config is doing:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>

This config is doing three things:

  • Initializing the Command Route (which is really the piece you need)
  • Adding a <renderPlaceholder> processor that renders added content.
  • Adds the Sitecore.Speak.Web assembly to the list of precompiled assemblies.

So, in a nutshell, there isn't much here that will harm a CD if this config is enabled, but the last two points aren't needed by the Content Delivery server.

Option 2: Enable Command Route Manually

You can create a patch config that is CD only that patches in the **InitializeCommandRouteprocess above to the` pipeline.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
  </sitecore>
</configuration>

As stated in the SO answer, the real issue is that without enabling the Sitecore.Speak.MVC.config, there's no route pattern matching just {controller}/{action}.

The answer that will solve your problem is that you need to enable a config on the Content Delivery Servers that enable this route.

There are a couple ways you can do this:

Option 1: Enable Sitecore.Speak.MVC.config

Let's take look at what this config is doing:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>

This config is doing three things:

  • Initializing the Command Route (which is really the piece you need)
  • Adding a <renderPlaceholder> processor that renders added content.
  • Adds the Sitecore.Speak.Web assembly to the list of precompiled assemblies.

So, in a nutshell, there isn't much here that will harm a CD if this config is enabled, but the last two points aren't needed by the Content Delivery server.

Option 2: Enable Command Route Manually

You can create a patch config that patches in the InitializeCommandRoute processor above to the <initialize> pipeline. If this patch config exists on the CM, where this processor is already defined, it won't conflict.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
    </pipelines>
  </sitecore>
</configuration>
added 8 characters in body
Source Link
Pete Navarra
  • 14.7k
  • 3
  • 45
  • 89
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
  </sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
  </sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
  </sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
  </sitecore>
</configuration>
Source Link
Pete Navarra
  • 14.7k
  • 3
  • 45
  • 89

As stated in the SO answer, the real issue is that without enabling the Sitecore.Speak.MVC.config, there's no route pattern matching just {controller}/{action}.

The answer that will solve your problem is that you need to enable a config on the Content Delivery Servers that enable this route.

There are a couple ways you can do this:

Option 1: Enable Sitecore.Speak.MVC.config

Let's take look at what this config is doing:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
      <mvc.renderPlaceholder>
        <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.RenderAddedContent, Sitecore.Speak.Client"/>
      </mvc.renderPlaceholder>
    </pipelines>
    <mvc>
      <precompilation>
        <assemblies>
          <assemblyIdentity name="Sitecore.Speak.Web" />
        </assemblies>
      </precompilation>
    </mvc>
  </sitecore>
</configuration>

This config is doing three things:

  • Initializing the Command Route (which is really the piece you need)
  • Adding a <renderPlaceholder> processor that renders added content.
  • Adds the Sitecore.Speak.Web assembly to the list of precompiled assemblies.

So, in a nutshell, there isn't much here that will harm a CD if this config is enabled, but the last two points aren't needed by the Content Delivery server.

Option 2: Enable Command Route Manually

You can create a patch config that is CD only that patches in the **InitializeCommandRouteprocess above to the` pipeline.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Mvc.Pipelines.Initialize.InitializeCommandRoute, Sitecore.Speak.Client" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"/>
      </initialize>
  </sitecore>
</configuration>