bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar travisrisner
travisrisner
12 Jun 2025

Pull Request for Issue #45570

Summary of Changes

This PR fixes an issue where Joomla allows the creation of multiple banners with the same alias within the same category, despite the code intending to enforce alias uniqueness.

Previously, the alias uniqueness check existed only within the update functionality of the store function in the BannerTable class, meaning it was bypassed during insert operations. This PR moves the uniqueness validation outside of the update logic so that it runs consistently during both insert and update operations.

I agree with Brian's comment on the initial issue though, I'm not fully sure what the alias is actually used for.

Testing Instructions

  1. In the Joomla administrator, go to Components → Banners.
  2. Create a new banner and name it "test".
  3. Try to create a second banner also named "test" in the same category.

Actual result BEFORE applying this Pull Request

  • Both banners are saved, resulting in two entries with the same alias in the same category.

Expected result AFTER applying this Pull Request

  • Saving the second banner fails with an error.
  • Only one banner with a specific alias per category is allowed.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar travisrisner travisrisner - open - 12 Jun 2025
avatar travisrisner travisrisner - change - 12 Jun 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Jun 2025
Category Administration com_banners
avatar travisrisner travisrisner - change - 12 Jun 2025
Labels Added: PR-5.3-dev
avatar chmst
chmst - comment - 12 Jun 2025

I am wondering if it makes sense to have the same banner (name and alias) for different clients?

avatar travisrisner
travisrisner - comment - 12 Jun 2025

I am wondering if it makes sense to have the same banner (name and alias) for different clients?

That's a good question, and I'm really not sure. It doesn't appear there's anything from stopping 2 banners from having the same name.

As far as the alias, I'm really not sure that the alias is actually used for anything. I can't find anything it's used for on the component or the banner module, but it could be something someone added as a plan for the future? I tested out the links it generates for tracking clicks and none of that uses an alias it seems at the moment, it's all pretty much ID based.

avatar rdeutz rdeutz - change - 25 Jun 2025
Labels Added: bug

Add a Comment

Login with GitHub to post a comment