Copy link to clipboard
Copied
Howdy!
Just wanted to share in case this could be of use to anyone else.
After installing Update 18 onto a ColdFusion 11 server, calling cffeed causes an error. This did not happen before update 18. Sandbox Security is enabled. No errors during install of update 18, at least according to the install log.
I use the tag in this manner
<cffeed action="create" name="theFeedName" overwrite="yes" escapeChars="true" outputFile="theRssFile.xml">
The error message contains "Access is denied" and "Unable to create"
We do not use cffeed that often, so it took me a while to realize it was not working. The only workaround I have found so far is to not use cffeed.
Copy link to clipboard
Copied
Hi,
I will give it a try and let you know. Meanwhile, can you please log a bug in the tracker for the same.
Thanks,
Priyank
Copy link to clipboard
Copied
Howdy!
I am sorry but it is a wee bit difficult for me to post a bug report in tracker.adobe.com because it seems the ID I use in this forum (and for other Adobe stuff) is not acceptable for logging in to the bug tracker section. And being a bear of little brain I do not have the ability to handle two Adobe login profiles.
However, if anyone reading this, and also having the cffeed issue, would like to post to the bug tracker please do.
Copy link to clipboard
Copied
No problem, let me verify this and log a bug and make the bug public.
Thanks,
Priyank
Copy link to clipboard
Copied
Hi,
I tried to run the simple test with Sandbox enabled on ColdFusion 11 update 18 and it is working fine at my end.
<cfquery name="getOrders" datasource="cfartgallery">
SELECT * FROM orders
</cfquery>
<!--- Map the orders column names to the feed query column names. --->
<cfset columnMapStruct = StructNew()>
<cfset columnMapStruct.publisheddate = "ORDERDATE">
<cfset columnMapStruct.content = "ADDRESS">
<cfset columnMapStruct.title = "CUSTOMERFIRSTNAME">
<cfset columnMapStruct.rsslink = "ORDERID">
<!--- Set the feed metadata. --->
<cfset meta.title = "Art Orders">
<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="#getOrders#"
properties="#meta#"
columnMap="#columnMapStruct#"
xmlvar="rssXML">
<cfdump var="#XMLParse(rssXML)#">
Thanks,
Priyank Shrivastava
Copy link to clipboard
Copied
Howdy!
I also have no issues with the example you provided.
Here is an example that will not work for me in CF11 u18 in a sanboxed environment. Prior to u18 this example would work.
<cfscript>
myFeed = StructNew();
myFeed.link = "my rss link";
myFeed.title = "My RSS Title";
myFeed.description = "My RSS Description";
myFeed.pubDate = Now();
myFeed.version = "rss_2.0";
myFeed.item = ArrayNew(1);
itemStruct = StructNew();
itemStruct.description = StructNew();
itemStruct.title = "My Item Title";
itemStruct.link = "my item link";
itemStruct.pubDate = Now();
itemStruct.guid = StructNew();
itemStruct.guid.isPermaLink="false";
itemStruct.guid.value = CreateUUID();
savecontent variable="cfcStruct.myDescription" {
writeOutput("<p>Some text here.</p>");
writeOutput("<p>Some more text here.</p>");
}
itemStruct.description.value = cfcStruct.myDescription;
ArrayAppend(myFeed.item, StructCopy(itemStruct));
</cfscript>
<cfdump var="#myFeed#">
<cffeed action="create" name="#myFeed#" overwrite="yes" escapeChars="true" outputFile="[someplace I have write/edit/delete access]\rssTest.xml">
Here is what rssTest.xml file looks like when run on CF2018, no sandbox
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
<channel>
<title>My RSS Title</title>
<link>my rss link</link>
<description>My RSS Description</description>
<pubDate>Thu, 21 Mar 2019 18:20:24 GMT</pubDate>
<item>
<title>My Item Title</title>
<link>my item link</link>
<description><p>Some text here.</p><p>Some more text here.</p></description>
<pubDate>Thu, 21 Mar 2019 18:20:24 GMT</pubDate>
<guid isPermaLink="false">4ED3BEAA-AE73-9801-B589D8596529D67B</guid>
</item>
</channel>
</rss>
Copy link to clipboard
Copied
Thanks for the example. I tried this with your code and at first, I received the error however after I restarted the ColdFusion 11 service, it started to work again.
Can you please try to restart the ColdFusion service.
Thanks,Priyank
Copy link to clipboard
Copied
Howdy!
Thank you for your suggestion Priyank. I tried it, and while it did not solve the problem, it got me frustrated enough that I began whacking at the issue some more and I found my solution. Turns out it was a Windows folder permissions issue.
Basically my latest problem solving attempts led me to the conclusion that it was all going kaboom when the created file was supposed to be written/saved on the hard drive. Something which was working fine before. So, I went to the folder where the feed was supposed to be saved, removed the ColdFusion related Windows permissions, and put them back again. Then I tried the cffeed page again, and ... no error message.
I have no idea why turning the folder's Windows permissions "off and then back on again" made a difference. But it worked, and I am happy.
Again, thank you for your time and your help! I was so busy grumbling to myself about the most recent ColdFusion update that I forgot other settings can cause issues also.