No Code Attached Yet bug
avatar ManuelHu
ManuelHu
29 Jun 2023

Steps to reproduce the issue

  • Have a site with at least one enabled content plugin that does some sort of content replacement and adds some scripts (i.e. image gallery tools, video embedding...)
  • Create an article that contains some content that triggers the content plugin (i.e. adds scripts to the output)
  • Add a mod_articles_news module to any position
  • Select the category of the article created above
  • Disable the showing of the intro text in the module options
  • Observe the HTML output in the frontend: The intro text is not shown (as expected), but scripts that were added are in the output

Expected result

  • Content is only content.prepared if it is actually selected to be shown

Actual result

  • Content is always content.prepared, even if the introtext is not displayed.

System information (as much as possible)

Joomla 4.3

Additional comments

In mod_articles_category, the preparation only happens if the option to show the introtext is set:

if ($show_introtext) {
$item->introtext = HTMLHelper::_('content.prepare', $item->introtext, '', 'mod_articles_category.content');
$item->introtext = self::_cleanIntrotext($item->introtext);
}

In mod_articles_news, there is no such condition

$item->introtext = HTMLHelper::_('content.prepare', $item->introtext, '', 'mod_articles_news.content');

This behavior is already like this in 3.10.

avatar ManuelHu ManuelHu - open - 29 Jun 2023
avatar joomla-cms-bot joomla-cms-bot - change - 29 Jun 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 Jun 2023
avatar ManuelHu
ManuelHu - comment - 30 Jun 2023

I would work on a PR to fix this, can we get this still into 4.3? Especially because the behavior is quite old, and this might break some sites relying on this inconsistent behavior?

avatar chmst chmst - change - 2 Jul 2023
Labels Added: bug
avatar chmst chmst - labeled - 2 Jul 2023
avatar chmst
chmst - comment - 2 Jul 2023

A PR will be appreciated, thank you. The release managers will decide about the version.

avatar alikon
alikon - comment - 3 Jul 2023

closing as we have a pr #411107

avatar alikon alikon - change - 3 Jul 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-07-03 15:40:59
Closed_By alikon
avatar alikon alikon - close - 3 Jul 2023

Add a Comment

Login with GitHub to post a comment