Jump to:

22993 Posts in 11595 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » Tutorial 2: RSS feed error

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1144 Views
  • Happysadhu
    Avatar
    Community Member
    33 Posts

    Tutorial 2: RSS feed error Link to this post

    Hello,
    I am trying to create a RSS feed following the instructions in the second tutorial. When I try to access it via: http://localhost/mysite/news/rss (my site being "holybasil"), I get the error:

    "[Warning] Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/holybasil/mysite/code/HomePage.php:25)
    GET /holybasil/news/rss

    Line 188 in /Applications/XAMPP/xamppfiles/htdocs/holybasil/sapphire/api/RSSFeed.php

    This is what my ArticleHolder.php looks like:

    <?php
    /**
    * Defines the ArticleHolder page type
    */
    class ArticleHolder extends Page {
    static $db = array(
    );
    static $has_one = array(
    );
    static $icon = "themes/canvas/images/treeicons/news";
    static $allowed_children = array('ArticlePage');
    }

    class ArticleHolder_Controller extends Page_Controller {

    function rss() {
    $rss = new RSSFeed($this->Children(), $this->Link(), "The coolest news around");
    $rss->outputToBrowser();
    }

    }

    ?>

    Any help would be appreciated,
    Sam

    PS: I've tried Firefox 3 and Safari and I get the same error.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Tutorial 2: RSS feed error Link to this post

    ...... (output started at .../mysite/code/HomePage.php:25)

    Output started at HomePage sounds like you have an echo or some whitespace or something else which is outputting content on line 25. Make sure you have removed all your whitespace after the ?> in that file

  • Happysadhu
    Avatar
    Community Member
    33 Posts

    Re: Tutorial 2: RSS feed error Link to this post

    Thanks for the quick response. Following your suggestion, I got the RSS feed to work.

    Much appreciated,
    Sam

    1144 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.