Open pavvlik777 opened 1 month ago
Hi @pavvlik777 - thanks for reporting your issue, I will check it!
I have checked it and it works correctly for me. Id is not stored in hidden field but it is correctly populated from URL. Are you sure that you do not have some client twice? Thanks.
Hi, thanks for response.
I double-checked client id and didn't find any duplicates in db. I was able to reproduce same issue by creating new client and clicking 'save client' immediately after that. I was redirected to creation page and id disappeared from URL.
Also I noticed that adding clientId manually to form URL like this fixes issue.
What version of Admin UI do you use?
2.3.0
Let me check it again.
Adding of <input type="hidden" asp-for="Id" />
resolved this issue?
Yes
OK, I will merge your PR and release it in release 2.4.0. Thank you.
Can you also check console in your browser in case that you have some JS errors?
No js errors
Why do you have ?area=AdminUI
in your links?
Looks like it's added automatically on all links, but there were no specific adjustments to achieve this from my side.
Ok, interesting, I have never seen it before. 😁
Describe the bug
When clicking 'Save Client' button client is not updated and 'Client Id clientId already exists' error received
To Reproduce
Result
Error received
Expected result
Client is successfully updated
Notes
It appears that issue is caused by missing
<input type="hidden" asp-for="Id" />
tag on client configuration page. Because of that model.Id is 0 on POST request and backend trying to create client rather than update existing. Issue wasn't happening on 1.1.0 version, because there was tag on basics tab.