Open Closed

Angular UI cannot read properties of undefined (reading 'impersonatorUserId') #9004


User avatar
0
464199480 created

Cli command
abp new Acme.BookStore -u angular -t app-pro -theme lepton

lepton theme no longer supported?

image.png


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

    Hi,

    Lepton theme is not supported for new project but still we maintain our packages. It seems there is problem in the library, Our Angular team will check the problem soon

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

    Hello, thank you for reporting this. It will be fixed by next patch release. So, I am refunding your ticket.

  • User Avatar
    0
    464199480 created

    Thank you for your reply.
    Could you please tell me if there is a temporary fix for this error?
    Or, if you can specify the release date for the fix, we can arrange the upgrade plan accordingly.

  • User Avatar
    0
    MichelZ created

    We have the same error with an existing application using the lepton theme.
    Also, are there any plans to remove the lepton theme so we need to migrate to lepton-x, or is it still OK to use it?

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

    Thank you for your reply.
    Could you please tell me if there is a temporary fix for this error?
    Or, if you can specify the release date for the fix, we can arrange the upgrade plan accordingly.

    You can track the latest patch releases for a fix at the following link: ABP Patch Releases.

    In the meantime, I recommend overriding the function that is causing the issue as a temporary solution.

    To do this, create a CustomImpersonationService that extends ImpersonationService:

    import { Injectable } from '@angular/core';
    import { ImpersonationService } from '@volo/abp.commercial.ng.ui/config';
    
    @Injectable({
      providedIn: 'root'
    })
    export class CustomImpersonationService extends ImpersonationService {
    
      constructor() {
        super();
      }
    
      override isImpersonatorVisible(): boolean {
        const {
          currentUser: { impersonatorUserId: userId } = {}
        } = this.configState.getAll();
        return !!userId;
      }
    }
    

    Once created, add it to the providers array in app.module.ts.

    { provide: ImpersonationService, useClass: CustomImpersonationService },
    

    Let me know if you need further assistance.

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

    We have the same error with an existing application using the lepton theme.
    Also, are there any plans to remove the lepton theme so we need to migrate to lepton-x, or is it still OK to use it?

    Hello, the Lepton theme remains valid for use, and there are currently no plans to discontinue its support.

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.2.0-preview. Updated on March 20, 2025, 18:00