Cffeed create from query


#1

cffeed create from query with columnMap settings does not work as documented http://docs.lucee.org/reference/tags/feed.html

I’ve tested on https://www.trycf.com/ and can confirm that the feed generated in Lucee 4.5 / Lucee 5 are different than ACF 2016 / ColdFusion 10 / 11.

There are 2 issues found:

  1. The <channel> <item> node are generated but the <title> / <description> nodes are empty, despite columnMap being set
  2. Channel item is missing the<link> node in the generated RSS

Can someone investigate and fix please?

This is the test case used,

getArt= QueryNew( "ARTID,ARTNAME,DESCRIPTION,ISSOLD,MEDIATYPE" );
    QueryAddRow( getArt, 3 );
QuerySetCell( getArt, "ARTID", "1", 1 );
QuerySetCell( getArt, "DESCRIPTION", "Test desc 1", 1 );
QuerySetCell( getArt, "ARTNAME", "Picaso 1", 1 );

QuerySetCell( getArt, "ARTID", "2", 2 );
QuerySetCell( getArt, "DESCRIPTION", "Test desc 2", 2 );
QuerySetCell( getArt, "ARTNAME", "Picaso 2", 2 );

QuerySetCell( getArt, "ARTID", "3", 3 );
QuerySetCell( getArt, "DESCRIPTION", "Test desc 3", 3 );
QuerySetCell( getArt, "ARTNAME", "Picaso 3", 3 );

feedMeta = structNew();
feedMeta.description = "ColdFusion Art Gallery XML Feed";
feedMeta.link = "http://coldfusionexamples.com/";
feedMeta.title = "Art";
feedMeta.version = "rss_2.0";

colMap = structNew();
colMap.content = "DESCRIPTION";
colMap.rsslink = "ARTID";
colMap.title = "ARTNAME";
<cffeed action="create"
        query="#getArt#"
        columnMap="#colMap#"
        properties="#feedMeta#"
        xmlVar="feedXML" />
 
<cfdump var="#feedXML#" />

Thank you.


#2

can you file a bug in jira? https://luceeserver.atlassian.net/


#3

Filed at https://luceeserver.atlassian.net/browse/LDEV-1770