Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot override Identity/Users/index.js #21592

Open
1 task done
ejohnson-dotnet opened this issue Dec 11, 2024 · 3 comments · May be fixed by #21614
Open
1 task done

Cannot override Identity/Users/index.js #21592

ejohnson-dotnet opened this issue Dec 11, 2024 · 3 comments · May be fixed by #21614

Comments

@ejohnson-dotnet
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Description

I have a web project using Abp. It was using Abp version 8.3, MVC UI, the basic theme. I had a file Pages\Identity\Users\index.js to override the built in index.js in the identity module. It was working fine in version 8.3.x. I upgraded to 9.0.0 and now the custom index.js is not loaded, and the embedded one is instead.

Reproduction Steps

abp new BookStore

Create a new index.js file in Pages\Identity\Users\index.js in the .Web project.

Expected behavior

The custom index.js is loaded when navigating to the page Identity\Users

Actual behavior

No response

Regression?

Yes. It worked fine in 8.3

Known Workarounds

No response

Version

9.0.1

User Interface

MVC

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

@maliming
Copy link
Member

Please share a test project to reproduce.

@maliming maliming removed the bug label Dec 11, 2024
@ejohnson-dotnet
Copy link
Contributor Author

Here is a sample test project.

  1. Log in to the website
  2. Navigate to the Users page, Identity\Users

There is a custom index.js file there which should show a window.alert saying "Hello from index.js"

I have attached two zip files. The first Bookstore-8.2.3.zip is an Abp version 8.2.3 project and it shows the window.alert message.

The second Bookstore-9.0.2.zip is an Abp version 9.0.2 project and it does NOT show the window.alert message. It does not allow overriding the embedded index.js

I have deleted the 'node-modules' and 'libs' folders from both to reduce the size. You need to run yarn and abp install-libs to get them to work.

BookStore-8.2.3.zip
BookStore-9.0.2.zip

@ejohnson-dotnet
Copy link
Contributor Author

Adding the line

options.FileSets.AddEmbedded<BookStoreWebModule>();

in the BookStoreWebModule.cs file fixes this issue.

Which creates another problem, why does the new abp command have different app templates for the old and the new? Why are the templates not matching?

Why are the new templates not open source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants