Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsAnnouncementsAnnouncementsRSS not updatingRSS not updating
Previous
 
Next
New Post
2/19/2014 4:40 AM
 
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
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsAnnouncementsAnnouncementsRSS not updatingRSS not updating


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out