EllisLab text mark
Advanced Search
     
Forum Module RSS template
Posted: 07 May 2008 05:47 PM
Joined: 2007-11-01
34 posts

I am trying to get the RSS template for the Forum Module working, but all I get is this: http://www.myinrich.com/index.php/forum/rss/25/.

Here is the default code for the template set chosen.

{exp:rss:feed forum=”{forum_name}”}

{?xml version=“1.0” encoding=”{encoding}” ?}
<rss version=“2.0”
  xmlns:dc=“http://purl.org/dc/elements/1.1/”
  xmlns:sy=“http://purl.org/rss/1.0/modules/syndication/”
  xmlns:admin=“http://webns.net/mvcb/”
  xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”
  xmlns:content=“http://purl.org/rss/1.0/modules/content/”>
 
  <channel>
 
  <title>{exp:xml_encode}inRich.com Forums{/exp:xml_encode}</title>
  <link>{forum_url}</link>
  <description>{exp:xml_encode}{forum_name}{/exp:xml_encode}</description>
  <dc:language>{forum_language}</dc:language>
  <dc:rights>Copyright {gmt_date format=”%Y”}</dc:rights>
  <dc:date>{gmt_date format=”%Y-%m-%dT%H:%i:%s%Q”}</dc:date>
<admin:generatorAgent rdf:resource=“http://{current_domain}/” >
 
{rows}
  <item>
    <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
    <link>{exp:xml_encode}{path:view_thread}{/exp:xml_encode}</link>
    <guid>{path:view_thread}#When:{gmt_post_date format=”%H:%i:%sZ”}</guid>
    <description>{exp:xml_encode}{body}{/exp:xml_encode}</description>
    <dc:date>{gmt_post_date format=”%Y-%m-%dT%H:%i:%s%Q”}</dc:date>
  </item>
{/rows}
 
  </channel>
</rss>

{/exp:rss:feed}

What is wrong with the template?  Thanks!

 
Posted: 07 May 2008 06:04 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2004-05-15
29075 posts

Looks like it doesn’t find the weblog. Can you try hardcoding the name, insted of using a variable?

 
Posted: 08 May 2008 10:22 AM   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-11-01
34 posts

If you look at the code for the forum there is no place that I see to insert a weblog.  In fact the code seems to reference a forum. 

It is my understanding the forums do not use weblogs.

 
Posted: 08 May 2008 11:03 AM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2002-05-20
12637 posts

You shouldn’t typically have to do anything to get the forum rss working.  Can you flip in a copy of the default template- see if it works there?

 Signature 
 
Posted: 08 May 2008 11:14 AM   [ # 4 ]   [ Rating: 0 ]
Joined: 2007-11-01
34 posts

I replaced the other code with the default template code and while the previous error no longer seems to be there, the rss page still has an error.

Here is the forum page: http://www.myinrich.com/index.php/forum/index/.

Any of the RSS feeds that you click on come up with the same error.

Default Code Used:

{?xml version=“1.0” encoding=”{encoding}” ?}
<rss version=“2.0”
  xmlns:dc=“http://purl.org/dc/elements/1.1/”
  xmlns:sy=“http://purl.org/rss/1.0/modules/syndication/”
  xmlns:admin=“http://webns.net/mvcb/”
  xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”
  xmlns:content=“http://purl.org/rss/1.0/modules/content/”>
 
  <channel>
 
  <title>{exp:xml_encode}{forum_name}{/exp:xml_encode}</title>
  <link>{forum_url}</link>
  <description>{exp:xml_encode}{forum_name}{/exp:xml_encode}</description>
  <dc:language>{forum_language}</dc:language>
  <dc:rights>Copyright {gmt_date format=”%Y”}</dc:rights>
  <dc:date>{gmt_date format=”%Y-%m-%dT%H:%i:%s%Q”}</dc:date>
  <admin:generatorAgent rdf:resource=“http://expressionengine.com/” >
 
{rows}
  <item>
    <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
    <link>{exp:xml_encode}{path:view_thread}{/exp:xml_encode}</link>
    <guid>{path:view_thread}#When:{gmt_post_date format=”%H:%i:%sZ”}</guid>
    <description>{exp:xml_encode}{body}{/exp:xml_encode}</description>
    <dc:date>{gmt_post_date format=”%Y-%m-%dT%H:%i:%s%Q”}</dc:date>
  </item>
{/rows}
 
  </channel>
</rss>

 
Posted: 08 May 2008 11:18 AM   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2002-05-20
12637 posts

Do a reveal code on an rss page- it’s not valid xml- html header, bunch of js, etc:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
html>
    <
head><link rel="stylesheet" type="text/css" href="http://www.inrich.com/etc/design/cva/RIC.Css.l2fWChmVz29Yl3rLBxbSyxrLCY9NB3jFBgfUzgLUzW--.css">
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>inRich.com Forums</title

It about has to be a modification you made to the template- perhaps added the header bits outside of a conditional, something along those lines.  Also- are you running the forum through the template- i.e., using the {exp:forum} tag in a regular template?

But basically- if you can switch to the default template for a moment, I’m betting the feed works.  It’s about got to be some template customization.

Make sense?

 Signature 
 
Posted: 08 May 2008 11:37 AM   [ # 6 ]   [ Rating: 0 ]
Joined: 2007-11-01
34 posts

Yes, {exp:forum} is being imbedded in a template so that the sites header can be applied to the forum.

What modification needs to be made to the settings so that the RSS feed works, or are you telling me that the site cannot have it’s header applied to the Forum?

 
Posted: 08 May 2008 11:49 AM   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2002-05-20
12637 posts

Well- you can’t apply it to the feed, or it’s going to jam the rss.  Might try a conditional- don’t show the header bits if the url has rss in the second segment.  Don’t apply anything else if rss is in the second segment.

That work?

 Signature 
 
Posted: 08 May 2008 11:56 AM   [ # 8 ]   [ Rating: 0 ]
Joined: 2007-11-01
34 posts

It was Segment 3, but it seems to have worked.

Thanks!

 
Posted: 08 May 2008 12:03 PM   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2002-05-20
12637 posts

Woot!  I’ll close this one out then.  If you have an atom feed as well?  Make sure to make an exception for that one too.  Otherwise, nothing else is leaping to mind as a potential issue.

 Signature