User tests: Successful: Unsuccessful:
…le tags
Pull Request resolves #46751 .
Fixes incorrect article counts in the Tags – Popular module when a content item is assigned multiple tags.
The module previously used COUNT(*), which resulted in inflated counts due to row multiplication in the many-to-many join between #__contentitem_tag_map and #__ucm_content.
This change replaces COUNT(*) with:
COUNT(DISTINCT m.core_content_id)
to ensure unique content items are counted per tag.
Create two tags (e.g., Tag1 and Tag2).
Create Article 1 and assign both Tag1 and Tag2.
Create Article 2 and assign Tag1.
Create Article 3 and assign Tag1.
Enable the Tags – Popular module with “Display Number of Items” enabled.
Tag1 → 4
Tag2 → 2
Counts are inflated when an article has multiple tags.
Tag1 → 3
Tag2 → 1
Each tag correctly reflects the number of unique associated content items.
core_content_id is defined as NOT NULL, making it safe for DISTINCT aggregation.
No schema changes.
No API changes.
Minimal modification (single-line change).
Verified in normal mode with cache cleared and debug disabled.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Modules Front End |
Thank you for the clarification. I will retarget the fix to the 5.4 branch as suggested.
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-02-24 17:54:17 |
| Closed_By | ⇒ | adarshdubey03 | |
| Labels |
Added:
PR-6.1-dev
|
||
as the issue are you trying to fix #46751 has been reported from 5.x and marked as bug you should do your pr on branch 5.4