title: DNN indexer fails with 2sxc content modules
body: <p>On a recent DNN/2sxc installation, the DNN index functions fail with a GeneralException: "The given key was not present in the dictionary."</p>
  
  <p>The stack error is:</p>
  
  <blockquote>
    <p>Message:Search: Error while indexing module 458 on tab 50, portal 1</p>
    
    <p>StackTrace:</p>
    
    <p>at</p>
    
    <blockquote>
      <p>ToSic.SexyContent.Environment.Dnn7.DnnBusinessController.GetModifiedSearchDocuments(ModuleInfo
      moduleInfo, DateTime beginDate) in
      C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\2sxc
      Dnn\Environment\Dnn7\DnnBusinessController.cs:line 89 at
      DotNetNuke.Services.Search.ModuleIndexer.IndexSearchDocuments(Int32
      portalId, ScheduleHistoryItem schedule, DateTime startDateLocal,
      Action`1 indexer) </p>
    </blockquote>
    
    <p>InnerMessage:The given key was not present in the
    dictionary.</p>
    
    <p>InnerStackTrace:</p>
    
    <blockquote>
      <p>at System.ThrowHelper.ThrowKeyNotFoundException() at
      System.Collections.Generic.Dictionary'2.get_Item(TKey key) at
      ToSic.SexyContent.ContentGroup.get_Template() in
      C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\ToSic.Sxc\SexyContent\ContentGroup.cs:line
      70 at
      ToSic.SexyContent.ContentBlocks.ModuleContentBlock..ctor(IInstanceInfo
      instanceInfo, Log parentLog, ITenant tenant, IEnumerable`1
      overrideParams) in
      C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\ToSic.Sxc\SexyContent\ContentBlocks\ModuleContentBlock.cs:line
      82 at
      ToSic.SexyContent.Environment.Dnn7.Search.SearchController.GetModifiedSearchDocuments(IInstanceInfo
      instance, DateTime beginDate) in
      C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\2sxc
      Dnn\Search\SearchController.cs:line 55 at
      ToSic.SexyContent.Environment.Dnn7.DnnBusinessController.GetModifiedSearchDocuments(ModuleInfo
      moduleInfo, DateTime beginDate) in
      C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\2sxc
      Dnn\Environment\Dnn7\DnnBusinessController.cs:line 85
      Source:ToSic.Sxc.Dnn</p>
    </blockquote>
  </blockquote>
  
  <p>Recycling the application pool revives the application but the problem will occur again and again.</p>
  
  <p>I found these solutions:</p>
  
  <pre><code>Delete the DNN index files and reindex    
  Remove and give back rights to the application pool to the index files    
  Convert the site in English then set it back in French
  </code></pre>
  
  <p>but nothing works. The problem only occurs with 2sxc modules (basic contents) and not with other modules (HTML for exemple).</p>
  
  <p>Any idea to solve that?</p>
  
  <p>Environment: DNN 9.1.1 2SXC 9.23</p>