Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Blog Module /

Discuss the Blog Module.

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

RSS Feed : nothing displayed when BlogEntry has more than 1 HTML tag

Go to End

5 Posts   1685 Views


Community Member, 11 Posts

12 June 2012 at 12:27am

Hi !

I've searched during some days, but I didn't find the solution to my problem : when a BlogEntry (= a blog post) has more than 1 HTML tag, or if it has 1 HTML tag but it is different from <p>, the content of this BlogEntry isn't displayed into the RSS Feed (mysite/blog/rss).

I've never seen this problem among the subjects that I looked , and I have yet to figure out where this problem.

Here is my code :

BlogHolder.php, class BlogHolder_Controller extends BlogTree_Controller

	function init() {
		RSSFeed::linkToFeed($this->Link() . "rss", _t('BlogHolder.RSSFEED',"RSS feed of these blogs"));

	function rss() {
		// Check if any blog article page exists
		$children = DataObject::get_one("BlogHolder");
		// If there is blog article pages get 10 latest, with status published sorted in reverse order
		if($children) {
			// Get children pages
			$children = DataObject::get("BlogEntry", "Status = 'Published'", "Sort DESC", "", 10);
			// Create RSS feeds
			$rss = new RSSFeed($children, $this->Link(), "RSS", "", "Title", "Content");
			// Add link in header using XML content type
			// Output RSS feeds to browser

If you know how to fix this problem, or any idea, I'm interested !


Community Member, 11 Posts

13 June 2012 at 8:21pm

No ideas ? :/


Community Member, 11 Posts

19 June 2012 at 3:08am

Up !

And another thing : if a blog post hasn't HTML tags (deleted from the database, via the sitetree_live table), this blog post is displayed into my RSS Feed.

I think it's a HTML parse problem...if not, why just <p> tag or "no tags" do not cause problems ? I'm working on it since the 12, but I have not yet found a solution.

If I don't find the solution, I'll use a "hack" : wrap all my blog posts with a <p></p>. But it's not HTML valid, and poses problems.

Or I have another idea : select all the RSS content (feedEntryContent), delete them, and replace with a good HTML. But I don't know how get the RSS content, and after inject into a good HTML.


Community Member, 11 Posts

20 June 2012 at 10:02pm

Good, I advance in my debugging !

I did a complete clean reinstallation of SilverStripe and Blog module, with my theme, and I still have the same problem.
Or the blog module is bugged, or my theme is the problem.

I continue to search.

My config is SS 2.4.7, and Blog 0.4.1


Community Member, 11 Posts

20 June 2012 at 11:59pm

Edited: 21/06/2012 12:00am

Ok, without my theme, I still have the same problem. So the problem is the module Blog.

I tried with other versions. With v0.6.0-rc1 I have a blank page. With v0.3.1 I have a stripped out of tag text.

==> the problem is the Blog module.

I will try to properly install the Blog module v0.6.0-rc1, and see if I still have this problem.