Lombiq / Orchard-Base-Theme

An Orchard Core base theme with reusable mixins, components, etc.
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

MainMenuNavigationProvider.GetTitle() can throw NRE (OSOE-709) #95

Closed Piedone closed 10 months ago

Piedone commented 11 months ago

MainMenuNavigationProvider.GetTitle() can throw the following NRE:

An exception occurred while building the menu 'main'
System.ArgumentNullException:
   at Microsoft.Extensions.Localization.LocalizedString..ctor (Microsoft.Extensions.Localization.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Lombiq.BaseTheme.Services.MainMenuNavigationProvider.GetTitle (Lombiq.BaseTheme, Version=1.262.1.0, Culture=neutral, PublicKeyToken=null: /home/runner/work/DotNest-Tenants-Core/DotNest-Tenants-Core/src/Themes/Lombiq.BaseTheme/Lombiq.BaseTheme/Services/MainMenuNavigationProvider.cs:109)
   at Lombiq.BaseTheme.Services.MainMenuNavigationProvider+<AddAsync>d__6.MoveNext (Lombiq.BaseTheme, Version=1.262.1.0, Culture=neutral, PublicKeyToken=null: /home/runner/work/DotNest-Tenants-Core/DotNest-Tenants-Core/src/Themes/Lombiq.BaseTheme/Lombiq.BaseTheme/Services/MainMenuNavigationProvider.cs:83)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Lombiq.BaseTheme.Services.MainMenuNavigationProvider+<BuildAsync>d__5.MoveNext (Lombiq.BaseTheme, Version=1.262.1.0, Culture=neutral, PublicKeyToken=null: /home/runner/work/DotNest-Tenants-Core/DotNest-Tenants-Core/src/Themes/Lombiq.BaseTheme/Lombiq.BaseTheme/Services/MainMenuNavigationProvider.cs:51)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Navigation.NavigationManager+<BuildMenuAsync>d__7.MoveNext (OrchardCore.Navigation.Core, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null)

Not sure about the exact repro but this happens when visiting /Admin/Templates?admin=-238317370&pagenum=2 on a site I can't disclose more about.

Jira issue