Base solution for your next web application
Open Closed

Error after extending User entity in .NET Core MVC & jQuery template #8659


User avatar
0
ISTeam created

We are using version 8.1.0 template of ASP .NET Core MVC & jQuery type. As per this documentation of MVC, I tried to add 'Address' field in my project.

It compiles successfully and I can also see 'Address' field in swagger UI call of "/api/services/app/User/GetUsers" api method response.

But when I load the 'Users' page in the 'Administration' tab with my 'admin' login in dev environment I am getting below error: "DataTables warning: table id=UsersTable - Requested unknown parameter '10' for row 0, column 10. For more information about this error, please see http://datatables.net/tn/4"

On UI one column 'Address' is added but data is not reflecting and as 'Address' is not being bind correctly last column 'Creation Time' is empty. It seems column is added in UI as I have defined column in /Users/index.cshtml but it is not being bound correctly via JS.

I have updated below files with 'Address' column:

  1. .Application.Shared/Authorization/Users/Dto/UserEditDto.cs
  2. .Application/Authorization/Users/Exporting/UserListExcelExporter.cs
  3. .Application/Authorization/Users/UserAppService.cs
  4. .Core.Shared/Authorization/Users/UserConsts.cs
  5. .Core/Authorization/Users/User.cs
  6. .Web.Mvc\Areas\App\Views\Users_CreateOrEditModal.cshtml
  7. .Web.Mvc/Areas/App/Views/Users/Index.cshtml
  8. .Web.Mvc/Areas/App/Views/Users/_CreateOrEditModal.cshtml
  9. .Web.Mvc/wwwroot/view-resources/Areas/App/Views/Users/Index.js
  10. .Web.Mvc/wwwroot/view-resources/Areas/App/Views/Users/Index.min.js
  11. .Web.Mvc\wwwroot\view-resources\Areas\App\Views_Bundles\user-list.min.js

When I create a new user from Create popup, it saves the address correctly in the database and I added dummy address for all existing 5 users and in the DB entity its not set as 'Required' field.

Please advice. Thnx.


1 Answer(s)
  • User Avatar
    0
    ISTeam created

    Seemed some browser caching issue. I am not able to login in Chrome browser but I can login via Firefox. To test finally I tried cleaning cache and gave a try in 'Edge' browser and surprisingly it worked! Now its working in Firefox also but not in Chrome. So hopefully full system restart may fix any caching issues!