Open Closed

5.0 new project issue: Buttons for entities in the UI do not work #2335


User avatar
0
joelhulen created

If you're creating a bug/problem report, please include the following:

  • ABP Framework version: v5.0.0 (commercial)
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: JavaScript error: Uncaught TypeError: Cannot read properties of undefined (reading 'controllers')
  • Steps to reproduce the issue:"
  1. Create a brand new project with ABP Suite.
  2. Create one or more entities.
  3. Generate and run the project.
  4. Log in.
  5. Select an entity from the left-hand menu.
  6. Select the + New [Entity Name] button or Advanced filters button.

The JavaScript error will appear, referencing line 3 of the generated index.js file, which will be something like this: var myEntityService = window.myProject.controllers.myEntities.myEntity;

I've tried creating two new projects and both failed in the same way. When I tried upgrading the ABP packages to 5.0.1, I received all sorts of errors about not being able to find those packages, so that's a dead-end and a whole different issue.


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

    Hi,

    We will check it.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    This is a problem with the template, we will fix it. ps: your ticket refunded

    For now, you can try:

    Add typeof(<YouProjectName>HttpApiModule) to <YouProjectName>WebModule and remove typeof(AbpHttpClientWebModule), it should be work.

  • User Avatar
    0
    joelhulen created

    This change worked, thank you :)

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