Closed nbehier closed 8 years ago
Hmm … this is the only commit that went into 3.0.5 — 72832568dafa3a3ed605f22a2d3ffce08bd0e77b
YEs… and I do not have some particular routing… weird…
Found a problem with bolt 3.2.2 in RssFeedController, line 96:
$this->config[$contenttypeslug]['content_types']
doesn't work, because $contenttypeslug
is null. Replacing it with'sitewide'
fixed it.
Good catch, @werner-freytag :+1:
Fixed and tagged as v3.0.6
@GawainLynch @werner-freytag I installed v3.0.6 and get the same 404 error. Return to v3.0.4 and it works perfectly fine for me. (My website is propulsed by Bolt v3.1.1).
Sacre blue.
That code is still a bit of a mess that I inherited. I rewrote the whole thing yesterday, and tagged 3.1.0-RC1. Due to something not being correct in Bolt's Extend page version selector you'd need to install 3.1.x-dev
and let me know if that works … :monkey: tests passed here, but it is an internal rewrite so I was just going to give it a day or so before tagging a stable version.
OK, after some further poking the RC seems to work fine, so I have tagged 3.1.0 as a stable release and I'll re-close this.
Please feel most welcome to reopen if you find this is still not fixed, and I'll get on it again a.s.a.p..
Thanks, as always, for your time and understanding :+1:
@GawainLynch I've a good and a bad news… The good one : If I gave you some large money for a work and a deadline, maybe I could be annoyed a little… but there, you give so much of your time for several years on an wonderful community project… Thanks a lot once again !!
The bad news… I gave a try to your new v3.0.1… and got the same error on my config… so came back to v2.0.4. Pretty sure that results from my config… I'll open developer toolbar and will try to understand why default route /rss/feed.xml
could not be find…
OK, firing up an install here to see if I can reproduce … do you have a config example that you could share that reproduces the problem as I seem to be missing something in the way you are approaching the configuration versus how I am?
When I go to /rss/feed.xml
, I get 404 error page. The tab @_rss_feed.extension
from developer toolbar displays that :
HTTP status : 404 Not Found
Controller Rss : Feed :: feed
Controller class : Bolt\Extension\Bolt\RssFeed\Controller\RssFeed
Route name : _rss_feed.extension
Has session : yes
My rssfeed.bolt.yml
is :
sitewide:
enabled: true
feed_records: 10
feed_template: rss.twig
content_length: 0
content_types: [entries]
And I do not add particular routing on my config/routing.yml
.
This is my set up and result
sitewide:
enabled: true
feed_records: 4
feed_template: rss.twig
content_length: 10
content_types: [entries, pages]
With a copy/paste of your config:
I forgot one file, on my theme, I add rss.twig
with :
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ app.config.get('general/sitename') }}</title>
<atom:link href="{{ paths.currenturl }}" rel="self" type="application/rss+xml"/>
<link>{{ paths.rooturl }}</link>
{% if app.config.get('general/payoff') is defined %}
<description>{{ app.config.get('general/payoff') }}</description>
{% endif %}
<language>{{ app.config.get('general/locale')|lower }}</language>
{% for record in records %}
<item>
<title>{{ record.title|striptags }}</title>
<link>{{ paths.hosturl }}{{ record.link }}</link>
<pubDate>
{{ record.datepublish|date("r") }}
</pubDate>
<author>{{ app.config.get('general/sitename') }}</author>
<guid isPermaLink="false">{{ record.contenttype.singular_slug }}/{{ record.id }}</guid>
<description>
{%- if content_length == 0 -%}
{{ record|rss_safe('teaser, body') }}
{%- else -%}
{{ record|rss_safe('teaser, body', content_length) }} [<a href="{{ paths.hosturl }}{{ record.link }}">Lire la suite…</a>]
{%- endif -%}
</description>
{% if record.taxonomy is iterable %}
{%- for taxonomyname, taxonomy in record.taxonomy %}
{%- for taxonomyvalue in taxonomy %}
<category domain="{{ taxonomyname }}"><![CDATA[ {{ taxonomyvalue }} ]]></category>
{%- endfor %}
{%- endfor %}
{%- endif %}
{% if record.image is not empty %}
<image>{{ paths.hosturl }}{{ thumbnail(record.image, 600, 400) }}</image>
<enclosure url="{{ paths.hosturl }}{{ thumbnail(record.image, 600, 400) }}" type="image/jpeg" />
{% endif %}
</item>
{% endfor %}
</channel>
</rss>
Could this file get me to 404 error page ?
Change file to rss-back.twig
and still get my 404 page…
Yeah, using your Twig template mine works OK, without the 404 … Hmmm … this is weird.
Ha! Found it! If you only have sitewide it breaks … fix incoming
OK … Lets try this again shall we :-D
I have pushed and tagged 3.1.1 and that fixes the use-case that we eventually were both seeing.
Same deal, as I want to see how many times I can close and reopen this one :laughing:
It works like a charm !!! Well done and Thanks a lot ! This issue should stay closed now ;-)
Thanks mate!
The upside is that we managed to find a bug in Bolt as a result of me digging
Hi, I couldn't do many tests, but when I upgraded
bolt-extension-rssfeed
to v3.0.5 on my Bolt 3.1.1,/rss/feed.(xml|rss)
leeds me to 404 error page. When I downgraded extension to v3.0.4,/rss/feed.(xml|rss)
got me my sitewide RSS feeds. Maybe I forgot something when I try to upgrade ?