Exclude also child categories doesn't work

Search
Other Bug Reports questions
Forum

Exclude also child categories doesn't work

Lukas Erhart's Avatar Lukas Erhart
Hi,
I think there's a bug in the exclusion in combination with the childs configuration.

What I want to accomplish:
- Show a module on all virtuemart category pages except one category-tree (has multiple nested child-category-trees).

How I tried it:
- Set matching method to all
- Set all assignments to ignore
- Set Virtuemart Page Types to include and select categories and category layout
- Set Virtuemart Categories to exclude and select a parent category, then also childs to yes and tick both page-type checkboxes

Now the module will be shown an all category-pages expect the selected parent category.
The childs of this parent category also are showing the module and that shouldn't be the case with this configuration.

I've debugged this and the problem comes from the line 94 in the file VirtuemartCategory.php.
If you change the line
from
if ( ! $pass && $this->params->inc_children)
to
if ( $this->params->inc_children)
the whole exclusion does also work on the childs.

As I saw in all other ...Category.php files, it's always the same code, so I think this bug affects all others with a child option too.
Sure it's not the best fix but it does work.


Greetings
Peter van Westen's Avatar Peter van Westen ADMIN
The logic is ok in my files, and it seems to work fine for me with normal article categories for instance.

Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Lukas Erhart's Avatar Lukas Erhart
I've made now a new demo-installation with the Virtuemart-Demo package and installed only their sample-data und the advanced module manager.
Then I made two modules which show up in the sidebar.
One should be shown on all virtuemart categories expect the tree "Wear".
The other should only be shown on this "Wear" tree.

The issue is the same - the first module is not visible on "Wear" but is visible on "Lady" which is a child of "Wear".

And I've testet in this installation the Joomla article categories too - you're right, there it's working how it should.

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, found the issue.
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Lukas Erhart's Avatar Lukas Erhart
Thanks for this quick response - now it's working how it should.
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, great 🙂
The fix will be included in the next release.
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in