Keyword

RSS feeds not working when "Add suffix to URLs" is enabled

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 9 months ago #74803 by Nicholas K. Dionysopoulos
RSS feeds not working when "Add suffix to URLs" is enabled was created by Nicholas K. Dionysopoulos
Hello Fotis,

I observed a small but annoying bug in K2 version 2.1, affecting the generation of RSS (and Atom to that matter) feeds.

When Joomla!'s "Add suffix to URLs" is enabled (set to Yes) the RSS feed links do not work. When the suffices are disabled, the generated RSS feed URLs look something like www.example.com/mycategory?format=feed&type=rss and the RSS XML document is correctly returned to the client. When the suffices are enabled, the generated RSS feed URLs look something like www.example.com/mycategory.feed?type=rss and instead of the RSS XML document, the HTML page is displayed. i.e. the suffix DOES NOT result in format=feed to be applied.

Based on my experience developing Joomla! extensions, I suspect this is a bug with the router, as this bug is conditionally triggered by the URL suffices setting. I can do some debugging for you if you'd like me to do so. As you know, I will be exclusively using K2 for the new iteration of JoomlaPack.net and feeds are of paramount importance to me, as much as URL suffices.

Best regards from Athens,

Nicholas K. Dionysopoulos
JoomlaPack Lead Developer & Project Leader

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

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 9 months ago #74804 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic RSS feeds not working when "Add suffix to URLs" is enabled
FIXED!!

After some debugging I figured out that K2 had nothing to do with the problem I was experiencing. There's this system plugin "Online Status Update" which was installed with Joobi's products that caused all the mess. Unfortunately, everything beyond the 10-line plugin which merely calls other Joobi code is encrypted with Zend Optimizer, so I can't possibly figure out what's wrong with it. Disabling it restored my site's ability to generate RSS feeds from K2 items. DARN!

-1 for encrypted extensions and +1 for great Open Source products like Joomla! and K2 :)

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

More
10 years 8 months ago #74805 by Zandergraphics
Just as a note, I found a similar conflict with K2 RSS feed and the Modalizer plugin.

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

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 8 months ago #74806 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic RSS feeds not working when "Add suffix to URLs" is enabled
Kyle,

as I noted on my previous post, this is not a problem with K2. This doesn't happen in the K2 level, it happens in the underlying Joomla! layer.

Here's the deal. When you add suffices to SEO URL's, Joomla!'s SEO router identifies the document type from the suffix. .html is HTML mode, .feed is RSS mode, .raw is RAW mode, etc. Then, it stores this information in the decoded query parameters array. The plugin I run into was IGNORING this value, determining its own, wrongfully determined the document type to be HTML and - amazingly! - passed on this information to Joomla!. The end result is that Joomla! was told to load the HTML view, not the RSS view, breaking the feed.

In my case, I contacted Joobi, the maker of the plug-in. I suggest you do likewise. If we don't alert the developers of such problems, these problems will never be fixed.

Kyle Gonyea said:Just as a note, I found a similar conflict with K2 RSS feed and the Modalizer plugin.

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

More
10 years 7 months ago #74807 by Krzysztof
I don't use plugin you wrote about, but I still have problem with RSS feeds. It doesn't work if I turn on adding sufix to urls. Is there any universal solution?

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

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 7 months ago #74808 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic RSS feeds not working when "Add suffix to URLs" is enabled
Universal, no. Solution, yes. I had the same problem in another site. After a lot of digging around it looks like the client had installed an AJAX plugin which would try to output its markup even when the document type was 'feed' or 'raw'. Ouch! To add insult to injury, AceSEF - the SEO solution he used - always marked the document type as 'html'. My solution was to hack the code of the plugin and disable it based on the URL, namely disable it when the URL contained /feed/. As you can see, it requires a lot of detective work and hacking, but it all comes down to poorly coded plugins.

Krzysztof said:I don't use plugin you wrote about, but I still have problem with RSS feeds. It doesn't work if I turn on adding sufix to urls. Is there any universal solution?

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

More
9 years 10 months ago #74809 by dr_zero
I have K2 v2.3 and Artio JoomSEF v3.7.4 Free. Everything is fine except RSS. URLs in RSS are not rewritten and remain like "index.php?blablabla". How to apply SEF plugin to RSS feed output?

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


Powered by Kunena Forum