User tests: Successful: Unsuccessful:
Pull Request resolves #43627
Removed the condition && $includeChildren != 1 from the HAVING clause check in TagsHelper::getTagItemsQuery().
File changed: libraries/src/Helper/TagsHelper.php (line 418)
Before:
if ($ntagsr > 1 && $anyOrAll != 1 && $includeChildren != 1) {After:
if ($ntagsr > 1 && $anyOrAll != 1) {This change allows the "Match All" setting to work correctly when "Include Child Tags" is enabled. Previously, the HAVING clause was skipped entirely when child tags were included, causing the query to default to "Match Any" behavior.
Step 1: Create test tags
Step 2: Create test articles
Navigate to Content → Articles
Create the following three articles:
| Article Title | Tags to assign |
|---|---|
| Article 1 | Only Tag A (Fruits) |
| Article 2 | Tag A (Fruits) AND Tag B (Vegetables) |
| Article 3 | Only Tag B (Vegetables) |
For each article, click Save & Close
Step 3: Create the menu item
Step 4: Test on the frontend
Only Article 2 appears (the article that has both Tag A and Tag B)
When "Match Type: All" and "Child Tags: Include" are both selected with two or more tags:
When "Match Type: All" and "Child Tags: Include" are both selected with two or more tags:
To verify that the fix works correctly with child tags, please run the following additional tests using the same menu item (keep "Match Type: All" and "Child Tags: Include" selected):
Test 1: Replace Tag A (e.g., "Fruits") with one of its children, e.g., "Apples". Keep Tag B as "Vegetables".
Expected result: Same as before — only Article 2 appears (because Article 2 has both "Apples" from Tag A's family and "Vegetables" from Tag B's family).
Test 2: Replace Tag B (e.g., "Vegetables") with one of its children, e.g., "Carrots". Keep Tag A as "Fruits".
Expected result: Same as before — only Article 2 appears (because Article 2 has both "Fruits" from Tag A's family and "Carrots" from Tag B's family).
Test 3: Replace Tag A (e.g., "Fruits") with one of its children, e.g., "Apples", AND replace Tag B (e.g., "Vegetables") with one of its children, e.g., "Carrots".
Expected result: Same as before — only Article 2 appears (because Article 2 has both "Apples" from Tag A's family and "Carrots" from Tag B's family).
Test 4: Replace only one tag (either Tag A or Tag B) with a child tag, and ensure the other tag is NOT present in any article.
Expected result: No articles appear (because no article has tags from both families).
These tests confirm that the "Match All" logic correctly follows tag hierarchies when child tags are included, regardless of whether the selected tags are parents or children.
Link to documentations
Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Labels |
Added:
PR-5.4-dev
|
||
Tested successfully on 5.4.5 with Patchtester
Tested successfully on 5.4.5 with Patchtester
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47742.
@MacJoom Have you used the blue "Test this" button in the issue tracker? It seems your test was not counted. See https://issues.joomla.org/tracker/joomla-cms/47742 .
I have tested this item ✅ successfully on 3d9fc3b
I have tested this item ✅ successfully on 3d9fc3b
I have tested this item ✅ successfully on 3d9fc3b
This should be documented so that existing site operators who have worked around this issue can quickly find the information they need.
I have tested this item ✅ successfully on 3d9fc3b
This should be documented so that existing site operators who have worked around this issue can quickly find the information they need.
| Status | Pending | ⇒ | Ready to Commit |
RTC
RTC
| Labels |
Added:
RTC
bug
|
||
@CSGoat0 Final test before merge seems to have failed?
✅ Applied PR with Patch Tester and the list of articles is reduced for 5-Fruits-And-Vegetables-All-Include and 9-Apples-Oranges-Banana-All-Include. This is correct, e.g. for 9-Apples-Oranges-Banana-All-Include before was the Banana article with only one tag in the list.
❌ For 5-Fruits-And-Vegetables-All-Include the list is reduced, but contains Granny-Smith-Blood-Orange which are two fruits and there is no vegetable tag? I would not expect this article listed.
As there is a lot of configuration it may be easier to import files and database as 47742.zip and 47742.sql – I will share the files for some days. If you use JBT you can simple use scripts/import 47742.sql 47742.zip. Superadmin is ci-admin with joomla-17082005.
I have tested this item 🔴 unsuccessfully on bb871ac
I have tested this item 🔴 unsuccessfully on bb871ac
| Status | Ready to Commit | ⇒ | Pending |
back to pending
back to pending
back to pending
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47742.
Hi @muhme, Thanks for the testing.
Could you please provide the exact tags assigned to the article "Granny-Smith-Blood-Orange"?
back to pending
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47742.
Hi @muhme, Thanks for the testing.
Could you please provide the exact tags assigned to the article "Granny-Smith-Blood-Orange"?
Hi @muhme, Thanks for the testing.
Could you please provide the exact tags assigned to the article "Granny-Smith-Blood-Orange"?
Tested successfully on 5.4.5 with Patchtester
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47742.