On a recent DNN/2sxc installation, the DNN index functions fail with a GeneralException: "The given key was not present in the dictionary."
The stack error is:
Message:Search: Error while indexing module 458 on tab 50, portal 1
StackTrace:
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 89 at DotNetNuke.Services.Search.ModuleIndexer.IndexSearchDocuments(Int32 portalId, ScheduleHistoryItem schedule, DateTime startDateLocal, Action`1 indexer)
InnerMessage:The given key was not present in the dictionary.
InnerStackTrace:
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
Recycling the application pool revives the application but the problem will occur again and again.
I found these solutions:
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
but nothing works. The problem only occurs with 2sxc modules (basic contents) and not with other modules (HTML for exemple).
Any idea to solve that?
Environment: DNN 9.1.1 2SXC 9.23