No Code Attached Yet bug
avatar peterhulst
peterhulst
31 Jul 2025

Steps to reproduce the issue

I have a plugin using onContentPrepare.
Create two modules:

  1. Articles
  2. Articles - Newsflash (Legacy)

Module 2 (from Articles - Newsflash (Legacy)) works perfect.
Module 1 (from the new Articles) does not trigger onContentPrepare

Expected result

Both modules should display the same result

Actual result

Module 1 does not process the onContentPrepare.

System information (as much as possible)

Both Joomla 5 and 6 (alpha)

Additional comments

Solution:
Add in \modules\mod_articles\src\Helper\ArticlesHelper.php after line 343:
'onContentPrepare' => new Content\ContentPrepareEvent('onContentPrepare', $contentEventArguments),
above the line:
'afterDisplayTitle' => new Content\AfterTitleEvent('onContentAfterTitle', $contentEventArguments),

This is consistent with the code in:
\modules\mod_articles_news\src\Helper\ArticlesNewsHelper.php

avatar peterhulst peterhulst - open - 31 Jul 2025
avatar peterhulst peterhulst - change - 31 Jul 2025
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jul 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Jul 2025
avatar peterhulst peterhulst - change - 31 Jul 2025
The description was changed
avatar peterhulst peterhulst - edited - 31 Jul 2025
avatar chmst
chmst - comment - 31 Jul 2025

Thank you for reporting! As you have already a solution, would you like to make yourself a PR?

avatar peterhulst
peterhulst - comment - 31 Jul 2025

Thank you for reporting! As you have already a solution, would you like to make yourself a PR?

You're welcome. Sorry, but I have no idea how I should make a PR myself

avatar chmst
chmst - comment - 31 Jul 2025

I will do it for you.
Contributing is fun but has a leaning curve. Maybe next time .. if you are interested - find some information here: https://manual.joomla.org/docs/get-started/git/github-joomla-cms/#make-a-pull-request

avatar peterhulst
peterhulst - comment - 31 Jul 2025

Thank you! I will study the documentation for next time.

avatar chmst
chmst - comment - 31 Jul 2025

Pleas test #45813

avatar chmst
chmst - comment - 31 Jul 2025

Please test #45813

avatar chmst chmst - change - 31 Jul 2025
Labels Added: bug
avatar chmst chmst - labeled - 31 Jul 2025
avatar richard67 richard67 - change - 1 Aug 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-08-01 07:13:01
Closed_By richard67
avatar richard67 richard67 - close - 1 Aug 2025
avatar richard67
richard67 - comment - 1 Aug 2025

Closing as having a pull request. Please test #45813 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment