Problem with some properties generating feed RSS.
#1 by magnolia-ti8m on Mar 10, 2017 3:15:59 PM

Hi all,

We have a blog that make use of Magnolia's blog module and we would like to generate feed rss from blog entries.
What we are doing right now is a call to the templateContent generator by an url so made:
[contextPath]/rss/?generatorName=templateContent&templateType=content&templateSubtype=article&siteRoot=/
If I understood well, in this way we are using the PageSyndicator (of rssaggregator module) class to load entries and to map them into rss item.
Debugging the code dedicated to the mapping, I found a couple of problems:
1) In my blog entries nodes I don't have the pubDate property set, so the generator doesn't map any date for the rss item.
I thought was strange that the blog module didn't provide a pubDate by default so, I tried to execute the call on a clean installation with only the demo-project loaded and the result was the same: no pubDates were extracted from sample articles.
So, my question is: do I have to implement/revert something to make this property available or should I use another property like "mgnl:lastModified" ?
2) categories of rss items is now always a one-item list with just a void item. I think this is because of a kind of bug.
Debugging the PageSyndicator code, i found that the mapper used inside is built in this way:
private final ContentMapper<SyndEntry> MAPPER = new FeedEntryMapper(this);
but when the mapper executes "pageSyndicator.getTemplateSubtype()" this value is null while in the PageSyndicator instance, created by the request, the call:
"List<Node> nodes = templatingFunctions.contentListByTemplateType(siteRoot, templateType, templateSubtype);"
works well with the correct templateSubtype.
I saw in the workflow there are usages of clone method, maybe the clone method is executed before the setting of the templateType property from the parameters of the request.

Can someone check these 2 points?

Thanks in advan