Open Closed

ABP Upgrade to 9.1.1 - Duplicate Administration menu #9201


User avatar
0
DominaTang created

Micro Service Template

In APP_ROUTE_PROVIDER, there is code routes.remove([eThemeSharedRouteNames.Administration]); And then there is code

{
        path: '/identity/roles',
        name: '::Roles',
        parentName: '::Administration',
        layout: eLayoutType.application,
        requiredPolicy: Permissions.ABPIDENTITY_ROLES,
      } as ABP.Route,
      {
        path: '/identity/users',
        name: '::Users',
        parentName: '::Administration',
        layout: eLayoutType.application,
        requiredPolicy: Permissions.ABPIDENTITY_USERS,
      } as ABP.Route,

Which means the app would only keeps two menu items under administration menu, however, after upgrade there are two administration side menu;

And when click Roles or Users menu, there is error: core.mjs:6843 ERROR RuntimeError: NG04014: Invalid configuration of route 'identity/'. The component must be standalone. In source code there is identity routes which replace Roles component:

export const Identity_ROUTES: Routes = [
  { path: '', redirectTo: 'roles', pathMatch: 'full' },
  {
    path: '',
    component: RouterOutletComponent,
    canActivate: [authGuard, permissionGuard, IdentityExtensionsGuard],
    children: [
      {
        path: 'roles',
        component: ReplaceableRouteContainerComponent,
        data: {
          requiredPolicy: 'AbpIdentity.Roles',
          replaceableComponent: {
            key: eIdentityComponents.Roles,
            defaultComponent: RolesComponent,
          } as ReplaceableComponents.RouteData<RolesComponent>,
        },
      },

....


4 Answer(s)
  • User Avatar
    0
    DominaTang created

    I figured out the reason, I replace the existing code:

    export const APP_ROUTE_PROVIDER = [ { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService, AppConfigService], multi: true, }, ];

    With: export const APP_ROUTE_PROVIDER = [ provideAppInitializer(() => { configureRoutes(); }), ];

    After revert back, there is only one Administration menu, however, when I click Roles or Users menu item, it complains: src_app_identity_identity-routes_ts.js:1 ERROR RuntimeError: NG04014: Invalid configuration of route 'identity/'. The component must be standalone. Notes: The app is converted to standalone mode, and we write our own identity components to replace ABP's identity component.

  • User Avatar
    0
    DominaTang created

    Our app copied ABP 7.2.3 account and identity source code to Angular project, after revert to the original source code (module style), and fix several compile error. Now the admin menu works as before.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    I am delighted to hear that your problem has been solved.

  • User Avatar
    0
    DominaTang created

    I am delighted to hear that your problem has been solved.

    Can you help me on this thread? https://abp.io/support/questions/9210/ABP-Upgrade-to-911--Click-profile-icon---point-to-auth-server-pages

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on May 12, 2025, 05:22