Open Closed

Cannot add users/roles #2382


User avatar
0
nhath created

Hi there,

I have had an issue with adding a new user/role, clicking on the New Role or New User it does nothing but I can add the others like Organize Units, Clients.....I tried to remove all my custom but it still doesn't work.

  • ABP Framework version: v4.4.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: No
  • Steps to reproduce the issue:"

Regards,


10 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi @nhath, do you see any error on the console?

  • User Avatar
    0
    nhath created

    Hi @nhath, do you see any error on the console?

    Hi @EngincanV, No, I don't.

  • User Avatar
    0
    nhath created

    Hi @nhath, do you see any error on the console?

    here is the screenshot

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    I tried to remove all my custom but it still doesn't work.

    Hi @nhath, as I understand you've customized the CreateModal for Users and Roles pages. Please check does your models' forms' have asp-page="/Identity/Users/CreateModal" attribute for Users page and also for roles page (asp-page="/Identity/Roles/CreateModal").

    https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml

    And if you also changed the Index.js file of those pages, check do you open the models when you clicked the related buttons. (https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js#L140)

  • User Avatar
    0
    nhath created

    I tried to remove all my custom but it still doesn't work.

    Hi @nhath, as I understand you've customized the CreateModal for Users and Roles pages. Please check does your models' forms' have asp-page="/Identity/Users/CreateModal" attribute for Users page and also for roles page (asp-page="/Identity/Roles/CreateModal").

    https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml

    And if you also changed the Index.js file of those pages, check do you open the models when you clicked the related buttons. (https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js#L140)

    Hi @EngincanV,

    sorry for the confusion. I did customize on the login/register forms only. for Users and Roles pages, I am using it as OOTB.

  • User Avatar
    0
    nhath created

    For Edit/Delete Users/Roles forms, they are still working properly.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Can you send the project to engin.veske@volosoft.com?

  • User Avatar
    0
    nhath created

    Can you send the project to engin.veske@volosoft.com?

    I sent my project to your email. Please check

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Can you send the project to engin.veske@volosoft.com?

    I sent my project to your email. Please check

    Thanks @nhath, I will check and share a solution with you asap.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi again @nhath, I've shared the solution with you via email, you can check your email. But I also want to share it here to help developers who can face the same problem.

    • If you define a toolbar content for "New User" or "New Role" buttons, you need to specify the toolbar wrapper id as AbpContentToolbar.

    So instead of defining like below,

    <div id="my-toolbar-content" class="text-lg-right">
        @await RenderSectionAsync("my-toolbar-content", false)
    </div>
    

    you should define like follows:

    <div id="AbpContentToolbar" class="text-lg-right">
        @await RenderSectionAsync("my-toolbar-content", false)
    </div>
    

    I close the question since your problem should be fixed, but if it still persists please don't hesitate to re-open the question. Best Regards.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11