Open Closed

Customizing ABP Suite Templates for Angular not working properly for most files #7161


User avatar
0
joachim.penc created

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


3 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, thanks for reporting. I'll check it.

  • User Avatar
    0
    joachim.penc created

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

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

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

    Hi, it's being automatically closed by our support bot, sorry for the inconvenience. We reproduced the problem that you stated and created an internal issue (#17555) and we will fix it asap. I refunded your ticket, thanks for reporting the problem.

    Regards.

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