-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.4] Generate unique alias on “Save as Copy” for Smart Search filters #46081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.4-dev
Are you sure you want to change the base?
[5.4] Generate unique alias on “Save as Copy” for Smart Search filters #46081
Conversation
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. |
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. |
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. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46081. |
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. |
@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.. |
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. |
No it adds the number to the alias |
maybe we need to display the alias in the list view? |
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. |
Done |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46081. |
This pull request has been automatically rebased to 5.4-dev. |
So it seems we have 2 ways to fix what @ceford mentioned. Either we change this PR so it makes sure we have a unique title (and so unique alias, too), then we won't have duplicates in the filter. Or we change the filter to remove duplicates coming from (still allowed) duplicate titles, but then we should show the alias also in the list, like we e.g. do it for categories (if I remember right). Not sure what's better. |
My last commit should ensure that the title is unique as well. I can make changes so that we show the alias in the table as well if we want to go that route. |
@travisrisner Sorry, I missed that. I see now it is ok.
@travisrisner If that is easily possible, please go for it. It could help with old filters entered in the past which have a duplicate title. |
Back to pending after recent changes. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46081. |
@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. |
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>
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: ... |
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
Actual result BEFORE applying this Pull Request
Save failed with the following error: Another Filter has the same alias.
Expected result AFTER applying this Pull Request
my-filter-2
,my-filter-3
, …) and a unique title.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