Open Closed

After updating to v7.4, the user menu does not appear after user login on the public site. #5991


User avatar
0
aksogut created
  • ABP Framework version: v7.4.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

After updating to v7.4, the user menu does not appear after user login on the public site.


4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Could your provide the full steps to reproduce the problem? thanks.

  • User Avatar
    0
    aksogut created

    I created a new project with Abp Suite. When I log in to the public site, the user menu does not appear. Likewise, the site I upgrade has the same problem.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Ok, I will check it.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can confirm this is a bug, we will fix it in the next patch version and your ticket was refunded.

    You can try this temporary solution:

    using SideMenuUserMenu = Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.SideMenu.Toolbar.UserMenu.UserMenuViewComponent;
    using TopMenuUserMenu = Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.TopMenu.UserMenu.UserMenuViewComponent;
    
    .....
    
    public class MyMainTopToolbarContributor : IToolbarContributor
    {
        public async Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
        {
            if (context.Toolbar.Name != StandardToolbars.Main)
            {
                return;
            }
    
            if (!(context.Theme is LeptonXTheme))
            {
                return;
            }
    
            var options = context.ServiceProvider.GetRequiredService<IOptions<LeptonXThemeMvcOptions>>();
    
            context.Toolbar.Items.Add(new ToolbarItem(typeof(GeneralSettingsViewComponent)));
    
            if (context.ServiceProvider.GetRequiredService<ICurrentUser>().IsAuthenticated)
            {
                if (options.Value.ApplicationLayout == LeptonXMvcLayouts.TopMenu)
                {
                    context.Toolbar.Items.Add(new ToolbarItem(typeof(TopMenuUserMenu)));
                }
                else
                {
                    context.Toolbar.Items.Add(new ToolbarItem(typeof(SideMenuUserMenu)));
                }
            }
        }
    }
    
    
     Configure<AbpToolbarOptions>(options =>
    {
        options.Contributors.RemoveAll(x => x.GetType() == typeof(LeptonXThemeMainTopToolbarContributor));
        options.Contributors.Add(new MyMainTopToolbarContributor());
    });
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11