We are at the latest version of AspNetZero and I am having trouble adding Ukrainian as a language for localization in the solution.
I have followed this guide (and successfully added other languages): https://aspnetboilerplate.com/Pages/Documents/Zero/Language-Management
I get this error when I try to select the language to be used:
I get this error message when I run npm run publish after I have updated to ANZ V11 from 10.5.0
If I upgrade Angular manually to 13.2.2 (latest) I get this error:
Is there any way I can get more details on this error?
After the latest update to Asp.Net Zero 10.5.0 some events (maybe lazyload events) are not fired when the angular solution is deployed to a environment. It works locally when running angular in debug on localhost.
It is not a backend issue because if I connect the debug localhost instance of angular to the deployed backend it works perfectly.
The example in question is the Tenant impersonation. (We did not make any changes to this. ) It uses the CommonLookupModal and I have put some console log statements to reveal how it is called:
When run locally the getRecords method is called twice upon opening the modal. When run on the environment the getRecords method are only called once with the event value being null.
Hope you have some suggestions
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Multitenancy ENABLED
I have a strange issue in the UserAppService class.
I have added a new custom property to the User class that needs to get set during update and creation of users. The issue is that in order to assign the right values for the custom property I need to get some data from the database created by the host. To avoid too much polution of the create and update user methods I have extracted the functionality to a private async method inside the UserAppService class.
While entering UpdateUserAsync() _unitOfWorkManager.Current.GetTenantId()
returns the correct tenantId but after my private method is called the same statement returns null.
This is what I have done inside the private method: Attempt #1 Assuming tenant ID will be reset to AbpSession.GetTenantId() value after using is complete (it is not)
private async Task DoCustomStuffAsync(CreateOrUpdateUserInput input, User user)
{
if(user.CustomProp == null)
return;
using (_unitOfWorkManager.Current.SetTenantId(null))
{
// Getting host data *** WORKS
}
}
Attempt #2 forcing new UOW
private async Task DoCustomStuffAsync(CreateOrUpdateUserInput input, User user)
{
if(user.CustomProp == null)
return;
using(var uow = _unitOfWorkManager.Begin())
using (_unitOfWorkManager.Current.SetTenantId(null))
{
// Getting host data *** WORKS
uow.Complete();
}
}
Attempt #2 Forcing new transaction scope
private async Task DoCustomStuffAsync(CreateOrUpdateUserInput input, User user)
{
if(user.CustomProp == null)
return;
using(var uow = _unitOfWorkManager.Begin(RequiresNew))
using (_unitOfWorkManager.Current.SetTenantId(null))
{
// Getting host data *** WORKS
uow.Complete();
}
}
Attempt #3 Manual dispose of uow scope
private async Task DoCustomStuffAsync(CreateOrUpdateUserInput input, User user)
{
if(user.CustomProp == null)
return;
using(_unitOfWorkManager.Begin())
using (var uow = _unitOfWorkManager.Current.SetTenantId(null))
{
// Getting host data *** WORKS
uow.Dispose(); //Should not be nessesary
}
}
Attempt #4 Marking methods (and class) with UOW
[UnitOfWork]
public async Task UpdateUserAsync(....)
[UnitOfWork]
private async Task DoCustomStuffAsync(CreateOrUpdateUserInput input, User user)
{
if(user.CustomProp == null)
return;
using (var uow = _unitOfWorkManager.Current.SetTenantId(null))
{
// Getting host data *** WORKS
}
}
What am I doing wrong here? I can obviously set the tenantID again in the UpdateUserAsync method but that is not a good way IMO.
Best regards