alexdebril / rss-atom-bundle

RSS and Atom Bundle for Symfony
MIT License
139 stars 49 forks source link

Invalid feed produced #170

Closed bsod85 closed 6 years ago

bsod85 commented 6 years ago

Hi Alex,

I'm trying to produce a feed that passes W3C validation, but I found that even your demo feed doesn't pass it (https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Frss-atom-demo.herokuapp.com%2Frss%2Fmock). Is it a known problem? For me the blocking error is the media type (https://validator.w3.org/feed/docs/warning/UnexpectedContentType.html). The validator says it should be application/rss+xml or application/xml. Unfortunately the currently used one is hardcoded into StreamController.php.

alexdebril commented 6 years ago

Hi Bsod (love that nickname),

It's been a long time since I last submitted a feed to the W3C validation, thank you for doing so.

I'm thinking of fetching headers from configuration instead of hardcoded-values (see https://github.com/alexdebril/rss-atom-bundle/blob/master/Controller/StreamController.php#L115), do you think it's a relevant solution ?

Have a nice day

bsod85 commented 6 years ago

Yes, that would be perfect. If you need it or think it can be of help I can try to make a PR over the weekend

alexdebril commented 6 years ago

I just merged your pull request and replaced "debril_rss_atom.content_type_rss" with "debril_rss_atom.content_type_xml" as it concerns both RSS and Atom formats.

However, the real issue is not fixed, feed-io still produces invalid feeds. I opened a new issue in its backlog : https://github.com/alexdebril/feed-io/issues/171

bsod85 commented 6 years ago

Yes, this was just one of the problems the validator signals. Thank you

alexdebril commented 6 years ago

The main issues for RSS feeds validation are now fixed in feed-io, please open new issues if you see another validation problems.

Thank you for your contribution