PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Reda-Muhamed
Reda-Muhamed
24 Aug 2026

Pull Request resolves #48294 .

  • 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

Fixes banners being displayed and opened when their primary category is unpublished or inaccessible to the current user.

The Banners module now filters banners by the published state and access level of their primary category. The direct banner click endpoint applies the same checks, so unavailable banners cannot redirect users or increment click counts.

Testing Instructions

  1. Create and publish a banner with a valid click URL.
  2. Assign it to a published banner category and display it with the Banners module.
  3. Confirm the banner is displayed and its direct click URL works.
  4. Set the category access to Registered.
  5. Visit the page and direct click URL as a guest.
    • The banner must not be displayed.
    • The direct click URL must return 404 and not increment clicks.
  6. Repeat steps 4–5 after unpublishing the category.

Actual result BEFORE applying this Pull Request

Banners are displayed by the Banners module even when their primary category is unpublished or inaccessible to the current user.

The direct banner click URL also redirects to the destination and increments the click count in both cases.

Expected result AFTER applying this Pull Request

Banners are not displayed when their primary category is unpublished or inaccessible to the current user.

The direct banner click URL returns a 404 response and does not increment the click count.

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

avatar Reda-Muhamed Reda-Muhamed - open - 24 Aug 2026
avatar Reda-Muhamed Reda-Muhamed - change - 24 Aug 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2026
Category Front End com_banners
avatar Reda-Muhamed Reda-Muhamed - change - 24 Aug 2026
Title
[6.2] Respect category access when displaying banners
[6.2] Respect category access/published when displaying banners
avatar Reda-Muhamed Reda-Muhamed - edited - 24 Aug 2026
avatar brianteeman
brianteeman - comment - 24 Aug 2026

This isnt going to be enough. You will need to modify the module as well so that it doesnt display at all when there are no banners to display.

To test this

create one banner in a category and set the category to be unpublished
Publish the banner module in the sidebar-right with it set to select banners from the unpublished category

Expected behaviour

image

Actual behaviour

image
avatar Reda-Muhamed
Reda-Muhamed - comment - 24 Aug 2026

This isnt going to be enough. You will need to modify the module as well so that it doesnt display at all when there are no banners to display.

To test this

create one banner in a category and set the category to be unpublished Publish the banner module in the sidebar-right with it set to select banners from the unpublished category

Expected behaviour

image ### Actual behaviour image

But i think it's not related to this PR
Should we do that in the same PR?

avatar brianteeman
brianteeman - comment - 24 Aug 2026

it is related to this PR imho and should be in the same PR. Otherwise if we end up with only one of them you will have unexpected output on existing sites

avatar Reda-Muhamed Reda-Muhamed - change - 24 Aug 2026
Labels Added: PR-6.2-dev
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2026
Category Front End com_banners Front End com_banners Modules
avatar Reda-Muhamed
Reda-Muhamed - comment - 24 Aug 2026

it is related to this PR imho and should be in the same PR. Otherwise if we end up with only one of them you will have unexpected output on existing sites

done, can you check please?

avatar Reda-Muhamed
Reda-Muhamed - comment - 24 Aug 2026

it is related to this PR imho and should be in the same PR. Otherwise if we end up with only one of them you will have unexpected output on existing sites

done @brianteeman, can you check please?

avatar brianteeman brianteeman - test_item - 24 Aug 2026 - Tested successfully
avatar brianteeman
brianteeman - comment - 24 Aug 2026

I have tested this item ✅ successfully on 6ce5615


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48296.

avatar brianteeman
brianteeman - comment - 24 Aug 2026

I have tested this item ✅ successfully on 6ce5615


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48296.

avatar richard67
richard67 - comment - 24 Aug 2026

@Reda-Muhamed Please read https://github.com/joomla/joomla-cms#which-branch-should-my-pull-request-target

If this is a bug fix and the bug exists in 5.4 and 6.1, too, then a PR should be made for the 5.4-dev branch.

In addition, please link to issue #46351 . I have closed your issue as duplicate report.

In future, please check other a text search on GitHub if there is already an issue before opening a new one.

Opening duplicate issues and creating PRs for a more or less randomly chosen target branch causes unnecessary work for maintainers.

Thanks in advance.

avatar Reda-Muhamed
Reda-Muhamed - comment - 24 Aug 2026

@Reda-Muhamed Please read https://github.com/joomla/joomla-cms#which-branch-should-my-pull-request-target

If this is a bug fix and the bug exists in 5.4 and 6.1, too, then a PR should be made for the 5.4-dev branch.

In addition, please link to issue #46351 . I have closed your issue as duplicate report.

In future, please check other a text search on GitHub if there is already an issue before opening a new one.

Opening duplicate issues and creating PRs for a more or less randomly chosen target branch causes unnecessary work for maintainers.

Thanks in advance.

I had initially planned to target 5.4-dev, but I found some differences between 5.4 and 6.2 that could cause conflicts, so I targeted 6.2 instead
Regarding the issue you mentioned, it covers the category access scenario, but not the unpublished-category scenario
Thank you for the clarification :)

Add a Comment

Login with GitHub to post a comment