Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
aggregator_page_opml()
and aggregator_page_rss()
are having HTML appended to their output due to the way the theme and callback systems works.
Proposed resolution
With the development of WSSCI there should be a way to prevent callbacks/controllers from being wrapped up in the theme layer. Failing that, the original proposed solution is to print the results and use drupal exit. @see #1987390-66: aggregator.module - Convert theme_ functions to Twig
Remaining tasks
- Write a patch that will produce the correct results for both
aggregator_page_rss()
andaggregator_page_opml()
callbacks. - Write tests to confirm that the correct results are on the page and that there is no further HTML being rendered.
- Backport to 7.x
Related Issues
#1987390: aggregator.module - Convert theme_ functions to Twig
Original report by @drupalninja99
#1987390-31: aggregator.module - Convert theme_ functions to Twig
Comments
Comment #1
drupalninja99 CreditAttribution: drupalninja99 commentedI had originally looked at the XML RPC module for a comp and I see there that they just do this
Which doesn't seem like a best practice way of doing things. so initially I had added the same thing for aggregator, i.e. print theme('...'); drupal_exit(); to print only the RSS XML, not the HTML output from the Drupal theme. Is there not a clean way to do this in Drupal 8?
Comment #2
joelpittetClosing this as a duplicate based on #1963544: Convert aggregator/rss to views
Comment #2.0
joelpittetRemove updated bit