I have a plugin where I am trying to instantiate a new class but every time the plugin was enabled, the page kept dying saying the object already exists. Upon investigating, I found out that it only happens in Category Page and not Article page.
So I removed everything in the code and had the following code:
class plgContentFoobar extends JPlugin
{
public function onContentPrepare($context, &$row, &$params, $page = 0)
{
echo 1;
}
}
On the Article page, it just outputs once as expected but on a category page; it outputs 15 times. Is there anything I need to be aware which is causing this on the category pages?