Skip to content

Commit

Permalink
Merge pull request #29 from DNNCommunity/fix_25
Browse files Browse the repository at this point in the history
Fix for issue #25
  • Loading branch information
juvander authored Feb 28, 2020
2 parents 35f405a + 97819e5 commit dd30388
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions branches/DNN_5/Components/Controllers/ThreadController.vb
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,20 @@ Namespace DotNetNuke.Modules.Forum
sitem.TabId = moduleInfo.TabID
Dim cntThread As New ThreadController()
Dim objThread As ThreadInfo = cntThread.GetThread(thread.ThreadID)

'This is to make sure all items have ContentItem created (upgrade issue)
If objThread.ContentItemId < 1 Then
Dim cntContent As New Content
objThread.ModuleID = moduleInfo.ModuleID
objThread.TabID = moduleInfo.TabID
objThread.SitemapInclude = objThread.ContainingForum.EnableSitemap

cntContent.CreateContentItem(objThread, moduleInfo.TabID)

DotNetNuke.Modules.Forum.Components.Utilities.Caching.UpdateThreadCache(objThread.ThreadID)
objThread = cntThread.GetThread(thread.ThreadID)
End If

Dim ters As List(Of String) = GetTags(moduleInfo.Terms)

For Each Term As Entities.Content.Taxonomy.Term In objThread.Terms
Expand All @@ -385,6 +399,8 @@ Namespace DotNetNuke.Modules.Forum
Catch ex As System.InvalidCastException
'There are cases when isearch does not return correctly so just catch & log
log.Error("Search Portal: " + moduleInfo.PortalID.ToString, ex)
Catch ex2 As SystemException
log.Error("Search Portal: " + moduleInfo.PortalID.ToString, ex2)
End Try
Return retval
End Function
Expand Down
2 changes: 1 addition & 1 deletion branches/DNN_5/Components/Controllers/UserController.vb
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ Namespace DotNetNuke.Modules.Forum
Dim timeOut As Int32 = ForumUserInfoCacheTimeout * Convert.ToInt32(Entities.Host.Host.PerformanceSetting)

Dim cntForumUser As New ForumUserController
Dim fUser As New ForumUserInfo(ModuleID)
Dim fUser As ForumUserInfo
fUser = cntForumUser.UserGet(PortalID, UserID, ModuleID)

'' we could not find this forum user
Expand Down

0 comments on commit dd30388

Please sign in to comment.