Activities of "christophe.baille"

I am keep looking and notice that I still got the issue by having css

By comparing the source of when it works and the one when it doesn't work, there is no much changes... The cshtml is change from me but does not interact with my issue I really don't understand

ABP Framework version: v4.3.2 UI type: Angular DB provider: EF Core

I have an error after adding the source code of Lepton Theme in my project. I only want the source code for MVC view and it is about changing the footer, so I need only one project to be added:

Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton

I tried 2 differents way:

using ABP suite: I run abp suite, then click "Replace package with source code". Once done, I remove all the project, except Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton. Then I changes the references too.

Manually: I download the source code of Abp Lepton Theme, copy and add manually the project Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton to my solution. After that, I change references on HttpApi.Host project, I changed references into Mvc.UI.Theme.Lepton for Volo.Abp.LeptonTheme.Management.Domain.Shared so it will take from the package.

If it worked when I use ABP suite. After switching to another branch and ging back to this one, I got the same issue as if I do manually (manually did never work).

Here is the error:

AbpException: Could not find the bundle file '/Themes/Lepton/Global/Styles/lepton6.css' for the bundle 'Lepton.Global'!

I saw some people got similar error so I did try to run yarn and gulp commands in both Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton and HttpApi.Host projects, but the issue is still there.

Thanks for your help

ABP Framework version: v4.3.2 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): no

After clicking on the login button, I reach the login page. From here, if I try to change the language, nothing happens. Language does not change, the flag neither.

It might be related to this issue fixed few weeks ago maybe.

ABP Framework version: v4.3.2 UI type: Angular DB provider: EF Core

I am using the object ngx-datatable and I would like to personalize the text from the red squares to make it multi-langual.

I can do it by adding on each ngx-datatable parmaters the following line:

[messages]="{emptyMessage: '::NoDataAvailable' | abpLocalization, totalMessage: '::Total' | abpLocalization}"

My issue here is that I will need to put it on each time I use this element.

It seems there is another way as you can see here https://github.com/swimlane/ngx-datatable/blob/master/src/app/app.module.ts

NgxDatatableModule.forRoot({ messages: { emptyMessage: 'No hay datos disponibles', totalMessage: 'total', selectedMessage: 'selected' } }),

My problem here is that in ABP, NgxDatatableModule does not exists as it is already exported by ThemeSharedModule. I tried to add it using this command:

yarn add @swimlane/ngx-datatable

but it added it on the folder @abp\ng.theme.shared in a new folder node_modules, then once it is added on the project, datalists are not working anymore and got this error:

I am wondering if by adding this ngx-datatable, it will erase other modules or you have another one into ThemeSharedModule?

I would like to know as well if there is a way to changes message settings through ThemeSharedModule.forRoot so I will keep using ThemeSharedModule and might be more simple for the next ABP upgrades.

Thanks

ABP Framework version: v4.3.2 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): no

NOTE: One of my colleague created a similar issue here which have been successfully resolved on the release 4.3.2.

We open our application and change the language from english to Finnish. Then we click on login, this page is still in Finnish now since the version 4.3.2 (read the Not before), then login. I reach my Angualr Homepage and it is still in Finnish.

Now, I try reach a MVC view, in my case it is a page from the Blogging module, I then see my MVC page is is English, it should be in Finnish as we changed it previously.

With version before 4.3.2, we had this issue for all views that we can reach from the user menu as they were in MVC.Since 4.3.2, they are in Angular, so I can not test if that part have been fixed or not.

One more point which might help to solve the issue. When we logout, we "transit" through the page /Account/LoggedOut and this one remain in english too:

I got a similar issue and got it fixed there:

https://support.abp.io/QA/Questions/1343

Issue resolved.

After getting the error, everything is generated (UI, back-end) appart of the migration of the migration file.

To go further, some changes need to be done on our code:

1- *DbContextModelCreatingExtensions.cs file:

From the entity you generated, delete this line:

b.HasOne<AppUser>().WithMany().HasForeignKey(x => x.AppUserId);

2- On EntityGenerated.cs, add:

public AppUser AppUser { get; set; }

3- On AppUser.cs, add:

public EntityGenerated EntityGenerated { get; set; }

4- On OnModelCreating method of *MigrationDbContext.cs, add:

            builder.Entity<EntityGenerated >(b =>
            {
                b.Ignore(x => x.AppUser);
                    b.HasOne<IdentityUser>().WithOne().HasForeignKey<EntityGenerated >(x => x.AppUserId);
            });

NOTE: Be very careful to use Volo.Abp.Identity.IdentityUser for IdentityUser, by using Microsoft.AspNetCore.Identity.IdentityUser it will not work

5- On OnModelCreating method of *DbContext.cs, add:

            builder.Entity<EntityGenerated>(b =>
            {
                    b.HasOne(x => x.AppUser).WithOne(x => x.EntityGenerated).HasForeignKey<EntityGenerated>(x => x.AppUserId);
            });

Once everything is done, you can now generate the migration script and update the database.

Thanks again Liangshiwei for your support

With this, I got this error:

The relationship from 'StaffProfile' to 'IdentityUser' with foreign key properties {'AppUserId' : Nullable<Guid>} cannot target the primary key {'Id' : string} because it is not compatible. Configure a principal key or a set of compatible foreign key properties for this relationship.

So I tested by creating another field for the primary key in my ExistProfile entity:

public string AppUserIdString { get; set; }

It then generate a script but it is not what I want:

  • it create a new column, I want to keep AppUserId as it is in production already, i can not change the type. Plus if I want to change the type, I need to change a lot of code

  • the script create a new table IdentityUser, we are actually using ABPUser table, we can not use another.

I tried your changes but several parts were wrong on the code, I then changed like this:

1- Remove b.HasOne<AppUser>().WithMany().HasForeignKey(x => x.AppUserId); in YourDbContextModelCreatingExtensions. → OK

2- Open *MigrationsDbContext, add the following code in the OnModelCreating method:

b.Ignore(x => x.AppUser); //Replace by AppUserId as AppUser does not exists

builder.Entity<IdentityUser>(b => { b.Property<Guid?>(nameof(AppUser.MyExistingEntityId)); //Replace by Id as MyExistingEntityId does not exists b.HasOne<MyExistingEntity>().WithMany().HasForeignKey(nameof(AppUser.MyExistingEntityId)); //Replace by Id as MyExistingEntityId does not exists });

3- Open *DbContext, add the following code in the OnModelCreating method:

b.Property<Guid?>(nameof(AppUser.OrganizationId)); //Replace by Id as OrganizationId does not exists

b.HasOne<MyExistingEntity>().WithMany().HasForeignKey(nameof(AppUser.MyExistingEntityId)); //Replace by Id as MyExistingEntityId does not exists

builder.ConfigureCustomApplicationModules(); // Commented it as I do not have this method I have this instead, but seems the same: builder.ConfigureMyApp();

I guess all the part builder.Entity<Test> was for test? I did try to add it but I do not know what to put to make it working...

After making this changes I then try to create migration files but I got this error:

The property 'Id' cannot be added to type 'IdentityUser' because the type of the corresponding CLR property or field 'string' does not match the specified type 'Nullable<Guid>'

Please keep me updated, I am available for remote connection, it might be faster to solve this than the way we do actually.

Thanks

Hello maliming,

You are right, I removed all changes mentionned for .net project before and just put changes on the angular part.

So now when I run the angular page, I got the Finnish language and can change perfectly.

Showing 151 to 160 of 188 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13