[5.4] Generate unique alias on “Save as Copy” for Smart Search filters#46081
[5.4] Generate unique alias on “Save as Copy” for Smart Search filters#46081muhme merged 19 commits intojoomla:5.4-devfrom
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. |
|
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: ... |
|
I am not going to test this because I think the current behaviour is the correct behaviour:
It avoids copies by accident. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46081. |
|
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
|
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. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46081. |
@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. |
|
✅ 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. |
|
Thank you @travisrisner for your contribution. Thank you @alikon for your support. Thank you @dautrich, @brianteeman, @ceford and @mothershedc for testing. |
@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. |
Pull Request for Issue #43969 .
Summary of Changes
Ensures that a unique alias and title is generated whenever
com_findersearch 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