Rss per language

♪ Bonjour!

First of all, I would like to say Thank you:
It is my first site building, I am a beginner, but I’m getting into the deep of the code and though I am able to enjoy it: Grav is really impressive and I would not have even thought that I would be able to get to such point! I am liking it very much!

Also, I have received great support a few days ago through the forum, which I apreciated very much.

Installing currently the feed plugiin, I am experiencing a problem:

My Site is multiligual:
1. fr (French) (default) 2. ja (Japanese) 3. en (English)

So Blog section has a per language:
1. (French) 2. (Japanese) 3. (English)

Problem comes in feed.rss.twig with (here, for example, the japanese version):

<?xml version="1.0" encoding="utf-8"?> ホーム http://localhost/grav/blog.rss ホームサンプル記述 ja-ja Attentats de Charlie Hebdo: la réaction de M. Onfray http://localhost/grav/ja/blog/blog-item.item-5 ```

problem is in:
<atom:link href="http://localhost/grav/blog.rss" rel="self" type="application/rss+xml"/>

href="http://localhost/grav/blog.rss" is not the correct adress which is href="http://localhost/grav/ja/blog.rss" because /ja is missing to be correct

in twig template:

<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="" version="2.0">
        <title>{{ page.title }}</title>
        <link>{{ uri.url(true) }}.{{ uri.extension() }}</link>
        <description>{{ collection.params.description }}</description>
        <language>{{ collection.params.lang }}</language>
        <atom:link href="{{ uri.url(true) }}.{{  uri.extension }}" rel="self" type="application/rss+xml"/>
        {% for item in collection %}
        {% set banner =|first %}
            <title>{{ item.title|e }}</title>
            <link>{{ item.url(true) }}</link>

problem is in:
<atom:link href="{{ uri.url(true) }}.{{ uri.extension }}" rel="self" type="application/rss+xml"/>

I have looked at Twig documentation to change it with trim filter or whatever, but I could not succeed so far…

Thanks in avance for your support

François (V.) alias Tidivoit

in the exemple, problem is double as also in html exemple line <link>http://localhost/grav/blog.rss</link> shoul be <link>http://localhost/grav/ja/blog.rss</link> (/ja) is missing to be correct.

In Twip Template, same expression as previous…

Please create an issue with all these details. Certainly does look like some multilanguage tweaks are going to be needed:

thanks for replying:
I just found the answer to my problem by trying … I did not even thought the answer would be so simple:
I just replaced uri.url(true) by page.url(true)and that was it !!!
Sorry, I can not really believe I have found it and so, please, don’t find ridiculous if I come back later …

That actually sounds like the correct fix :slight_smile: