Closed niosme closed 1 month ago
Hi, It should work for modules if you set exclude mod_ contexts parameter to No.
Let me know if it's ok in your environment.
Pascal
I tried to make it work unsuccesfully with mod_articles_news . When i disable it it breaks down the whole site maybe from something that exists inside the mod_custom.content. is there any step i should do to achieve that to work with mod_articles_news description because it throws the whole description?
What do you mean by "when I disable it" ? what is "it" ? Could you send a screen copy of plugin's parameter ? Pascal
Hi, After some more testing, I'm afraid AutoReaMore plugin won't work with Articles News module. Articles News module calls content's plugins but it applies a wrong context : com_content.article. Using standard procedures, it is not possible to override articles news module as articles list is created in its helper file. Pascal
Hmmm.. ok thanks for the information.
But the plugin works for com_content.article. Shouldnt that work as a sequence with the module also? Why they made it like that. So the only solution is to close the description from the module article news or create a module ovewrite which will do it manually.
com_content.article is used when displaying a single article.
It does not make sense to have a readmore button when displaying a single article.
To make autoreadmore work with Articles News module, we cannot use standard module override as it only applies tmpl files. As stated earlier, contents plugins are called in ArticlesNewsHelper file.
If you update this file so it calls plugins using the correct context, it will be overwritten on each Joomla update.
For information, in mod_articles_news/src/Helper/ArticlesNewsHelper.php, I made a try by updating line 170 to replace com_content.article by mod_articles_news.content and it works. Line 170 becomes :
$app->triggerEvent('onContentPrepare', ['mod_articles_news.content', &$item, &$params, 0]);
But, I did not find a way to override this helper file using Joomla standards.
Hi, I just created a PR on Joomla to fix Mod_articles_news : https://github.com/joomla/joomla-cms/pull/44031 Just hope it will be included. Pascal
Hi, Just found a way to determine if AutoReadMore plugin is called by mod_articles_news or not. Version 5.3.1 should solve your issue. Pascal
Does it work with mod_article_news ?