oqtane.framework: Can't go to Manage Settings with the recent changes made

@sbwalker & @leigh-pointer

I am having an issue where i can’t go to Manage Settings using my own theme which i have been working on I get an error

'object' does not contain a definition for 'PageModuleId'

at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at Amazing.Theme.ComingSoon.AcsModuleTitle.PropertyChanged(Object sender, PropertyChangedEventArgs e) in C:\Projects\Amazing.Theme.ComingSoon\Client\Themes\Controls\Container\AcsModuleTitle.razor:line 39
   at Oqtane.Shared.PropertyDictionary.OnPropertyChanged(String propertyName) in C:\Projects\oqtane.framework\Oqtane.Shared\Shared\PropertyDictionary.cs:line 98
   at Oqtane.Shared.PropertyDictionary.TrySetMember(SetMemberBinder binder, Object value) in C:\Projects\oqtane.framework\Oqtane.Shared\Shared\PropertyDictionary.cs:line 50
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at Oqtane.Modules.ModuleBase.SetModuleTitle(String title) in C:\Projects\oqtane.framework\Oqtane.Client\Modules\ModuleBase.cs:line 284
   at Oqtane.Modules.Admin.Modules.Settings.OnParametersSet() in C:\Projects\oqtane.framework\Oqtane.Client\Modules\Admin\Modules\Settings.razor:line 136
   at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.<RunInitAndSetParametersAsync>d__20.MoveNext()

the culprit is in ModuleTitle.razor

image

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 44 (44 by maintainers)

Commits related to this issue

Most upvoted comments

@leigh-pointer I am going to explore LocalizerFactory as an option. It was added to the framework a while ago for scenarios where localization values may exist in a RESX file which does not correspond to the RAZOR file. For example, the ModuleTitle.razor component has a corresponding ModuleTitle.resx - however this is not where you would want to store the localization values, as a ModuleTitle is actually related to a specific type of module. So the LocalizerFactory allows you to specify an explicit Type ie. you can specify that the ModuleTitle needs to dynamically get its localization values from a RESX file for the current Module. This seems to be what we want in this situation - we want to localize the ModuleTitle which is assigned by the Title property in a module component - but we want the localization values to be specified in a RESX associated to the module component ie. Edit.razor and Edit.resx

I am also considering rolling back #3125 and using a different approach for localization for ModuleTitle