Language Change PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar harshkhatri8
harshkhatri8
6 Oct 2025

Pull Request for Issue #45603
Fixes #45603

Screenshot 2025-10-06 221905

Summary of Changes

-Updated ClientModel.php to prevent duplicate client names when using Save as Copy.
-Implemented automatic unique name generation: if a client with the same name exists, the system appends (2), (3), etc.
-Preserves the original Save as Copy functionality without breaking existing save operations.

Testing Instructions

-Go to Components → Banners → Clients in Joomla Administrator.
-Select an existing client,.
-Click Save as Copy multiple times.
-Verify that each new client is created with a unique name:
-Confirm that no duplicates are created in the database and all other save functionality works as expected.

Actual result BEFORE applying this Pull Request

-Clicking Save as Copy creates a client with the same name as the original, allowing duplicates.

Expected result AFTER applying this Pull Request

-Clicking Save as Copy automatically generates a unique client name, preventing duplicates while preserving the copy functionality.

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 harshkhatri8 harshkhatri8 - open - 6 Oct 2025
avatar harshkhatri8 harshkhatri8 - change - 6 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Oct 2025
Category Administration com_banners Language & Strings
avatar brianteeman
brianteeman - comment - 6 Oct 2025

This is obviously not correct. With this pr you can never Save as copy so why keep the button. Please look at how Save as copy works elsewhere!

avatar harshkhatri8 harshkhatri8 - close - 6 Oct 2025
avatar harshkhatri8 harshkhatri8 - change - 6 Oct 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-10-06 16:26:19
Closed_By harshkhatri8
Labels Added: Language Change PR-5.3-dev
avatar harshkhatri8 harshkhatri8 - change - 6 Oct 2025
Status Closed New
Closed_Date 2025-10-06 16:26:19
Closed_By harshkhatri8
avatar harshkhatri8 harshkhatri8 - change - 6 Oct 2025
Status New Pending
avatar harshkhatri8 harshkhatri8 - reopen - 6 Oct 2025
avatar harshkhatri8
harshkhatri8 - comment - 6 Oct 2025

This is obviously not correct. With this pr you can never Save as copy so why keep the button. Please look at how Save as copy works elsewhere!

Thanks for the feedback, @brianteeman. I see your point now — my current PR prevents Save as Copy from working as intended. I’ll update the PR so that:

Save / Save & Close still prevent duplicates.

Save as Copy will create a copy automatically, appending a suffix like it works if a client with the same name exists.

This should fix the original issue while keeping Joomla’s copy functionality intact. I’ll push an updated version soon.

avatar harshkhatri8 harshkhatri8 - change - 6 Oct 2025
The description was changed
avatar harshkhatri8 harshkhatri8 - edited - 6 Oct 2025
avatar harshkhatri8
harshkhatri8 - comment - 6 Oct 2025

This is obviously not correct. With this pr you can never Save as copy so why keep the button. Please look at how Save as copy works elsewhere!

i have made all the necessary changes can you please now review it.
Screenshot 2025-10-06 221905

avatar richard67
richard67 - comment - 6 Oct 2025

@harshkhatri8 When you create a PR you should check how your changes look on GitHub: https://github.com/joomla/joomla-cms/pull/46239/files . Then you would see it has a bunch of code style issues.

Add a Comment

Login with GitHub to post a comment