Skip to main content
Inspiring
November 11, 2009
Question

My RSS does not update.

  • November 11, 2009
  • 2 replies
  • 534 views

I created (I thought) a feed that reads my database and creates an XML document. I then linked the XML document to my browser, which displays the contents fine and appears to work just like any other RSS feed. Except, when the database changes, and the XML document is updated, my browser RSS dropdown does not update. This happens in both IE and Firefox. Any ideas?

<cfquery name="getAdvancedCf" datasource="mySource">
SELECT *
FROM announcements_rss
WHERE ID=91
</cfquery>


<!--- Map the orders column names to the feed query column names. --->
<cfset columnMapStruct = StructNew()>
<cfset columnMapStruct.publisheddate = "ANNOUNCE_DATE">
<cfset columnMapStruct.content = "DETAILS">
<cfset columnMapStruct.title = "SUBJECT">
<cfset columnMapStruct.rsslink = "URL">

<!--- Set the feed metadata. --->
<cfset meta.title = "My Title">
<cfset meta.link = "http://feedlink">
<cfset meta.description = "Orders at the art gallery">
<cfset meta.version = "rss_2.0">

<!--- Create the feed. --->
<cffeed action="create"
    query="#getAdvancedCf#"
    properties="#meta#"
    columnMap="#columnMapStruct#"
    xmlvar="rssXML"
    outputFile = "feed.xml"

    overwrite = "yes"
>

<cfdump var="#XMLParse(rssXML)#">

    This topic has been closed for replies.

    2 replies

    brasethAuthor
    Inspiring
    November 11, 2009

    If the XML file is updated on the server, shouldn't my RSS link in my browser refresh as well? I would think when I click on the RSS link in my browser's toolbar, it would retrieve the XML file and rebuilt it.

    BKBK
    Community Expert
    Community Expert
    November 11, 2009

    Two things still puzzle me. What do you mean by "when the database changes" and "browser RSS dropdown"?

    brasethAuthor
    Inspiring
    November 11, 2009

    The values in the database populate the feed. When a new news item is entered into the database, and it refreshes the XML document, my "browswer drop down" does not update. What I mean by browser dropdown is in Firefox and IE, I have my RSS feeds bookmarked as icons on my toolbar. So I hover over them, and the drop down shows the news items.

    BKBK
    Community Expert
    Community Expert
    November 11, 2009

    Perhaps <meta http-equiv="refresh"> to refresh the page or AJAX code to refresh the page when the feed refreshes.