- ABP Framework version: v6.0.0
- UI type: Blazor WASM
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace: Logout button in UserMenu not working with LeptonXTheme, TopMenu in Blazor
- Steps to reproduce the issue:"
We recently upgraded from abp 4.4.0 to 6.0.0 .
also upgraded Lepton Theme to LeptonX Theme. Top menu displays logged in user info, but on clicking the user menu no menu is displayed such as logout,
is there something else i am missing?
MyAppMenuContributor : IMenuContributor
private async Task ConfigureUserMenuAsync(MenuConfigurationContext context)
{
var accountStringLocalizer = context.GetLocalizer<AccountResource>();
var identityServerUrl = _configuration["AuthServer:Authority"] ?? "";
context.Menu.AddItem(new ApplicationMenuItem(
"Account.Manage",
accountStringLocalizer["MyAccount"],
$"{identityServerUrl.EnsureEndsWith('/')}Account/Manage?returnUrl={_configuration["App:SelfUrl"]}",
icon: "fa fa-cog",
order: 1000,
null).RequireAuthenticated());
context.Menu.AddItem(new ApplicationMenuItem(
"Account.SecurityLogs",
accountStringLocalizer["MySecurityLogs"],
$"{identityServerUrl.EnsureEndsWith('/')}Account/SecurityLogs?returnUrl={_configuration["App:SelfUrl"]}",
icon: "fa fa-cog",
order: 1001,
null).RequireAuthenticated());
await Task.CompletedTask;
}
Module.cs
private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new MyAppMenuContributor (context.Services.GetConfiguration()));
});
}
4 Answer(s)
-
0
I suggest you create a new project, and then compare the code.
Remember to run
abp bundle
command in blazor wasm to update js and css -
0
Thanks for your reply. I had upgraded existing application using the guidelines in https://docs.abp.io/en/abp/latest/Migration-Guides/Upgrading-Startup-Template. followed steps like Create 2 solutions for old and new version, upgrade old(4.4.0) to desired version(6.0.0). then i compared both the versions and Applied necessary changes manually, finally running "abp bundle" (no errors generated here) Application upgraded successfully w.r.t functionality but LeptonX theme has some issue in Menu i am not able to click user profile and display menu items like Logout, My profile etc
UserMenu contributor looks like below
MenuConfiguration in BlazorModule.cs
Surprisingly there is no User menu implementation provided in documentation(https://docs.abp.io/en/commercial/6.0/themes/lepton-x/blazor?UI=Blazor#main-header-toolbar-1) for Blazor WASM, just like we have in MVC UI
it will be helpful if i get some information on it.
-
0
Going further i tried displaying "My account" and "security logs" by below code this is the result by commenting (else if (context.Menu.Name == StandardMenus.User). still user profile is unclickable . then click security logs. i can see the menu at security logs page .
Any help will be appreciated here Thanks in advance
-
0
hi
then i compared both the versions and Applied necessary changes manually
If you run
new version
and it works, please compare the code again, including letponx module dependencies, packages.jsonAnd check the application log and browser console for any error logs.