We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

what is going on with cold fusion

lisakilgore
lisakilgore asked
on
Medium Priority
273 Views
Last Modified: 2012-06-22
i just put the link into web pages of colf fusion, do not know how to code (yet).
can you figure out why this page is getting a cold fusion error ? and how I can fix it?
scroll down to see error.
http://www.sustainablecampus.cornell.edu/newsevents/newsevents.cfm
<!---These lines should be in the page that is going to call the reader
<cfset rss_url = 'http://www.cuinfo.cornell.edu/Calendar/feeds/feed__xmlSustain.rss'>
<cfinclude template="rss_reader.cfm">
--->

<!---Delete this line once the lines above have been included on the calling page--->
<cfset rss_url = 'http://www.cuinfo.cornell.edu/Calendar/feeds/feed__xmlSustain.rss'>

<cfhttp url="#rss_url#" method="get" resolveurl="no">

<cfset events = XMLParse(cfhttp.FileContent)>

<cfoutput>

	<!---Remove if using your own title.
	<h3><a href="#events.rss.channel.link.XMLText#">#events.rss.channel.title.XMLText#</a></h3>--->
	
	<!---Change this to customize the number of events to show in the read--->
	
	
	<cfset show = 9>
	
	<!---This outputs the feed if there are items in the feed--->
	
	<cfif #ArrayLen(events.rss.channel.item)# gt 0>		
		<cfloop index="i" from="1" to="#show#">			
			<p>#dateformat(events.rss.channel.item[i].startdate.XMLText, "mmm dd, yyyy")# 
			<cfif find("All Day", events.rss.channel.item[i].starttime.XMLText)>All Day<cfelse>at  #timeformat(events.rss.channel.item[i].starttime.XMLText, "h:mm tt")#</cfif> - 
			#events.rss.channel.item[i].title.XMLText#..
            <a href="#events.rss.channel.item[i].guid.XMLText#">more</a></p>
		</cfloop>
	<cfelse>
		<b>No events at this time</b>
	</cfif>
</cfoutput>
 <p><a href="http://cornell.edu/events/" title="link to events" target="_blank">More events(type in keyword "sustainability")</a></p>

<!---Uncomment this line to see all available fields
<cfdump var="#events#">--->

Open in new window

Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2015
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Top Expert 2011
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
thank you all....
sorry i didn't respond to anyone, someone at work helped me
Try changing :
<cfif #ArrayLen(events.rss.channel.item)# gt 0>

To this:
<cfif isdefined(“events.rss.channel.item”) >
CERTIFIED EXPERT

Commented:
Your code will throw an error if the number of items on the RSS is less than your "show" value.   Perhaps that will never happen, but just an FYI...
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
sorry i didn't respond to anyone

That would've made it easier for us to help you ;-)  If you feel you solved the problem yourself, you can select your comment as the answer, instead of just picking a random comment just to close the question.

Commented:
I see this error

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Could not find the included template rss_reader.cfm.

 
The error occurred in E:\Webs\www.sustainablecampus.cornell.edu\newsevents\newsevents.cfm: line 210
Top Expert 2011

Commented:
Top Expert 2011

Commented:
- ops sorry you mean error on the asker page :)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.