PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar conseilgouz
conseilgouz
7 Sep 2024

Articles News module uses com_content.article context to call content plugin when it should call com_content.featured or com_content.category context depending on module's parameters.

Summary of Changes

Articles News module should behave like a blog view or a featured articles view as it displays categories articles, featured or not. Specific plugins working on blog view/featured view don't work.

This behaviour is conform with com_content/srv/View/Featured/HtmlView.php (line 159 and below) and com_content/srv/View/Category/HtmlView.php (line 108 and below) use of triggerEvent commands

Testing Instructions

Set Trigger Plugin Events parameter in Articles News module.

Actual result BEFORE applying this Pull Request

Articles News module calls content plugin with com_content.article context

Expected result AFTER applying this Pull Request

Articles News module calls content plugin with com_content.featured or com_content.category context depending on its parameters

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar conseilgouz conseilgouz - open - 7 Sep 2024
avatar conseilgouz conseilgouz - change - 7 Sep 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2024
Category Modules Front End
avatar conseilgouz conseilgouz - change - 7 Sep 2024
Labels Added: PR-4.4-dev
avatar conseilgouz conseilgouz - change - 9 Sep 2024
Title
Articles News : fix trigger event context
[4.4.]Articles News : fix trigger event context
avatar conseilgouz conseilgouz - edited - 9 Sep 2024
avatar conseilgouz conseilgouz - change - 17 Sep 2024
Title
[4.4.]Articles News : fix trigger event context
[4.4]Articles News : fix trigger event context
avatar conseilgouz conseilgouz - edited - 17 Sep 2024
avatar brianteeman
brianteeman - comment - 17 Sep 2024

Surely this breaks existing sites and expected behaviour

avatar conseilgouz
conseilgouz - comment - 18 Sep 2024

This PR only applies to Articles News module.

This module displays categories articles like a blog.

The PR sets context with same value than in articles category view or featured articles as it does not display a single article but articles from one or more categories.

A better approach could be to set the context with its real value, something like com_module.articlesnews.

avatar conseilgouz
conseilgouz - comment - 18 Sep 2024

It does not break any core plugins call and it gives a correct context.

avatar brianteeman
brianteeman - comment - 18 Sep 2024

This PR only applies to Articles News module.

oops I missed that

avatar conseilgouz conseilgouz - close - 19 Sep 2024
avatar conseilgouz
conseilgouz - comment - 19 Sep 2024

Hi,
Just found Factory::getApplication()->scope to determine who's calling my plugin.
In this case, scope contains mod_articles_news.
Pascal

avatar conseilgouz conseilgouz - change - 19 Sep 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-09-19 15:36:37
Closed_By conseilgouz

Add a Comment

Login with GitHub to post a comment