[Bug]: Resource manager causes error 500
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C#
- スター
- 1.1k
- フォーク
- 791
- 平均マージ
- 5日 7時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dnnsoftware/Dnn.Platform のほかの issue
-
Status: New
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
dnnsoftware/Dnn.Platform#6681 ·
メンテナーはふだん 3 日以内に返信
-
Status: New
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
dnnsoftware/Dnn.Platform#6051 · コメント 4 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
dnnsoftware/Dnn.Platform#7611 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
[Bug]: Cleanup with Wildcard Glob Does not Run対応中かも @bdukes が 1 日前に担当しました。 オープンStatus: New
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
dnnsoftware/Dnn.Platform#7607 ·
メンテナーはふだん 3 日以内に返信
-
Status: New
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
dnnsoftware/Dnn.Platform#7606 ·
メンテナーはふだん 3 日以内に返信
dnnsoftware/Dnn.Platform の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
criticalmanufacturing/cli#909 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
RadicalCSG/com.chisel#312 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eyalgolan/statecraft-israel#3093 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
DeveloperAcademy-POSTECH/2026-C6-M10-MUSA#677 ·
メンテナーはふだん 1 日以内に返信
-
REQ-13 : une demande En cours perd son responsable par un simple enregistrement, et reste En coursオープンa-corriger bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
christian-raj/S-Aloha#301 ·