Topic-icon Comment showing in newsflash module

Active Subscriptions:

None
12 years 10 months ago #11074 by fb_548860032
I can't work out how to stop the comment section showing in the newflash module.

I've tried and tried and I'm obviously missing something obvious.

How do I stop the comments showing in the newsflash module?
The topic has been locked.
Support Specialist
12 years 10 months ago #11081 by alzander
That's an excellent question, in all honesty. We get reports every once in a while about the Like or Comment button showing up in places it shouldn't.. this occurs when 'other' extensions call the Content plugins, and we'll need to test and implement a method to ignore showing in the Newsflash module (as we agree it shouldn't either).

Let me look into this a bit more, and I'll let you know what we find.
The topic has been locked.
Active Subscriptions:

None
12 years 10 months ago #11088 by fb_548860032
Thanks, would be nice to be able to set it to be off because the newsflash module in the site that it's happening with is only 150px wide so it looks awful.

I've just had to reset my password and log in manually because Facebook is down. Never really thought how much of a problem that could cause for sites where people have logged in using their facebook account!
The topic has been locked.
Support Specialist
12 years 9 months ago #11124 by alzander
Huw,
Let me start by saying that what I'm about to recommend is something we never recommend or suggest.. making a modification to something that's part of Joomla core. However, in this case, for now (and for a quicker answer), we must.

Basically, what's happening is the the mod_articles_news is calling the content plugins before the articles are rendered. There's actually a mechanism built into the content plugins that let our plugin 'know' where it's being called from (an article view, a module, etc). However, the mod_articles_news module is actually lying, in a way, by saying it's actually the article component. To fix this, our best answer is to simply comment out the line this is occuring on, so it doesn't call the content plugins at all.

If this makes no sense, no worries. I just need to explain the background. To fix, please edit the following file:
/modules/mod_articles_news/helper.php
At line 92, you'll see the below line:
$results = $app->triggerEvent('onContentBeforeDisplay', array('com_content.article', &$item, &$params, 1));
Please comment this line out by putting a hash '#' sign at the beginning of it.

That should fix you right up, but it will prevent the content plugins from being called in that module, which may cause other issues. Please let us know if it does, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 9 months ago #11125 by fb_548860032
Yes that's worked fine as a temporary fix :D
They don't need plugins there so that should be fine for a temp fix for now :D

Thanks
The topic has been locked.
Support Specialist
12 years 9 months ago #11135 by alzander
Great! Glad to hear that got you going for now. We'll try to find a better solution that doesn't require a change to Joomla, but for now, just remember you made that change in case you upgrade Joomla and the problem comes back.

Thanks,
Alex
The topic has been locked.