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 |
|
||||||