RSS is not valid

Hello!

Firstly I want to congratulate Discourse team for this awesome product!

I’m currently having a problem validating RSS feeds of pages in my Discourse setup (p.e. latest.rss).

The error is caused by:

<language>#{lang}</language>

How can I fix this?

Thanks in advance :slight_smile:

1 Like

Hmm that looks like a bug, @techapj can you have a look?

The RSS feed for meta & try (latest) shows as valid:

meta: Feed Validator Results: https://meta.discourse.org/latest.rss

try: http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Ftry.discourse.org%2Flatest.rss

3 Likes

Thank you @techAPJ ! You just let me know that discourse even has a RSS feed file that could be submitted to Google webmasters. I just did and google did accept that. We normally apply this technique in Blogger blogs but didn’t knew we could also for discourse. This RSS file was just I needed. Our Forum category pages and topics at Ask.mybloggertricks.com are well picked by Google. Since I just submitted the sitemap as RSS so it would take time for them to be indexed. Glad I read this thread. 5 stars!

1 Like

Yes, I know that. I tested with a couple more discourse forums I know and it all looked fine. But with my own discourse installation I got this:

I can’t upload an image, so here it is: Imgur: The magic of the Internet

Did you install your Discourse via our official Docker install?

Yes I have. Even yesterday I’d updated it to the most recent version.

@techapj did we test setting a language in Site Settings? Does that cause it to happen?

This is the relevant line

<% if lang %><language>#{lang}</language><% end %>

I do think this is a legit bug.

3 Likes

@codinghorror just fixed this issue:

https://github.com/discourse/discourse/commit/246ae75

This was a legit bug, I just tested the RSS feed for French language before and after the change, and the RSS feed was was not validating before the change but validates now.

Thanks for reporting it @magicknot, I should have taken this more seriously.

3 Likes