No Code Attached Yet J4 Issue bug ?
avatar valerie16901
valerie16901
30 Apr 2016

Steps to reproduce the issue

-Create a banner, including some meta keywords.
-Create a banner module an setup the option "Search by Meta Keyword" to "YES".
-Activate the module in any position let's say "position-7" on Protostar template
-Disable the cache for the banners module and save.

-Create a Content article and setup some Meta Keywords which will be used to display the banner accordingly.
-Embed the module Banners inside the article using the "Module" button on the tinyMCE editor (the syntax will look something like this {loadmodule mod_banners,banners module title} ) and save it.

Expected result

-The Banners module works good and shows the banner according to the Meta Keywords in the "position-7" or any other position in the default Protostar template.
-The banners module should also work the same way when embedded inside the article, displaying the banners according to the Meta Keywords.

Actual result

-The Banners module embedded inside the article shows no content at all.
-The source code shows:
< div class = " module " >
< h3 > Banners module title< / h3 >
< div class = " banner group " > < / div >
< / div >

Additional comments

-I tried to disable all the joomla cache and the problem still persist.
-When disabling the option "Search by Meta keyword" inside the Banners Module, the module can display his content inside the article with no issue.

avatar valerie16901 valerie16901 - open - 30 Apr 2016
avatar valerie16901 valerie16901 - change - 30 Apr 2016
The description was changed
avatar valerie16901 valerie16901 - change - 30 Apr 2016
The description was changed
avatar brianteeman
brianteeman - comment - 30 Apr 2016

I followed the instructions above and can NOT confirm this on a clean install
When search by metakeyword was not selected a banner was displayed
When search by metakeyword was selected a banner was not displayed and unlike the report the raw code was not displayed


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10140.
avatar brianteeman
brianteeman - comment - 30 Apr 2016

Ignore my last comment


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10140.
avatar brianteeman
brianteeman - comment - 30 Apr 2016

I created a banner with the meta keyword test and embedded a banner module in an article with the meta keyword test.
I then inserted a banner module in that article
When search by metakeyword was not selected a banner was displayed
When search by metakeyword was selected a banner was not displayed


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10140.
avatar brianteeman brianteeman - change - 30 Apr 2016
Priority Urgent Medium
Status New Confirmed
avatar brianteeman brianteeman - change - 30 Apr 2016
Category Cache Components Modules Plugins Tags Components Modules Plugins
avatar brianteeman brianteeman - change - 3 Aug 2016
The description was changed
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jan 2017

Issue exists in 3.7-staging.

avatar GeraintEdwards
GeraintEdwards - comment - 4 Jun 2017

Issue still exists in 3.7.3-staging.

I have investigated the cause and found the reason for the problem.

components/com_content/views/article/view.html.php calls the onContentPrepare plugin (which in turn loads the embedded module) BEFORE it calls _prepareDocument (which sets the meta data).

Changing the order of these calls could have unforseen consequences - e.g. plugins that set the meta tags based on the content or category would break.

I can see many benefits of making the viewed article available within the loadmodule methods of the content plugin. For example a pluging that extracts the custom fields from the currently viewed article coupled with new custom module that is used to display these custom fields.

This may be a better solution - I would be interested in other people's views before suggesting some code changes.

avatar joomla-cms-bot joomla-cms-bot - edited - 8 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Nov 2017
The description was changed
Title
Banners module does not show any content when attached inside article
com_banners: Module does not show any content when attached inside article
Status Confirmed Discussion
avatar joomla-cms-bot joomla-cms-bot - edited - 8 Nov 2017
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar jwaisner jwaisner - change - 12 Mar 2020
Status Discussion Confirmed
Build master staging
avatar chmst
chmst - comment - 19 Jul 2020

Confirmed also for J4.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/10140.

avatar chmst
chmst - comment - 7 Jun 2022

This feature is based on the meta keywords in an article.
As we do not render the meta keywords any more (#25258) this cannot work in new sites.

avatar chmst chmst - change - 7 Jun 2022
Labels Added: No Code Attached Yet J4 Issue bug
Removed: ?
avatar chmst chmst - labeled - 7 Jun 2022
avatar chmst chmst - labeled - 7 Jun 2022
avatar brianteeman
brianteeman - comment - 7 Jun 2022

This feature is based on the meta keywords in an article.
As we do not render the meta keywords any more (#25258) this cannot work in new sites.

It should still work - thats why we kept the keywords

avatar chmst
chmst - comment - 7 Jun 2022

Trying to use it in my new site J4 , but there are no keywords in the head. Maybe I am missing a param?

avatar brianteeman
brianteeman - comment - 7 Jun 2022

yes there are no keywords in the head. that is correct.

from memory it is matching the value oif the keyword in the article and the keyword in the banner

avatar chmst
chmst - comment - 7 Jun 2022

https://github.com/joomla/joomla-cms/blob/4.1-dev/modules/mod_banners/src/Helper/BannersHelper.php#L38 The module uses <meta name="keywords" here.

I see that the related_items module searches for keywords in the article, not in <meta

avatar brianteeman
brianteeman - comment - 7 Jun 2022

banners should do it the same way now. it was missed in error

avatar rdeutz rdeutz - change - 24 Aug 2022
Labels Removed: J3 Issue
avatar rdeutz rdeutz - unlabeled - 24 Aug 2022
avatar jwaisner jwaisner - change - 10 Oct 2022
Labels Added: ?
avatar jwaisner jwaisner - labeled - 10 Oct 2022
avatar N6REJ
N6REJ - comment - 17 Oct 2022

@brianteeman can you fix the missed code?

avatar brianteeman
brianteeman - comment - 17 Oct 2022

sadly not

avatar MacJoom
MacJoom - comment - 18 Oct 2022

I'm working on it - its all about knowing the $article (with its keywords) which is calling the banner module (while in BannersHelper) - that's where i'm stuck.

avatar MacJoom
MacJoom - comment - 21 Oct 2022

I have investigated the code of the banners generation and found that the rendering of banners in a banners module with 'Select by keywords' set to 'Yes' is completely broken - not just as a module in an article - since the keywords are not set in the document anymore and the BannersHelper gets it from there with $keywords = explode(',', $app->getDocument()->getMetaData('keywords')); - i have a solution for the original issue, but i'm looking for a solution fixing this for the banners in a position too - for J4 completey broken

avatar richard67 richard67 - change - 21 Oct 2022
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2022-10-21 16:31:57
Closed_By richard67
avatar richard67 richard67 - close - 21 Oct 2022
avatar richard67
richard67 - comment - 21 Oct 2022

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

Add a Comment

Login with GitHub to post a comment