This PR fix issue #32829. category view uses different key to get form data from session, so we need to override save method in the controller to set this data using the right key.
Testing Instructions
Access to Content -> Categories, create a new category
Enter an existing Alias into Alias field (so that category could not be saved)
Apply patch
Before patch: Error message displayed, but form data lost when you are redirected back to add category screen
After patch: Error message displayed, you are redirected back to add category screen but the data you entered before is kept so that you don't have to re-enter.
Click on Cancel button to cancel adding the category with that same Alias, you will be redirected back to Categories List screen.
Press New button to add new category again, make sure you don't see the old data from previous failed add.
Thanks @SharkyKZ for reviewing the PR, didn't think about that cancel action. I updated the code and should fix your reported issue now. I also updated testing instructions to include your test case.
@ceford@alikon When you have time, please help testing it again.
I have tested this item✅ successfully on d9d8e03
Works as described.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32959.