Clicking Features causes Blazor page to blow up
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
Go to https://localhost:44307/saas/host/tenants as host admin and click on features for a tenant and get the following exception.
[14:42:45 WRN] Unhandled exception rendering component: Unable to evaluate index expressions of type 'PropertyExpression'.
System.InvalidOperationException: Unable to evaluate index expressions of type 'PropertyExpression'.
at Blazorise.Utilities.ExpressionFormatter.FormatIndexArgument(Expression indexExpression, ReverseStringBuilder& builder)
at Blazorise.Utilities.ExpressionFormatter.FormatLambda(LambdaExpression expression, String prefix)
at Blazorise.Utilities.ExpressionFormatter.FormatLambda(LambdaExpression expression)
at Blazorise.Select`1.GetFormatedValueExpression()
at Blazorise.BaseInputComponent`1.get_NameAttributeValue()
at Blazorise.Select`1.<BuildRenderTree>b__56_0(RenderTreeBuilder __builder2)
at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
[14:42:45 ERR] Unhandled exception in circuit 'vNe_BunHVPTypiw1VOtLm_evJguCsE46o2MN3z-MSP0'.
System.InvalidOperationException: Unable to evaluate index expressions of type 'PropertyExpression'.
at Blazorise.Utilities.ExpressionFormatter.FormatIndexArgument(Expression indexExpression, ReverseStringBuilder& builder)
at Blazorise.Utilities.ExpressionFormatter.FormatLambda(LambdaExpression expression, String prefix)
at Blazorise.Utilities.ExpressionFormatter.FormatLambda(LambdaExpression expression)
at Blazorise.Select`1.GetFormatedValueExpression()
at Blazorise.BaseInputComponent`1.get_NameAttributeValue()
at Blazorise.Select`1.<BuildRenderTree>b__56_0(RenderTreeBuilder __builder2)
at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
So this
results in this
Reproduction Steps
Since I´m unable to login to open source abp.io as seen here https://discord.com/channels/951497912645476422/951497912645476425/1277291221274071183 I can´t replicate it there (if that is even possible) and my commercial subscription has expired and I can´t report it anywhere except here.
I have reported this to Blazorise here https://github.com/Megabit/Blazorise/issues/5714
This happens to newly created tenants as the old ones.
Expected behavior
Being able to click Features dropdown and edit the features of a tenant.
Actual behavior
The Blazor page gets an error and is unresponsive after.
Regression?
Yes this was working before updating
Known Workarounds
None
Version
8.2.2
User Interface
Blazor Server
Database Provider
EF Core (Default)
Tiered or separate authentication server
Tiered
Operation System
Windows (Default)
Other information
No response
hi
This doesn't seem to be related to abp. We will wait for Blazorise's response.
@maliming please take a look at the answer from Blazorise. Could you give them some feedback?
This is totally braking my 8.2 version and would be terrible if I would need to downgrade Blazorise and not be able update it.
Can you share a simple project to reproduce?
No I can´t because I don´t have access to the professional version anymore. What happens if you create a new solution and update the Blazor package, and open the menue on the tenant tab?
Could this be the case? https://github.com/dotnet/aspnetcore/issues/56145#issuecomment-2183968627
I found that <input @bind="@Data["Stock"]" /> works, but not the @bind-Value.
Could you share the code that you are using for the Features action in the dropdown?
The dropdown will open FeatureManagementModal.
https://github.com/abpframework/abp/tree/dev/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components
@maliming can you take a look at their answer https://github.com/Megabit/Blazorise/issues/5714#issuecomment-2324182894
It seems that you are using some Blazor limitation there that might be easy to fix on your end 🤷♂️
it might work by just using the SelectedValue and SelectedValueChanged parameters separatedly, if the SelectedValueExpression part is not needed. (The expression parameter is usually used for validation purposes as far as I personally know.)
@EngincanV @maliming is this not something that could get into next patch?
Or can I maybe just override it.. (Ill check that)
We will check this when we upgrade blazorise to 1.6.x.
https://github.com/abpframework/abp/pull/20960/commits/376f57d6e9f6fd8308baee4dbb2d167f04d6c610