RELEASE EasyDiscuss 5 Beta Released - Massive UI improvements and a whole lot more 🌍 🚀



I have just realized that Payplans (latest 4.x) is breaking the RSS feeds on my sites. I did some debugging and quickly found that it's a well known issue that affected multiple extensions over the years.

The problem happens because Payplans calls JFactory:getDocument() before the onAfterRoute event. In doing so, it forces Joomla to have a HTML document type and so the RSS feeds are broken.

Very importantly, this will not happen on all sites. It happens on ours because our RSS feeds have URLs such as /blog/feed/rss/

On site with standard Joomla SEF, feeds have URLs such as: /blog/feed/rss/?format=feed. When there's a "?format=feed" in the URL, the problem does not occur.

Note that the same will happen with any non-html request (ie pdf, json) as long as "?format=xxx" is not in the URL.

The bug is caused in 2 locations:

Your system plugin extends the class PPPlugins. In its constructor, this class does:

$this->info = PP::info();
$this->theme = PP::themes();

PP:info() cause the loading of class PayPlans which has $this->doc = JFactory::getDocument(); in its constructor (line 98 of administrator/components/com_payplans/includes/dependencies.php)


PP::themes() also has $this->doc = JFactory::getDocument(); in its constructor (line 39 of administrator/components/com_payplans/includes/themes/themes.php)

Both these calls (JFactory::getDocument()) are not allowed in Joomla before onAfterRoute as they cause the bug we are seeing.

It is not legal to call JFactory::getDocument() in the constructor of a system plugin before onAfterRoute has been triggered.
The reason is that before onAfterRoute, the SEF URL has not been decoded yet and so Joomla does not know which format is the document. It therefore forces it to html. That's ok in general but causes a bug for non-html document such as rss feeds, json or pdf.

I have not yet had time to look for a fix myself but it's actually urgent. It appears our RSS feeds are broken due to this issue since we updated to Payplans 4.

Best regards

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Your time
Stack Ideas HQ
Support is

It is currently off working hours and most of us aren't around.

Rest assured that we will get back to your issues as soon as the day starts tomorrow!

Buy Us Coffee

Are you happy with our support and would like to buy us a cup of coffee?

Enjoy the Coffee!
Service via PayPal
Subscribe for product updates & promotions