[Bug]: Resource manager causes error 500
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 54/100
Línea de trabajo
Start with the Resource Manager /API/ResourceManager/Items/GetRoles path and compare its role lookup and caching behavior with the fix in issue #6133 for the Persona Bar and PermissionsGrid. Trace how localized role names reach the roles cache and AdvancedPermissionProvider.GetOrCreateAdvancedRole; done means localized role names no longer corrupt role lookups or cause page requests to return HTTP 500.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is there an existing issue for this?
- I have searched the existing issues
What happened?
On a site whose UI culture localizes role names (fr-FR : GlobalResources.fr-FR.resx ships Content Editors.Role = "Éditeurs de contenu"), the whole site starts returning HTTP 500 on every page, anonymous visitors included, and only an app pool recycle brings it back.
The same issue was fixed for the Persona Bar and PermissionsGrid in #6133 ("Fixes to avoid RoleName localization bleeding into the roles cache"), but the Resource Manager was not covered. Other code that looks a role up by name is affected too, e.g. GetRoleByName(portalId, "Administrators") returns null while the cache is corrupted.
Steps to reproduce?
- DNN 10.3.3, portal with fr-FR enabled (default
GlobalResources.fr-FR.resx, which containsContent Editors.Role). - Log in as an administrator with the UI in French.
- Open the Resource Manager and try to modify a folder name (role names are displayed localized on second tab), then save.
- Browse any page of the site.
Confirmed in production: the IIS logs show a call to /API/ResourceManager/Items/GetRoles just before the first 500.
Current Behavior
Every page returns 500 until the app pool is recycled (some users already logged may see part of the content with 500 errors on modules):
System.ArgumentException: System.Data.SqlClient.SqlException (0x80131904): Violation of UNIQUE KEY constraint 'IX_RoleName'. Cannot insert duplicate key in object 'dbo.Roles'. The duplicate key value is (0, Content Editors).
at DotNetNuke.Security.Roles.DNNRoleProvider.CreateRole(RoleInfo role)
at DotNetNuke.Security.Roles.RoleController.DotNetNuke.Security.Roles.IRoleController.AddRole(RoleInfo role, Boolean addToExistUsers)
at DotNetNuke.Security.Permissions.AdvancedPermissionProvider.GetOrCreateAdvancedRole(Int32 portalId, String roleName)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at DotNetNuke.Security.Permissions.AdvancedPermissionProvider.GenerateVirtualPermissions(List`1 permissions, Int32 portalId, IEnumerable`1 possiblePermissions)
at DotNetNuke.Security.Permissions.AdvancedPermissionProvider.GenerateVirtualTabPermissions(List`1 permissions, Int32 portalId, Int32 tabId)
at DotNetNuke.Security.Permissions.AdvancedPermissionProvider.GetTabPermissions(Int32 tabId, Int32 portalId)
at DotNetNuke.Entities.Tabs.TabInfo.get_TabPermissions()
at DotNetNuke.Security.Permissions.AdvancedPermissionProvider.CanDoOnPage(TabInfo tab, String exactKey)
at DotNetNuke.Security.Permissions.AdvancedPermissionProvider.CanViewPage(TabInfo tab)
at DotNetNuke.UI.Skins.Skin.ProcessMasterModules()
at DotNetNuke.UI.Skins.Skin.OnInit(EventArgs e)
Expected Behavior
Displaying role names in other languages shouldn't cause 500 errors.
Relevant log output
See stacktrace above.
Anything else?
Workaround: remove Content Editors.Role and Content Managers.Role from the GlobalResources.<culture>.resx files. Those roles then show untranslated, and the keys come back with the next upgrade or language pack.
Affected Versions
10.4.1 (latest release)
What browsers are you seeing the problem on?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lenguaje dominante
- C#
- Estrellas
- 1.1k
- Forks
- 791
- Merge medio
- 5 d 7 h
- PR fusionados (30 d)
- 29
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dnnsoftware/Dnn.Platform
-
Status: New
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dnnsoftware/Dnn.Platform#6681 ·
Los mantenedores suelen responder en 3 días
-
Status: New
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
dnnsoftware/Dnn.Platform#6051 · 4 comentarios ·
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
dnnsoftware/Dnn.Platform#7611 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
[Bug]: Cleanup with Wildcard Glob Does not RunPosiblemente ocupada @bdukes la tomó hace 1 día. AbiertoStatus: New
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
dnnsoftware/Dnn.Platform#7607 ·
Los mantenedores suelen responder en 3 días
-
Status: New
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
dnnsoftware/Dnn.Platform#7606 ·
Los mantenedores suelen responder en 3 días
Todos los issues de dnnsoftware/Dnn.Platform
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
criticalmanufacturing/cli#909 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
RadicalCSG/com.chisel#312 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
eyalgolan/statecraft-israel#3093 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
DeveloperAcademy-POSTECH/2026-C6-M10-MUSA#677 ·
Los mantenedores suelen responder en 1 día
-
REQ-13 : une demande En cours perd son responsable par un simple enregistrement, et reste En coursAbiertoa-corriger bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
christian-raj/S-Aloha#301 ·