User tests: Successful: Unsuccessful:
Pull Request for Issue #45603
Fixes #45603
-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.
-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.
-Clicking Save as Copy creates a client with the same name as the original, allowing duplicates.
-Clicking Save as Copy automatically generates a unique client name, preventing duplicates while preserving the copy functionality.
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_banners Language & Strings |
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
|
Status | Closed | ⇒ | New |
Closed_Date | 2025-10-06 16:26:19 | ⇒ | |
Closed_By | harshkhatri8 | ⇒ |
Status | New | ⇒ | Pending |
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.
@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.
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!