Pending

User tests: Successful: Unsuccessful:

avatar wakqasahmed
wakqasahmed
14 Sep 2026

Pull Request resolves #47797.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

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.

Testing Instructions

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:

  1. Global Configuration > System > Cache: set to Conservative Caching.
  2. Open a category blog page whose articles use tags.
  3. Visit it once with ?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.

Actual result BEFORE applying this Pull Request

Tag filter is ignored on cached category pages — whichever tag was requested first gets served for all subsequent tag values until the cache expires.

Expected result AFTER applying this Pull Request

Each filter_tag value gets its own cache entry, so the category page correctly reflects the requested tag filter even with caching enabled.

Link to documentations

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

avatar wakqasahmed wakqasahmed - open - 14 Sep 2026
avatar wakqasahmed wakqasahmed - change - 14 Sep 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2026
Category Front End com_content
avatar richard67 richard67 - change - 15 Sep 2026
Title
[AI] Fix tag filter ignored on cached category pages (#47797)
[5.4] [AI] Fix tag filter ignored on cached category pages (#47797)
avatar richard67 richard67 - edited - 15 Sep 2026

Add a Comment

Login with GitHub to post a comment