Keyword

K2 RSS doesnt pass w3c feed validation

  • bharath
  • bharath's Avatar Topic Author
  • Offline
  • New Member
More
15 years 1 month ago #71094 by bharath
Hello,

First of all let me sincerely thank you for this amazing component!

I was trying to provide the feed address to another website and it did not accept it as a valid feed. So I tried to get the feed validated via the w3c feed validation service. I got the following error:

Sorry

This feed does not validate.

*

line 2, column 0: Undefined root element: script [help]

Please Log in or Create an account to join the conversation.

More
15 years 1 month ago #71095 by Kaye Patrick
Replied by Kaye Patrick on topic K2 RSS doesnt pass w3c feed validation
I don't know if this is directly responsive to your issue, but I have noticed that K2 and other components generate bad feed links when the third core joomla SEO option (" Add suffix to URLs ") is set to Yes. I have turned this off and the generated links now work.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #71096 by danny leary
Replied by danny leary on topic Re: K2 RSS doesnt pass w3c feed validation
Hey Guys,

Just thought i'd post a workaround until k2 can fix the rss validation issues.

My problem arose when i wanted to use mailchimp to create an RSS to email campaign where new articles seen in an rss feed will trigger an auto email sent to subscribers. An awesome feature. Only JNEWS pro offers a smartnewsletter claiming to do this with k2; although there is a bug they are addressing at this time that is slotted to be fixed. However, as i do like Mailchimp and think it is superior, i decided to use their awesome RSS to email service.

My issue arose when i submitted the K2 rss feed url from the icon. I could view the data in chrome and it seemed to work ok. However, Mailchimp rejected the rss url as not valid. The only other extension that claims to create a clean rss for k2 and do a good job cost about 60 bucks including an optional k2 plugin. I didnt have the dough :)

So i modified for my needs a php rss generator script that created a validated rss and pulls k2 items so far so good. I couldn't add pictures yet, but maybem someone can mod the sql query to include images :) also, it pulls k2 items from all categories, but i think someone could mod the sql query to just pull from a certain category.

Here is the source of the files and tutorial that helped
phpfeedwriter.webmasterhub.net/2012/01/db-feed-sample-php-explained-sample-feed-database-integration-php-script/

It seems to work great and once i submitted it to mailchimp it accepted it without issue and works great.

In a nutshell, here's what you do. take these source files, upload them to a directory you create in your joomla site (like 'k2feed' or something you want )
Modify the database and other settings in the config file and upload it. It should work ok when you visit the sample php file.

Thanks,
Danny
Attachments:

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum