User tests: Successful: Unsuccessful:
Pull Request resolves #47797.
With System Cache set to Conservative or Progressive, com_content's category view caches its output keyed only by a whitelist of "safe" URL parameters (Cache::makeId() in libraries/src/Cache/Cache.php, fed by $app->registeredurlparams). com_content's DisplayController registers catid, filter, filter_order, etc. as safe params, but never filter_tag — so a request for ?filter_tag=2 gets served whatever was cached for that category first, tag filter or not, since the cache ID doesn't change when the tag changes.
Added filter_tag (as INT, matching how both CategoryModel and ArticlesModel already read it) to the $safeurlparams array in components/com_content/src/Controller/DisplayController.php, so the tag filter is now part of the cache key.
I traced this by reading the actual cache-key code (ViewController::_makeId() → Cache::makeId()) rather than assuming from the issue description, and confirmed the whitelist is the only thing that determines what varies the cache ID. I didn't add an automated test — this is a single-entry addition to a static safe-URL-parameter list, and exercising it end-to-end would need a full running Joomla install with page/view caching enabled (this repo's existing coverage for that is Cypress system tests against a live instance, not something a unit test can reach). Manual verification matches the reporter's own repro:
?filter_tag=1, then again with ?filter_tag=2 (or vice versa) — before this fix, the second request returns the same cached HTML as the first; after the fix, each tag value gets its own cache entry and the filter is respected.Tag filter is ignored on cached category pages — whichever tag was requested first gets served for all subsequent tag values until the cache expires.
Each filter_tag value gets its own cache entry, so the category page correctly reflects the requested tag filter even with caching enabled.
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
(Rebased onto current 5.4-dev from #48445, which had fallen behind; same commit content.)
| Status | New | ⇒ | Pending |
| Category | ⇒ | Front End com_content |
| Title |
|
||||||
You're right, and I should have traced this further before opening the PR. The tag-filter select on the Category List view (tmpl/category/default_articles.php) lives inside a real <form method="post">, submitted via a button, not auto-submitted or GET. That POST request has vName='category' with layout='default' (not blog), which hits the existing cache-disable condition at DisplayController.php:81-87 before $safeurlparams/filter_tag is ever consulted. So the fix here has no effect on the real, reachable path — the collision I reported only reproduces by editing the URL directly as a GET request, which isn't how this control is actually used. Closing this out.
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-09-19 04:06:05 |
| Closed_By | ⇒ | wakqasahmed | |
| Labels |
Added:
bug
PR-5.4-dev
|
||
@joomdonation Should the corresponding issue be closed, too?
what about extensions - surely they can have this problem
| Status | Closed | ⇒ | New |
| Closed_Date | 2026-09-19 04:06:05 | ⇒ | |
| Closed_By | wakqasahmed | ⇒ | |
| Labels |
Removed:
bug
|
||
| Status | New | ⇒ | Pending |
Sorry my bad. Check it more carefully, I see that tags can be selected at Category Blog layout, so this PR appears to be valid
Thanks for taking a second look — glad it's not actually dead code. To close the loop on my last comment: I was wrong to retract, I'd only traced the Category List / Filter Field=Tags path and missed that Category Blog also exposes the tag filter and hits the same cache key. Leaving this open, no changes needed to the diff itself.
@brianteeman on extensions — this PR only touches core's com_content cache-key whitelist, so it can't fix a third-party extension's own caching logic, but any extension that reuses com_content's category view (rather than rolling its own controller) would pick up the same fix for free once this lands.
My comment was more to @joomdonation as there are extensions that add filtering etc
I have tested this item 🔴 unsuccessfully on 3cc89fc
Tested with JBT
scripts/memcached 54 on and installed Blog sample dataindex.php/blog?filter_tag=2 and index.php/blog?filter_tag=5 get the same result,filter_tag parameter w/o the need to clean cachefilter_tag=42 shows correct 'There are no articles in this category. ...'index.php/blog w/o filter_tag still depends on cache,filter_tag=2 was used first the article tagged Millions is used andfilter_tag=5 was used first the article tagged with Love/Joomla is used w/o filter_tag parameterindex.php/blog depends on previous used filter_tag parameter, even w/ full page reloadindex.php/blog never shows me all Category Blog articlesI have tested this item 🔴 unsuccessfully on 3cc89fc
Tested with JBT
scripts/memcached 54 on and installed Blog sample dataindex.php/blog?filter_tag=2 and index.php/blog?filter_tag=5 get the same result,filter_tag parameter w/o the need to clean cachefilter_tag=42 shows correct 'There are no articles in this category. ...'index.php/blog w/o filter_tag still depends on cache,filter_tag=2 was used first the article tagged Millions is used andfilter_tag=5 was used first the article tagged with Love/Joomla is used w/o filter_tag parameterindex.php/blog depends on previous used filter_tag parameter, even w/ full page reloadindex.php/blog never shows me all Category Blog articlesThis pull request has been automatically rebased to 6.2-dev. Joomla! 5.4 is now in security only mode.
| Title |
|
||||||
Users should test it by doing something on the page (for example, select a tag), not by change variable directly on URL as you describe.
From what I see, the filter_tag input is only used on Category List menu item type when Filter Field parameter in the menu item set to Tags. And for that operation, we do not allow caching view output, see the code https://github.com/joomla/joomla-cms/blob/5.4-dev/components/com_content/src/Controller/DisplayController.php#L81-L87 , so the change you made here is useless.