Fixed Please add missing "category" element to RSS feeds (patch included)

Steffen

Well-known member
Affected version
2.0.10
One of our users just pointed out that the "category" element is missing from our feeds since we migrated from vBulletin to XenForo. Seems to easy enough to add it back. :)

Diff:
--- a/src/XF/Pub/View/Forum/Rss.php
+++ b/src/XF/Pub/View/Forum/Rss.php
@@ -63,6 +63,10 @@ class Rss extends \XF\Mvc\View
             $title = (empty($thread->title) ? \XF::phrase('title:') . ' ' . $thread->title : $thread->title);
             $entry->setTitle($title)
                 ->setLink($router->buildLink('canonical:threads', $thread))
+                ->addCategory([
+                    'term' => $thread->Forum->Node->title,
+                    'scheme' => $router->buildLink('canonical:forums', $thread->Forum),
+                ])
                 ->setDateCreated($thread->post_date)
                 ->setDateModified($thread->last_post_date);

https://cyber.harvard.edu/rss/rss.html#ltcategorygtSubelementOfLtitemgt

https://framework.zend.com/manual/2.4/en/modules/zend.feed.writer.html
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.12).

Change log:
Include the forum a thread is in in the RSS feeds (only for global feeds)
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom