Hi guys,
if you want to fix the rss bugs you need to download latest version of dnnAccouncement source code and replace the function GetSearchItems in AnnouncementController with this one (it will fix both bug: rss not updating and the persistence of latest announcement in rss if you delete all announcement in the module):
Public Function GetSearchItems(ByVal ModInfo As Entities.Modules.ModuleInfo) As DotNetNuke.Services.Search.SearchItemInfoCollection Implements Entities.Modules.ISearchable.GetSearchItems
Dim moduleSettings As Hashtable = DotNetNuke.Entities.Portals.PortalSettings.GetModuleSettings(ModInfo.ModuleID)
Dim descriptionLength As Integer = 100
If CType(moduleSettings("descriptionLength"), String) <> "" Then
descriptionLength = Integer.Parse(CType(moduleSettings("descriptionLength"), String))
If descriptionLength < 1 Then
descriptionLength = 1950 'max length of description is 2000 char, take a bit less to make sure it fits...
End If
End If
Dim SearchItemCollection As New SearchItemInfoCollection
Dim Announcements As ArrayList = GetCurrentAnnouncements(ModInfo.ModuleID, Null.NullDate)
Dim objAnnouncement As Object
For Each objAnnouncement In Announcements
Dim SearchItem As SearchItemInfo
With CType(objAnnouncement, AnnouncementInfo)
Dim strContent As String = System.Web.HttpUtility.HtmlDecode(.Title & " " & .Description)
Dim strDescription As String = HtmlUtils.Shorten(HtmlUtils.Clean(System.Web.HttpUtility.HtmlDecode(.Description), False), descriptionLength, "...")
SearchItem = New SearchItemInfo(ModInfo.ModuleTitle & " - " & .Title, strDescription, .CreatedByUser, .PublishDate, ModInfo.ModuleID, .ItemId.ToString + "-" + .CreatedDate.ToString, strContent, "ItemId=" & .ItemId.ToString)
SearchItemCollection.Add(SearchItem)
End With
Next
If Announcements.Count = 0 Then
Dim SearchItem As SearchItemInfo
SearchItem = New SearchItemInfo
SearchItem.ModuleId = ModInfo.ModuleID
SearchItem.GUID = String.Empty
SearchItem.SearchKey = String.Empty
SearchItemCollection.Add(SearchItem)
End If
Return SearchItemCollection
End Function
Red lines: modified lines
green lines: added lines
I wrote in codeplex support page, I hope the bug will fix in official release.
bye