Activities of "joachim.penc"

You closed the issue without further comment. Did you manage to reproduce it? Are you going to fix it? Are my credits getting refunded?

Some routes of a child entity have the wrong name on the server side if the master entity is camel-cased.

  • ABP Framework version: v8.1.1
  • 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: 404 (Resource not found)
  • Steps to reproduce the issue:
    • Create a new solution using ABP Suite
    • Create a master entity with a camel-case name, e.g. MasterEntity and generate the code
    • Create a child entity for MasterEntity, e.g. Child and generate the code
    • Notice in the HttpApi project the ChildController.cs with the following 2 methods:
    [HttpGet]
    [Route("by-masterentity")]
    public virtual Task<PagedResultDto<ChildDto>> GetListByMasterEntityIdAsync(GetChildListInput input)
    {
        ...
    
    [HttpGet]
    [Route("detailed/by-masterentity")]
    ...
    
    • The routes attributes should have by-master-entity instead of by-masterentity - so whenever you create a new master entry, the client will show a "Resource not found" because it gets a 404 from the server (the client proxy uses the correct route on the Angular side!)

As a workaround I modified the ChildController.Extended.cs controller by overriding the 2 methods and correcting the route attributes.

All template files whose filenames are not unique (e.g. all files in angular\.suite\schematics\commands\generate-entity\files have exactly the same name as in angular\.suite\schematics\commands\generate-entity\child-files) cannot be customized properly using ABP Suite, i.e. once you change the template of one of these files, both templates will be marked as modified (and outdated) and both files will get the changes applied (although the original files are completely different).

  • ABP Framework version: v8.1.1
  • 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: N/A
  • Steps to reproduce the issue:
    • Create a solution using the startup template with above settings
    • Add a new module using ABP Suite and add it to the solution (not sure if this step makes a difference or not)
    • Go to Templates in ABP Suite (using the Module solution - again, not sure if this is even related) and search for ".name@kebab-detail.component.html.template" - notice there are 2 results with the exact same name but totally different template content
    • Create 2 entities with one of them targeting the first template while the other entity targeting the second template - notice the generated output is indeed totally different
    • Make a simple change to one of those templates using ABP Suite
    • Notice that both templates have been changed according to ABP Suite and both are marked as "Outdated"
    • Generate those 2 entities again - notice that both generated items have been changed to the content of the modified template - also the one which should have the original other template

As this does not happen to all other templates that don't have duplicate names I guess this must have something to do with those duplicate names.

As a workaround I modified the templates manually and wrote a postinstall script to replace the ones in angular\.suite\schematics\commands\generate-entity\ - although using ABP Suite for this would be highly appreciated.

Cheers Joe

PS: Maybe this unresolved issue is related or even the same? https://support.abp.io/QA/Questions/2073/Customizing-Angular-Templates-has-no-effect

Showing 1 to 3 of 3 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35