I have had some problems setting up a RSS feed url via Views today.

From what I can tell, and please fill me in here, is that the tag is requesting a namespace of "dc" which is not defined in the xml tag. All the other tags in the rss feed are the default namespace, such as . Shouldn't the tag be and not ?

This causes both Firefox and IE to generate parse errors and not display the RSS feed...

Comments

dawehner’s picture

This is views:

<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://localhost/core/frontpage">
  <channel>
    <title>core</title>
    <link>http://localhost/core/frontpage</link>
    <description></description>
    <language>en</language>
          <item>
    <title>test</title>
    <link>http://localhost/core/node/1</link>
    <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden clearfix&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;test&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Tue, 25 May 2010 05:38:14 +0000</pubDate>
 <dc:creator>dereine</dc:creator>
 <guid isPermaLink="false">1 at http://localhost/core</guid>
 <comments>http://localhost/core/node/1#comments</comments>
  </item>
  </channel>

</rss>

This is from core:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://localhost/core"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>core</title>
 <link>http://localhost/core</link>
 <description></description>
 <language>en</language>
<item>
 <title>test</title>
 <link>http://localhost/core/node/1</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden clearfix&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;test&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 25 May 2010 05:38:14 +0000</pubDate>
 <dc:creator>dereine</dc:creator>
 <guid isPermaLink="false">1 at http://localhost/core</guid>
 <comments>http://localhost/core/node/1#comments</comments>
</item>
</channel>

</rss>

I guess views would have to add " xmlns:dc="http://purl.org/dc/elements/1.1/" right?

darren1713’s picture

EXACTLY! but I think I ran across a bug somewhere because that namespace is written into code, but does not come through in the $namespace variable in views-view-rss.tpl.php

I modified views-view-rss.tpl.php to include xmlns:dc='http://purl.org/dc/elements/1.1/' and although it is hardcoded, it works. Is that namespace really a "variable" though? Should it just be hardcoded in the template file?

dawehner’s picture

Assigned: darren1713 » Unassigned
Status: Active » Fixed

Oh I found the problem.

I commited a fix. It will be availible on the next 6hrs in the dev release and immediately in the cvs.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.