codefog/contao-news_categories

RSS Feed image media:content

Closed this issue · 2 comments

rorych commented

A few years back contao changed the logic for adding images to the rss-feed:
contao/news-bundle@050e8c3

The "media:content" has been used since, instead of "enclosure".
In your override of the method generateFiles you still use the old call:
https://github.com/codefog/contao-news_categories/blob/master/src/FeedGenerator.php#L191

We noticed that on save_callback of news your method is used, but if you generate XML files via maintenance in the contao backend, the original method is used.
Leading to different xml structures each time someone saves a news or the xml is generated via daily cron.

Could you also use the new call with "media:content" parameter please?

$objItem->addEnclosure($objFile->path, $strLink, 'media:content', $arrFeed['imgSize']);

Is this still an issue with version 4 under Contao 5?

Fixed in d035496

Is this still an issue with version 4 under Contao 5?

it is not, because Contao 5 uses the new feed page where we can extend the core instead of replace everything.