Page 1 of 1

feed.rss not found on this server !!!

Posted: Tue Jun 25, 2019 4:14 pm
by Sendlingur
I'm implementing a RSS feed to my page.

I always get 404 not found when I click the link to the page.
I'm totally lost here and I have tried to do all fixes that I have thought of.

I'm using the News module and in general this is working but when I add ".rss" to the page alias I get the 404.

below is a sample of my code.
Can anyone help me with this?

I followed this tutorial from Rolfs great site https://cmscanbesimple.org/blog/create- ... t-a-module


This is the UDT:

Code: Select all

$content_type = get_parameter_value($params,'type');
if ($content_type != '') {cmsms()->set_content_type($content_type);}
Here is a news_summary template called "rssfeed"

Code: Select all

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{root_url}/index.php?page=feed" rel="self" type="application/rss+xml" />
<title>{sitename}</title>
<link>{root_url}/index.php?page=feed.rss"</link>
<description>RSS demo</description>
<copyright>cR</copyright>
<generator>CMS Made Simple</generator>

{foreach from=$items item=entry}
  <item>
    <title>{$entry->title|escape}</title>
    <description>{strip}
      {eval var=$entry->summary|default:$entry->content|strip_tags:false|escape|strip|truncate:400}
    {/strip}</description>
    <guid>{$entry->link}"></guid>
    <link>{$entry->more_url}</link>
    <pubDate>{$entry->postdate|date_format:"%d.%m.%Y"}</pubDate>
  </item>
{/foreach}

</channel>
</rss>

This is the link to the rss feed. I' have changed the self_link tag to "id" but still I get the 404

Code: Select all

<li><a class="s" id="rss-feed" title="To RSS" href="{cms_selflink href=71}">RSS</a></li>
And in the content page 'alias' I have named the page " feed.rss"


My code is working if I change the 'alias' from 'feed.rss' to 'feed'

Re: feed.rss not found on this server !!!

Posted: Tue Jun 25, 2019 6:28 pm
by Rolf
You have pretty URLs installed?

Re: feed.rss not found on this server !!!

Posted: Tue Jun 25, 2019 6:41 pm
by Rolf
but when I add ".rss" to the page alias I get the 404.
The .rss should not be added to the page alias but the "page URL" field!

Re: feed.rss not found on this server !!!

Posted: Wed Jun 26, 2019 9:32 am
by Sendlingur
No I don't have pretty urls installed.

it was an cache issue. it is working now.

I still have the feed.rss in the alias and the feed is working.

where can I find the "page URL" field under Options? I only see "page alias"?

Re: feed.rss not found on this server !!!

Posted: Wed Jun 26, 2019 2:33 pm
by DIGI3
You won't see the page url field when you don't have pretty urls enabled, because it requires pretty urls in order to function.