Starts in:
2 DAYS
9 HRS
55 MIN
20 SEC
Starts in:
2 D
9 H
55 M
20 S
Open Closed

Dynamic Menu not appearing #1710


User avatar
0
learnabp created
  • ABP Framework version: v4.0.0

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Steps to reproduce the issue:"

  1. Create a new template from abp suite
  2. Went to Menu created a root menu item
  3. the menu time doesn't appear in the public site

The Cmskit is enabled in the Domain.Shared module

please see below images


8 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi learnabp

    Are you using same Redis for your Web & Web.Public projects?

  • User Avatar
    0
    learnabp created

    Hi learnabp

    Are you using same Redis for your Web & Web.Public projects?

    No ... I am not using Redis on the *.Web Or *Public.Web projects we have commented it out in the COnfigure Method.

    In fact the template doesn't have redis on the **.Web project but it is commented out in *.Public.Web project

    Cofigure Method of *.Web

    Configure Method of *.Public.Web

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Getting menus from database for each request is too costly, so CmsKit uses Redis to cache them. When you change something about menus, *.Web projects purges cache and *.Public.Web gets latest state of menus.

    By the way, you don't have to configure manually, if you have [DependsOn(typeof(AbpCachingStackExchangeRedisModule))] attribute, it configures itself with default configuration, reads Redis:Configuration from your appsettings.json

  • User Avatar
    0
    learnabp created

    When redis is on it doesn't work ... when redis is off it works

    I have redis installed ... and is it right that the *.Web project doesn't use redis and only the *.Public.Web project uses redis??

  • User Avatar
    0
    learnabp created

    can i please have a response from ABP still can't get the menu system working when Redis is on in the *Public.Web looks like the *.Web doesn't have Redis configuration even after adding Redis to the *.Web project it doesn't work

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi @learnabp

    Can you share an empty project that reproduces your problem to my email: enis.necipoglu@volosoft.com

    I can say something about then

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    I followed that steps and working properly:

    • My environment: docker ps
    CONTAINER ID   IMAGE                              COMMAND                  CREATED        STATUS             PORTS                                                 NAMES
    523922ca2557   mcr.microsoft.com/azure-sql-edge   "/opt/mssql/bin/perm…"   13 days ago    Up About an hour   1401/tcp, 0.0.0.0:1433->1433/tcp, :::1433->1433/tcp   eager_keldysh
    a2247ca3f8f4   redis                              "docker-entrypoint.s…"   4 months ago   Up About an hour   0.0.0.0:6379->6379/tcp, :::6379->6379/tcp             wonderful_goldberg
    

    • Created a project with-public-website
    abp new MyMenuApp --with-public-website
    

    • Changed connectionstring in appsettings.json for DbMigrator, Web and Public.Web project.

    • Executed DbMigrator
    cd src/MyMenuApp.DbMigrator
    dotnet run
    

    • Runned Web project:
    cd ../MyMenuApp.Web
    dotnet run
    

    • Added a couple of menu in UI

    • Runned Web.Public project
    cd ../MyMenuApp.Web.Public
    dotnet run
    

    • I see the menu in public site:

    So I can't reproduce the scenario that you faced. Please share a sample code about it.

  • User Avatar
    0
    learnabp created

    @einisn I have just sent you the empty solution where the menu is not working when edited in the *.Web Project

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06