Activities of "enisn"

afterLeptonXInitialization

For afterLeptonXInitialization issue, it seems the leptonx javascript bundle is old. afterLeptonXInitialization logic was included in LeptonX v1.0.0. Make sure your LeptonX dependencies are equal or above 1.0.0 in .csproj and package.json files.

Then run following command for MVC and Blazor-Server projects.

abp install-libs

If your project is Blazor WASM, try following one

abp bundle

AbpComponentBase provides HandleErrorAsync() method to handle exceptions in Blazor Server. It does everything for you, it writes logs, show modal etc.

You can use it like that:

    try
    {
        // Your logic here.
        throw new Exception("Test"); // Example exception.
    }
    catch (Exception ex)
    {
        await HandleErrorAsync(ex);
    }

Also UserFriendlyException is handled:

    try
    {
        // Your logic here.
        throw new UserFriendlyException("This is a user friendly exception.");
    }
    catch (Exception ex)
    {
        await HandleErrorAsync(ex);
    }

You can check this out for more information: https://docs.abp.io/en/abp/latest/UI/Blazor/Error-Handling?UI=BlazorServer#blazor-ui-error-handling

This is a Blazorise limitation. There is no event or async callback for selection change.

But you can still use your async operation with Task.Run() as a workaround.

public partial class Index
{
    private Guid selectedIndexItemId;
    public Guid SelectedIndexItemId
    {
        get => selectedIndexItemId;
        set {
            selectedIndexItemId = value;
            Task.Run(OnDropdownSelected); // 👈
        }
    }
    
    public async Task OnDropdownSelected() // 👈
    {
        await Task.Delay(1000);
        Logger.LogInformation("OnDropdownSelected!");
    }
}

I had the latest stable version. I am not understanding you on the whole abp 6.0 stable vs LeptonX. They were both 6.0 stable versions. The entire point for me of creating the custom side general settings is to remove the language platform. I do not want to show it.

ABP and LeptonX have different versioning systems. LeptonX version 1.0.0` was released just after ABP 6.0.0.


You can use this template to override generalsettings: https://support.abp.io/QA/Questions/3831#answer-9a59a509-4790-32ce-046b-3a06dcd3ed1b

You can use SelectedValueChanged event and manage current selected item manually instead of using binding.

Or, You can just use a regular encapsulation over your property. You can use setter of the selectedDropValueSPO property.

I have an example for that:

Index.razor

<Card>
    <CardBody>
        <DropdownList @ref="dropdownRef"
            TItem="IndexItem" TValue="Guid"
            Data="IndexItems"
            @bind-SelectedValue="SelectedIndexItemId"
            TextField="@((item)=>item.Name)"
            ValueField="@((item)=>item.Id)"
            >Select Credential</DropdownList>
    </CardBody>
    <CardFooter>
        <p>
            @SelectedIndexItemId
        </p>
    </CardFooter>
</Card>

Index.razor.cs

public partial class Index
{
    protected DropdownList<IndexItem, Guid> dropdownRef;
    private Guid selectedIndexItemId;

    public List<IndexItem> IndexItems { get; set; } = new List<IndexItem>
    {
        new IndexItem(Guid.NewGuid(), "Item 1"),
        new IndexItem(Guid.NewGuid(), "Item 2"),
        new IndexItem(Guid.NewGuid(), "Item 3"),
        new IndexItem(Guid.NewGuid(), "Item 4"),
        new IndexItem(Guid.NewGuid(), "Item 5"),
    };

    public Guid SelectedIndexItemId
    {
        get => selectedIndexItemId;
        set {
            selectedIndexItemId = value;
            Logger.LogInformation("SelectedIndexItemIdChanged!");
        }
    }
}

And the result is:

Can you try following configuration according to your situation?

https://support.abp.io/QA/Questions/3327/#answer-4ca736a0-24be-8f01-e071-3a04dad4fb30

https://drive.google.com/file/d/1i7M3cUaDeQIQr24ET8oUqV9k3iqEfIXN/view?usp=sharing

Pls find the log file for the errors 403 & 500

I can't see any error different than

2022-10-19 12:55:40.638 +08:00 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BIMS Health Status.
System.InvalidOperationException: An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set.
   at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request)
   at System.Net.Http.HttpClient.CheckRequestBeforeSend(HttpRequestMessage request)
   at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetAsync(Uri requestUri)
   at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration)

Did you remove or modify the default healthcheck configuration?

Do you use Blazor WebAssembly or Blazor Server?

Hi @Naren

If you ask current language of current requrest, you can access CultureInfo.CurrentCulture

If do you want to list of all languages of the application, you can inject ILanguageProvider and access localization options by calling GetLanguagesAsync() method on it.

public class MyService : ITransientDependency
{
	protected ILanguageProvider LanguageProvider { get; }
	public MyService(ILanguageProvider languageProvider)
	{
		LanguageProvider = languageProvider;
	}

	public async Task DoSomethingAsync()
	{
		var languages = await LanguageProvider.GetLanguagesAsync();
		var currentLanguage = languages.FindByCulture(
					CultureInfo.CurrentCulture.Name,
					CultureInfo.CurrentUICulture.Name);

		// ...
	}
}

We can answer the rest of them after you provide specific logs about errors

Showing 171 to 180 of 489 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30