diff -u b/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc --- b/core/modules/aggregator/aggregator.pages.inc +++ b/core/modules/aggregator/aggregator.pages.inc @@ -53,7 +53,7 @@ * The category for which to list all of the aggregated items. * * @return string - * The rendered list of items for the feed. + * The render array with list of items for the feed. * * @see aggregator_menu() * @ingroup forms diff -u b/core/modules/aggregator/aggregator.routing.yml b/core/modules/aggregator/aggregator.routing.yml --- b/core/modules/aggregator/aggregator.routing.yml +++ b/core/modules/aggregator/aggregator.routing.yml @@ -72,5 +72,5 @@ pattern: '/aggregator/categories/{cid}' defaults: - _controller: '\Drupal\aggregator\Controller\AggregatorController::category' + _content: '\Drupal\aggregator\Controller\AggregatorController::category' requirements: _permission: 'access news feeds' diff -u b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php --- b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php @@ -329,22 +329,17 @@ * @param int $cid * The category id for which to list all of the aggregated items. * - * @return string - * The rendered list of items for the feed. + * @return array + * The render array with list of items for the feed. */ public function category($cid) { $category = $this->database->query('SELECT cid, title FROM {aggregator_category} WHERE cid = :cid', array(':cid' => $cid))->fetchObject(); drupal_set_title($category->title); - drupal_add_feed('aggregator/rss/' . $category->cid, $this->configFactory->get('system.site')->get('name') . ' ' . t('aggregator - @title', array('@title' => $category->title))); // @todo move included functions to controller. module_load_include('inc', 'aggregator', 'aggregator.pages'); - // It is safe to include the cid in the query because it's loaded from the - // database by aggregator_category_load(). - $items = aggregator_load_feed_items('category', $category); - - return _aggregator_page_list($items, $cid); + return aggregator_page_category($category); } }