Skip to content

[5.4] Generate unique alias on “Save as Copy” for Smart Search filters#46081

Merged
muhme merged 19 commits intojoomla:5.4-devfrom
travisrisner:5.3-search-filter-copy-bug
Nov 6, 2025
Merged

[5.4] Generate unique alias on “Save as Copy” for Smart Search filters#46081
muhme merged 19 commits intojoomla:5.4-devfrom
travisrisner:5.3-search-filter-copy-bug

Conversation

@travisrisner
Copy link
Contributor

@travisrisner travisrisner commented Sep 12, 2025

Pull Request for Issue #43969 .

Summary of Changes

Ensures that a unique alias and title is generated whenever com_finder search filters are duplicated when using the Save as Copy feature. The alias is also added to the list view.

Testing Instructions

  1. Administrator → Components → Smart SearchFilters
  2. Create a filter named My Filter and click Save.
  3. Click Save as Copy and repeat multiple times.

Actual result BEFORE applying this Pull Request

  • Error: Save failed with the following error: Another Filter has the same alias.

Expected result AFTER applying this Pull Request

  • Copies save successfully with incremented aliases (e.g., my-filter-2, my-filter-3, …) and a unique title.
  • Alias is displayed in the list view to help identify conflicting aliases from previous copies.

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

@dautrich
Copy link

I have tested this item ✅ successfully on 95a2471


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

@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on 8d08537


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

@ceford
Copy link
Contributor

ceford commented Sep 18, 2025

I have tested this item ✅ successfully on 8d08537


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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 18, 2025
alikon
alikon previously requested changes Sep 18, 2025
@richard67 richard67 removed the RTC This Pull Request is Ready To Commit label Sep 18, 2025
@richard67
Copy link
Member

Back to pending due to requested changes (use prepared statements).


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

@richard67 richard67 added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Sep 18, 2025
@richard67 richard67 removed the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Sep 18, 2025
@richard67
Copy link
Member

@ceford @brianteeman @dautrich Could one of you guys test this PR again with the latest changes? That would be great. One test if it still works is sufficient..

@ceford
Copy link
Contributor

ceford commented Sep 18, 2025

Actually, I think there is a problem! Saving with the patch applied does work. But the list of filters has duplicate titles and there is no way to tell which is which. I seem to remember that other duplicates add the instance number to the title.


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

@brianteeman
Copy link
Contributor

No it adds the number to the alias

@brianteeman
Copy link
Contributor

maybe we need to display the alias in the list view?

@dautrich
Copy link

I have tested this item ✅ successfully on ed98e28


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

@dautrich
Copy link

@ceford @brianteeman @dautrich Could one of you guys test this PR again with the latest changes? That would be great. One test if it still works is sufficient..

Done

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 27, 2025
@richard67 richard67 added the RMDQ ReleaseManagerDecisionQueue label Oct 17, 2025
@richard67
Copy link
Member

Back to pending after recent changes.


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

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Oct 17, 2025
@richard67 richard67 removed the RMDQ ReleaseManagerDecisionQueue label Oct 17, 2025
@richard67
Copy link
Member

@travisrisner Could you update the description or the testing instructions to reflect the latest changes (title also handled, alias added to list view)?

@brianteeman @ceford @dautrich Could you test again with the latest changes?

Thanks in advance.

travisrisner and others added 4 commits October 17, 2025 08:17
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Thanks!

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
@ceford
Copy link
Contributor

ceford commented Oct 19, 2025

When I use Save as Copy (in any context) I sometimes forget to change the alias, or even the Title. So I prefer the status quo: Save failed with the following error: ...

@ceford
Copy link
Contributor

ceford commented Nov 3, 2025

I am not going to test this because I think the current behaviour is the correct behaviour:

Error: Save failed with the following error: Another Filter has the same alias.

It avoids copies by accident.


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

@dautrich
Copy link

dautrich commented Nov 4, 2025

I have tested this item ✅ successfully on 7bf3608


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

1 similar comment
@mothershedc
Copy link

I have tested this item ✅ successfully on 7bf3608


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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 5, 2025
@muhme
Copy link
Contributor

muhme commented Nov 6, 2025

I am not going to test this because I think the current behaviour is the correct behaviour:

Error: Save failed with the following error: Another Filter has the same alias.

It avoids copies by accident.

@ceford Thank you for your comment. The based issue #43969 has been confirmed, and since we have the same behaviour for banners (see #45599), we’ll align it here as well. This approach also ensures that the ‘Save as Copy’ action works as expected, with the numbered results being clear and self-explanatory for users.

@muhme
Copy link
Contributor

muhme commented Nov 6, 2025

✅ Final test before merge with JBT, seen error 'Another Filter has the same alias.' before, graft PR's full package and tested multiple scenarios, the title number and the alias number are created independently and if a number already exist, the following number is taken.

@muhme muhme merged commit 813bfe8 into joomla:5.4-dev Nov 6, 2025
60 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 6, 2025
@muhme muhme added this to the Joomla! 5.4.1 milestone Nov 6, 2025
@muhme
Copy link
Contributor

muhme commented Nov 6, 2025

Thank you @travisrisner for your contribution. Thank you @alikon for your support. Thank you @dautrich, @brianteeman, @ceford and @mothershedc for testing.

@richard67
Copy link
Member

I am not going to test this because I think the current behaviour is the correct behaviour:

Error: Save failed with the following error: Another Filter has the same alias.

It avoids copies by accident.

@ceford Could you test PR #46453 ? It reverts this one here for reasons stated in that PR. It is not finally decided yet which way we go, but testing that PR would help with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

Comments