User tests: Successful: Unsuccessful:

avatar Hackwar
14 Nov 2014

The category table is falsely included/not included. Long story short, this fixes #5000 and is a better fix than #5098 See there for testing instructions.

avatar Hackwar Hackwar - open - 14 Nov 2014
avatar jissues-bot jissues-bot - change - 14 Nov 2014
Labels Added: PR-staging
avatar zero-24 zero-24 - change - 16 Nov 2014
Category Components Front End
avatar waader
waader - comment - 19 Nov 2014

I can not bring together what started in this forum thread - (mentioned in #5000) - with what you did in your patch. In other words: I cannot replicate the original problem.

So the display of "module banner" depends basically on three criteria (I ignore the menu assignment, as it was set to "on all pages" in all of my tests):

  • client (I tested with the default setting - "no client")
  • category and
  • Search by Meta Keyword

When applying your patch the "categories" table is not joined when the default setting - "all categories" - is set. Without your patch the "categories" table is always joined. I my opinion the wording "all categories" implies that the table "categories" is joined. Otherwise is should be named "not used" or something like that.

The forum thread described a problem with the "Search by Meta Keyword". So I tested this with the following procedure using the current stage branch:

  • create an article and assign a keyword in "Meta Keywords"; Link the article to a menu item.
  • create a banner and assign the same keyword to "Meta Keywords".
  • create a module banner and set "Search by Meta Keyword" to yes. The fields client and category are not touched.
  • go to the frontend a select the menuitem with the linked article.

Result: the banner is not displayed but it should.

What I found out was, that a client must be selected in the banner, than the banner get´s displayed. This is an error as the client is not a mandatory field in the banner. It should function without assigning a client.

Apart from that the "Search by Meta Keyword" works for me.

Maybe I got it totally wrong. In this case, please advise.

This comment was created with the J!Tracker Application at

avatar Hackwar
Hackwar - comment - 25 Dec 2014

The filter for categories does not have anything to do with the categories table. Basically, you are only saying that you either want to have banners from all categories or just specific categories. In the first case, we don't have to do anything, in the second case we only have to compare the category ID of the banner with some ID that we saved before. So we don't need any data from the categories table.

However, if we filter by category AND a tag/metakey/whatever, we are trying to filter also by category metadata and that fails before this patch. Please test again.

avatar waader
waader - comment - 15 Jan 2015

So here is my next try. The ingredients:

  • add a banner client
  • add a banner category and optionally enter a "tag" in the "Meta Keys" field eg. test1
  • add a banner and assign the client and the category and optionally enter a "tag" in the "Meta Keys" field eg. test1

You have to enter a "tag" in the banner or/and the banner category.

  • add a banner module with the following parameters:
    • Client=No client
    • Search by Tag=Yes
    • Randomize=Sticky, Randomize
    • position=Banner in Protostar
  • add an article and enter a "tag" in the "Meta Keys" field eg. test1
  • assign the article to a menu item
  • go to the frontend and invoke the menu item

Before the patch you should see notices like:

Warning: Invalid argument supplied for foreach() in joomla34\components\com_banners\models\banners.php on line 201

After the patch the banner is display correctly.

Note that you have to assign a client to the banner otherwise the banner will not show up in the frontend. As the client is not a mandatory field in the banner it should also work without assigning a client.

Anyway: the problem is solved
@test success!

#cjtop can you please check this patch also?

avatar waader waader - test_item - 15 Jan 2015 - Tested successfully
avatar wmgraf
wmgraf - comment - 31 Jan 2015

@test success!
Before the patch I saw the described notices.
After applying the patch the banner module shows not any longer that notices.
And on the fitting article including the keyword the banner is displayed correctly.

avatar brianteeman
brianteeman - comment - 31 Jan 2015

Two good tests setting RTC

This comment was created with the J!Tracker Application at
avatar brianteeman brianteeman - change - 31 Jan 2015
Status Pending Ready to Commit
avatar brianteeman brianteeman - change - 31 Jan 2015
Labels Added: ?
avatar roland-d roland-d - close - 1 Feb 2015
avatar zero-24 zero-24 - close - 1 Feb 2015
avatar roland-d roland-d - change - 1 Feb 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-02-01 20:22:14
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment