2sic / app-faq

Simple faq app with categories, filters, various views
MIT License
1 stars 1 forks source link

DNN Indexing Error in the Event Viewer #1

Open jeremy-farrance opened 4 years ago

jeremy-farrance commented 4 years ago

I have the FAQ app installed and in use on a DNN site running v9.03.02 and 2sxc v10.9.1. The in use version of the FAQ app is 1.00.03...

I have a page with this View _All questions (sorted) of a selected category.cshtml

No modifications, as is.

But there are hundreds of indexing error in the Admin Logs like this one:

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:26c0d5b8-a1b0-44d6-bc92-b01613b3c193
UserId:-1
TabId:-1
ExceptionHash:qd7VSq5O/sa/B6NiEaAmPsG2S1g=
Message:Search: Error while indexing module 3236 on tab 565, portal 0
StackTrace:
InnerMessage:An item with the same key has already been added.
InnerStackTrace:

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at 
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at 
ASP._Page_Portals_0_2sxc_FAQ_with_Categories__All_questions_ofa_category_cshtml.
CustomizeData() in c:\HostingSpaces\PDEG\elkgroveparks.org\www\Portals\0\2sxc\
FAQ with Categories\_All-questions-ofa-category.cshtml:line 13 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 87

Line 13 is Data.In.Add("QandA", sorted["Default"]);

Any idea how to fix this? What could be causing the key duplication? How can I debug the issue?

iJungleboy commented 4 years ago

The razor probably has a bit of code which is accessed by search to build the index. Something seems to be broken there.

Our own version of the FAQ app is very different, so it would take me long to pinpoint the issue. A quick fix would be to comment out the code in _All-questions-ofa-category.cshtml lines 13+