DNNCommunity/DNN.Forum

Upgrading Site to DNN 9.2.2 and Forum to 5.1.0 - Missing ContentItems. Forum does not display properly.

Closed this issue · 5 comments

This is a continuation of #25, but stands on its own.

At the conclusion of #25 I thought I was ready to upgrade the live site. It turns out I am not. I am unable to get the site to generate the ContentItems that the Forum module needs to operate. In working through Issue #25 I did get the site to generate ContentItems but I am now unable to reproduce that.

What I've done

The site starts with DNN 7.4.1 and Forum 4.5.3. At this point there is one ContentItem in the DB that relates to the entire Forum. Individual Forum posts have no ContentItems.

I unzipped DNN 9.3,2 over the site, added Forum 5.1.0. The upgrade ran clean.

I ensured that lucene had write access to the site folder. Emptied the App_Data/Search directory. I re-indexed the site. The Scheduler reported that the Search crawler completed successfully. New files appeared in App_Data/Search. At this point I expected the site reindex to have created ContentItems for each Forum post. That did not happen. There is still only one ContentItem and it relates to the entire Forum.

The site log file reports some exceptions that are clearly related to Search. I see nothing that obviously ties them to the Forum module. A sample few are pasted at [1].

I would like to show that the indexing process is processing the Forum data, but I don't know how to. I have the source code for the Forum downloaded and built. It's not clear to me what (if any) code in the Forum module is called to support indexing.

Can anyone clue me to the entry point called for forum indexing? I can then put a breakpoint there, or add some further logging. At the moment I am in the dark as to if the forum data is actually getting indexed or not.

Thank you for reading this far.

[1] Sample Log file Exceptions

2020-03-04 19:07:36,465 [ACER-03][Thread:75][ERROR] DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl - Search Document error: Portal ID: 4, Tab ID: 0, Module ID: 0, Mod. Def.ID: 0, Url: , Unique Key: 237_allusers, Last Modified: 0001-01-01T00:00:00.0000000Z, Culture: , Search Type: 3
System.ArgumentException: searchDocument
Parameter name: The property 'ModifiedTimeUtc' in object 'searchDocument' is invalid.
at DotNetNuke.Common.Requires.PropertyNotEqualTo[TValue](String argName, String argProperty, TValue propertyValue, TValue testValue)
at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocumentInternal(SearchDocument searchDocument, Boolean autoCommit)
at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocuments(IEnumerable1 searchDocuments) 2020-03-04 19:07:36,465 [ACER-03][Thread:75][ERROR] DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl - Search Document error: Portal ID: 4, Tab ID: 0, Module ID: 0, Mod. Def.ID: 0, Url: , Unique Key: 237_adminonly, Last Modified: 0001-01-01T00:00:00.0000000Z, Culture: , Search Type: 3 System.ArgumentException: searchDocument Parameter name: The property 'ModifiedTimeUtc' in object 'searchDocument' is invalid. at DotNetNuke.Common.Requires.PropertyNotEqualTo[TValue](String argName, String argProperty, TValue propertyValue, TValue testValue) at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocumentInternal(SearchDocument searchDocument, Boolean autoCommit) at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocuments(IEnumerable1 searchDocuments)
2020-03-04 19:07:36,466 [ACER-03][Thread:75][ERROR] DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl - Search Document error: Portal ID: 4, Tab ID: 0, Module ID: 0, Mod. Def.ID: 0, Url: , Unique Key: 239_allusers, Last Modified: 0001-01-01T00:00:00.0000000Z, Culture: , Search Type: 3
System.ArgumentException: searchDocument
Parameter name: The property 'ModifiedTimeUtc' in object 'searchDocument' is invalid.
at DotNetNuke.Common.Requires.PropertyNotEqualTo[TValue](String argName, String argProperty, TValue propertyValue, TValue testValue)
at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocumentInternal(SearchDocument searchDocument, Boolean autoCommit)
at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocuments(IEnumerable1 searchDocuments) 2020-03-04 19:07:36,466 [ACER-03][Thread:75][ERROR] DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl - Search Document error: Portal ID: 4, Tab ID: 0, Module ID: 0, Mod. Def.ID: 0, Url: , Unique Key: 239_adminonly, Last Modified: 0001-01-01T00:00:00.0000000Z, Culture: , Search Type: 3 System.ArgumentException: searchDocument Parameter name: The property 'ModifiedTimeUtc' in object 'searchDocument' is invalid. at DotNetNuke.Common.Requires.PropertyNotEqualTo[TValue](String argName, String argProperty, TValue propertyValue, TValue testValue) at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocumentInternal(SearchDocument searchDocument, Boolean autoCommit) at DotNetNuke.Services.Search.Internals.InternalSearchControllerImpl.AddSearchDocuments(IEnumerable1 searchDocuments)

Did you see these entries in the log: #25 (comment)

If not, then you need to sort out why the indexing fails elsewhere. My guess is that you have some user without ModifiedTimeUtc in their properties.

Ilpo - can you confirm if I need the commits mentioned in #25?

Experiments suggest that I can't get the ContentItems to generate unless I use the version you sent me.

I may have misunderstood. I thought the code to generate ContentItems had been in the indexing code for a few versions.

Aha! I just looked in the commits. I definitely misunderstood.

a) I thought you were sending me versions where the only change was more logging code in them

b) I didn't even realize that there were commits associated with the versions you sent me, until I lucked on to the commits.

My bad!

So working now?

Yes.

Just to clarify for anyone reading this issue. It is fixed by the commits Ilpo added for Issue #25.

If you face the same problem you need a version of the Forum that includes those commits.